WIP: chore/config/fix-build-hash-and-add-quick-build-target #1377

Draft
gamesguru wants to merge 18 commits from gamesguru/continuwuity:chore/config/fix-build-hash-and-add-quick-build-target into main
Contributor

This pull request adds a target for slightly faster release-style builds used in testing/development for quicker turnaround time. It also fixes the build hash User Agent signature for incremental build (no longer requiring a clean to set the correct build hash).

Pull request checklist:

  • This pull request targets the main branch, and the branch is named something other than
    main.
  • I have written an appropriate pull request title and my description is clear.
  • I understand I am responsible for the contents of this pull request.
  • I have followed the contributing guidelines:
<!-- In order to help reviewers know what your pull request does at a glance, you should ensure that 1. Your PR title is a short, single sentence describing what you changed 2. You have described in more detail what you have changed, why you have changed it, what the intended effect is, and why you think this will be beneficial to the project. If you have made any potentially strange/questionable design choices, but didn't feel they'd benefit from code comments, please don't mention them here - after opening your pull request, go to "files changed", and click on the "+" symbol in the line number gutter, and attach comments to the lines that you think would benefit from some clarification. --> This pull request adds a target for slightly faster release-style builds used in testing/development for quicker turnaround time. It also fixes the build hash User Agent signature for incremental build (no longer requiring a clean to set the correct build hash). <!-- Example: This pull request allows us to warp through time and space ten times faster than before by double-inverting the warp drive with hyperheated jump fluid, both making the drive faster and more efficient. This resolves the common issue where we have to wait more than 10 milliseconds to engage, use, and disengage the warp drive when travelling between galaxies. --> <!-- Closes: #... --> <!-- Fixes: #... --> <!-- Uncomment the above line(s) if your pull request fixes an issue or closes another pull request by superseding it. Replace `#...` with the issue/pr number, such as `#123`. --> **Pull request checklist:** <!-- You need to complete these before your PR can be considered. If you aren't sure about some, feel free to ask for clarification in #dev:continuwuity.org. --> - [ ] This pull request targets the `main` branch, and the branch is named something other than `main`. - [x] I have written an appropriate pull request title and my description is clear. - [x] I understand I am responsible for the contents of this pull request. - I have followed the [contributing guidelines][c1]: - [ ] My contribution follows the [code style][c2], if applicable. - [x] I ran [pre-commit checks][c1pc] before opening/drafting this pull request. - [x] I have [tested my contribution][c1t] (or proof-read it for documentation-only changes) myself, if applicable. This includes ensuring code compiles. - [ ] My commit messages follow the [commit message format][c1cm] and are descriptive. - [ ] I have written a [news fragment][n1] for this PR, if applicable<!--(can be done after hitting open!)-->. <!-- Notes on these requirements: - While not required, we encourage you to sign your commits with GPG or SSH to attest the authenticity of your changes. - While we allow LLM-assisted contributions, we do not appreciate contributions that are low quality, which is typical of machine-generated contributions that have not had a lot of love and care from a human. Please do not open a PR if all you have done is asked ChatGPT to tidy up the codebase with a +-100,000 diff. - In the case of code style violations, reviewers may leave review comments/change requests indicating what the ideal change would look like. For example, a reviewer may suggest you lower a log level, or use `match` instead of `if/else` etc. - In the case of code style violations, pre-commit check failures, minor things like typos/spelling errors, and in some cases commit format violations, reviewers may modify your branch directly, typically by making changes and adding a commit. Particularly in the latter case, a reviewer may rebase your commits to squash "spammy" ones (like "fix", "fix", "actually fix"), and reword commit messages that don't satisfy the format. - Pull requests MUST pass the `Checks` CI workflows to be capable of being merged. This can only be bypassed in exceptional circumstances. If your CI flakes, let us know in matrix:r/dev:continuwuity.org. - Pull requests have to be based on the latest `main` commit before being merged. If the main branch changes while you're making your changes, you should make sure you rebase on main before opening a PR. Your branch will be rebased on main before it is merged if it has fallen behind. - We typically only do fast-forward merges, so your entire commit log will be included. Once in main, it's difficult to get out cleanly, so put on your best dress, smile for the cameras! --> [c1]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md [c2]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/docs/development/code_style.mdx [c1pc]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#pre-commit-checks [c1t]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#running-tests-locally [c1cm]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#commit-messages [n1]: https://towncrier.readthedocs.io/en/stable/tutorial.html#creating-news-fragments
add a "release-fast" build target for quicker testing/development
Some checks are pending
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Update flake hashes / update-flake-hashes (pull_request) Blocked by required conditions
ef4623bead
Jade left a comment
Owner

If you feel like it one thing I didn't add when I was doing this was marking builds from dirty git trees

If you feel like it one thing I didn't add when I was doing this was marking builds from dirty git trees
@ -42,0 +43,4 @@
// If CONTINUWUITY_BRANCH is manually set (e.g. in .env), use it to construct the version string
// while keeping the hash dynamic
if get_env("CONTINUWUITY_VERSION_EXTRA").is_none() {
if let Some(branch_env) = get_env("CONTINUWUITY_BRANCH") {
Owner

Feels like this should be pulled from git automatically by the way, and just ommitted if it's main.

Feels like this should be pulled from git automatically by the way, and just ommitted if it's main.
make .envrc work for me
Some checks are pending
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Update flake hashes / update-flake-hashes (pull_request) Blocked by required conditions
c0807022ac
init Makefile
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been cancelled
Checks / Prek / Pre-commit & Formatting (pull_request) Has been cancelled
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
Update flake hashes / update-flake-hashes (pull_request) Has been cancelled
3c6952c2f9
Makefile Outdated
@ -0,0 +11,4 @@
help: ##H Show this help
@grep -hE '^[a-zA-Z0-9_\/-]+:.*?##H .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?##H "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
Owner

Not sure we want a makefile - this is a bit hard to understand and modify. Something like a just file would probably be better

Not sure we want a makefile - this is a bit hard to understand and modify. Something like a just file would probably be better
Author
Contributor

The help command or the functional targets? Help command is completely cosmetic & can be removed. Tab completion is the source of truth.

I like the convenience of make format, make lint, etc. Helps me know I'm doing exactly what CI does.

The help command or the functional targets? Help command is completely cosmetic & can be removed. Tab completion is the source of truth. I like the convenience of `make format`, `make lint`, etc. Helps me know I'm doing exactly what CI does.
Owner

I mean the whole thing. We already have https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/engage.toml engage which does the same thing, and even if we didn't there is no reason to use Make when there are so many better alternatives

I mean the whole thing. We already have https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/engage.toml engage which does the same thing, and even if we didn't there is no reason to use Make when there are so many better alternatives
Owner

+1. I don't think this file is necessary at all, and it's certainly not related to the topic of this PR.

+1. I don't think this file is necessary at all, and it's certainly not related to the topic of this PR.
gamesguru force-pushed chore/config/fix-build-hash-and-add-quick-build-target from 3c6952c2f9
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been cancelled
Checks / Prek / Pre-commit & Formatting (pull_request) Has been cancelled
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
Update flake hashes / update-flake-hashes (pull_request) Has been cancelled
to 34d1d3896a
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been cancelled
Checks / Prek / Pre-commit & Formatting (pull_request) Has been cancelled
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
Update flake hashes / update-flake-hashes (pull_request) Has been cancelled
2026-02-17 21:17:31 +00:00
Compare
Author
Contributor

Enhanced version check

Version/metadata crate now always reports the compiled version and does so remarkably fast.

Extra config flag added very legacy clients, like Schilidchat. Tested and working, see image.

For some reason the fix works for /r0/download but /r0/thumbnail still throws some errors, perhaps less? Need to check why.

Commit hash of test performed:

curl https://matrix.nutra.tk/_matrix/federation/v1/version

{
  "server": {
    "name": "continuwuity",
    "version": "0.5.5 (dccac214,b=brsq)"
  }
}

Other changes on this branch

zzzzz... will update/separate stuff out later.

### Enhanced version check Version/metadata crate now always reports the compiled version and does so remarkably fast. ### Extra config flag added very legacy clients, like Schilidchat. Tested and working, see image. For some reason the fix works for `/r0/download` but `/r0/thumbnail` still throws some errors, perhaps less? Need to check why. Commit hash of test performed: `curl https://matrix.nutra.tk/_matrix/federation/v1/version` ```json { "server": { "name": "continuwuity", "version": "0.5.5 (dccac214,b=brsq)" } } ``` ### Other changes on this branch zzzzz... will update/separate stuff out later.
gamesguru force-pushed chore/config/fix-build-hash-and-add-quick-build-target from 34d1d3896a
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been cancelled
Checks / Prek / Pre-commit & Formatting (pull_request) Has been cancelled
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
Update flake hashes / update-flake-hashes (pull_request) Has been cancelled
to 1271e6f04e
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been cancelled
Checks / Prek / Pre-commit & Formatting (pull_request) Has been cancelled
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
Update flake hashes / update-flake-hashes (pull_request) Has been cancelled
2026-02-21 17:24:37 +00:00
Compare
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been cancelled
Checks / Prek / Pre-commit & Formatting (pull_request) Has been cancelled
Required
Details
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
Required
Details
Update flake hashes / update-flake-hashes (pull_request) Has been cancelled
This pull request has changes conflicting with the target branch.
  • Cargo.lock
  • docs/reference/admin/media.md
  • src/admin/media/commands.rs
  • src/admin/media/mod.rs
  • src/core/info/version.rs
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u chore/config/fix-build-hash-and-add-quick-build-target:gamesguru-chore/config/fix-build-hash-and-add-quick-build-target
git switch gamesguru-chore/config/fix-build-hash-and-add-quick-build-target
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/continuwuity!1377
No description provided.