Skip to content

Add cargo.lock to Rust build hash#19470

Merged
erikjohnston merged 2 commits intodevelopfrom
erikj/rust_cargo_lock_hahs
Feb 17, 2026
Merged

Add cargo.lock to Rust build hash#19470
erikjohnston merged 2 commits intodevelopfrom
erikj/rust_cargo_lock_hahs

Conversation

@erikjohnston
Copy link
Member

This is so that when we update dependencies etc we correctly ensure that the Rust library has been rebuilt.

This is so that when we update dependencies etc we correctly ensure that
the Rust library has been rebuilt.
@erikjohnston erikjohnston marked this pull request as ready for review February 16, 2026 15:38
@erikjohnston erikjohnston requested a review from a team as a code owner February 16, 2026 15:38
Comment on lines +51 to +56
// The default rules don't pick up trivial changes to the workspace config
// files, but we need to rebuild if those change to pick up the changed
// hashes.
println!("cargo::rerun-if-changed=.");
println!("cargo::rerun-if-changed=../Cargo.lock");
println!("cargo::rerun-if-changed=../Cargo.toml");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am very very surprised by this, any significant change to the workspace (deps, build flags, etc.) definitely should trigger a rebuild

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-trivial changes will get picked up and cause a rebuild, however it specifically doesn't pick up minor changes. Unfortunately, our hashing does need to get recalculated if there are trivial changes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, makes sense: for example, a spacing change in the Cargo.toml will not trigger a rebuild normally, but because we use the raw files as input of the hash, it will change the hash and therefore need to recalculate

@erikjohnston erikjohnston merged commit e627b08 into develop Feb 17, 2026
78 of 81 checks passed
@erikjohnston erikjohnston deleted the erikj/rust_cargo_lock_hahs branch February 17, 2026 13:49
alexlebens pushed a commit to alexlebens/infrastructure that referenced this pull request Feb 24, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [element-hq/synapse](https://github.com/element-hq/synapse) | minor | `v1.147.1` → `v1.148.0` |

---

### Release Notes

<details>
<summary>element-hq/synapse (element-hq/synapse)</summary>

### [`v1.148.0`](https://github.com/element-hq/synapse/releases/tag/v1.148.0)

[Compare Source](element-hq/synapse@v1.147.1...v1.148.0)

### Synapse 1.148.0 (2026-02-24)

No significant changes since 1.148.0rc1.

### Synapse 1.148.0rc1 (2026-02-17)

#### Features

- Support sending and receiving [MSC4354 Sticky Event](matrix-org/matrix-spec-proposals#4354) metadata. ([#&#8203;19365](element-hq/synapse#19365))

#### Improved Documentation

- Fix reference to the `experimental_features` section of the configuration manual documentation. ([#&#8203;19435](element-hq/synapse#19435))

#### Deprecations and Removals

- Remove support for [MSC3244: Room version capabilities](matrix-org/matrix-spec-proposals#3244) as the MSC was rejected. ([#&#8203;19429](element-hq/synapse#19429))

#### Internal Changes

- Add in-repo Complement tests so we can test Synapse specific behavior at an end-to-end level. ([#&#8203;19406](element-hq/synapse#19406))
- Push Synapse docker images to Element OCI Registry. ([#&#8203;19420](element-hq/synapse#19420))
- Allow configuring the Rust HTTP client to use HTTP/2 only. ([#&#8203;19457](element-hq/synapse#19457))
- Correctly refuse to start if the Rust workspace config has changed and the Rust library has not been rebuilt. ([#&#8203;19470](element-hq/synapse#19470))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNS44IiwidXBkYXRlZEluVmVyIjoiNDMuMjUuOCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW1hZ2UiXX0=-->

Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/4203
Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net>
Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants