Skip to content

Commit 2951912

Browse files
committed
Merge remote-tracking branch 'origin/main' into justfile-canonical
2 parents ac8ea3d + 93e8298 commit 2951912

File tree

17 files changed

+64
-63
lines changed

17 files changed

+64
-63
lines changed

.github/actions/install-tools/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ runs:
2020
run: sudo apt-get update && sudo apt-get install -y just
2121
shell: bash
2222
- if: steps.parse.outputs.uv == 'true'
23-
uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff # v6
23+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0

.github/workflows/bump-hegel-core.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ jobs:
1515
pull-requests: write
1616
steps:
1717
- name: Generate app token
18-
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1
18+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
1919
id: app-token
2020
with:
2121
app-id: ${{ vars.HEGEL_RELEASE_APP_ID }}
2222
private-key: ${{ secrets.HEGEL_RELEASE_APP_PRIVATE_KEY }}
2323
repositories: hegel-rust
2424

25-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
25+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2626
with:
2727
token: ${{ steps.app-token.outputs.token }} # zizmor: ignore[artipacked]
2828

29-
- uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27
29+
- uses: cachix/install-nix-action@1ca7d21a94afc7c957383a2d217460d980de4934 # v31.10.1
3030

3131
- name: Bump hegel-core version
3232
env:

.github/workflows/check-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
permissions:
1616
contents: read
1717
steps:
18-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
18+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1919
with:
2020
fetch-depth: 0
2121
persist-credentials: false

.github/workflows/ci.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
permissions:
2020
contents: read
2121
steps:
22-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
22+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2323
with:
2424
persist-credentials: false
2525

2626
- name: Install Rust
2727
run: rustup toolchain install stable --profile minimal -c rustfmt -c clippy
28-
- uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2
28+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
2929

3030
- uses: ./.github/actions/install-tools
3131
with:
@@ -51,13 +51,13 @@ jobs:
5151
matrix:
5252
rust: ["1.86", stable]
5353
steps:
54-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
54+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5555
with:
5656
persist-credentials: false
5757

5858
- name: Install Rust
5959
run: rustup toolchain install ${{ matrix.rust }} --profile minimal && rustup default ${{ matrix.rust }}
60-
- uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2
60+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
6161

6262
- uses: ./.github/actions/install-tools
6363
with:
@@ -75,13 +75,13 @@ jobs:
7575
matrix:
7676
rust: ["1.86", stable]
7777
steps:
78-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
78+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7979
with:
8080
persist-credentials: false
8181

8282
- name: Install Rust
8383
run: rustup toolchain install ${{ matrix.rust }} --profile minimal && rustup default ${{ matrix.rust }}
84-
- uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2
84+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
8585

8686
- uses: ./.github/actions/install-tools
8787
with:
@@ -96,12 +96,12 @@ jobs:
9696
permissions:
9797
contents: read
9898
steps:
99-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
99+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
100100
with:
101101
persist-credentials: false
102102
- name: Install Rust
103103
run: rustup toolchain install nightly --profile minimal && rustup default nightly
104-
- uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2
104+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
105105

106106
- uses: ./.github/actions/install-tools
107107
with:
@@ -120,7 +120,7 @@ jobs:
120120
permissions:
121121
contents: read
122122
steps:
123-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
123+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
124124
with:
125125
persist-credentials: false
126126
- name: Install Rust
@@ -144,12 +144,12 @@ jobs:
144144
matrix:
145145
rust: ["1.86", stable]
146146
steps:
147-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
147+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
148148
with:
149149
persist-credentials: false
150150
- name: Install Rust
151151
run: rustup toolchain install ${{ matrix.rust }} --profile minimal && rustup default ${{ matrix.rust }}
152-
- uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2
152+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
153153
- name: Compile examples
154154
run: cargo build --examples --all-features
155155

@@ -159,13 +159,13 @@ jobs:
159159
permissions:
160160
contents: read
161161
steps:
162-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
162+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
163163
with:
164164
persist-credentials: false
165165

166166
- name: Install Rust
167167
run: rustup toolchain install stable --profile minimal -c llvm-tools-preview
168-
- uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2
168+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
169169

170170
- name: Install cargo-llvm-cov
171171
run: cargo install --locked cargo-llvm-cov
@@ -183,13 +183,13 @@ jobs:
183183
permissions:
184184
contents: read
185185
steps:
186-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
186+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
187187
with:
188188
persist-credentials: false
189189

190190
- name: Install Rust
191191
run: rustup toolchain install stable --profile minimal
192-
- uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2
192+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
193193

194194
- uses: ./.github/actions/install-tools
195195
with:
@@ -204,11 +204,11 @@ jobs:
204204
permissions:
205205
contents: read
206206
steps:
207-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
207+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
208208
with:
209209
persist-credentials: false
210210

211-
- uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27
211+
- uses: cachix/install-nix-action@1ca7d21a94afc7c957383a2d217460d980de4934 # v31.10.1
212212
- uses: ./.github/actions/install-tools
213213
with:
214214
tools: just
@@ -226,7 +226,7 @@ jobs:
226226
# Used by our trusted publishing flow
227227
id-token: write
228228
steps:
229-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
229+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
230230
with:
231231
persist-credentials: false
232232

@@ -239,7 +239,7 @@ jobs:
239239
240240
- name: Generate app token
241241
if: steps.check.outputs.skip != 'true'
242-
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1
242+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
243243
id: app-token
244244
with:
245245
app-id: ${{ vars.HEGEL_RELEASE_APP_ID }}
@@ -248,7 +248,7 @@ jobs:
248248

249249
- name: Re-checkout with app token # zizmor: ignore[artipacked]
250250
if: steps.check.outputs.skip != 'true'
251-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
251+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
252252
with:
253253
token: ${{ steps.app-token.outputs.token }}
254254

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## 0.3.0 - 2026-03-27
4+
5+
This release changes `self` in `#[invariant]` from an immutable reference to a mutable reference:
6+
7+
```rust
8+
# before
9+
#[invariant]
10+
fn my_invariant(&self, ...) {}
11+
12+
# after
13+
#[invariant]
14+
fn my_invariant(&mut self, ...) {}
15+
```
16+
17+
This will require updating your invariant signatures, but should be strictly more expressive.
18+
319
## 0.2.6 - 2026-03-26
420

521
Bump our pinned hegel-core to [0.2.3](https://github.com/hegeldev/hegel-core/releases/tag/v0.2.3), incorporating the following change:

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = [".", "hegel-macros"]
33

44
[package]
55
name = "hegeltest"
6-
version = "0.2.6"
6+
version = "0.3.0"
77
edition = "2024"
88
# if you bump this, also bump ci.yml and hegel-macros/Cargo.toml
99
rust-version = "1.86"
@@ -32,7 +32,7 @@ paste = "1.0"
3232
tempfile = "3.0"
3333
ciborium = "0.2.2"
3434
crc32fast = "1.4"
35-
hegeltest-macros = { version = "=0.2.6", path = "hegel-macros" }
35+
hegeltest-macros = { version = "=0.3.0", path = "hegel-macros" }
3636
# optional feature dependencies
3737
rand = { version = "0.9", optional = true }
3838
serde_json = { version = "1.0.61", optional = true }

examples/die_hard.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ impl DieHard {
4545
}
4646

4747
#[invariant]
48-
fn physics_of_jugs(&self, _tc: TestCase) {
48+
fn physics_of_jugs(&mut self, _tc: TestCase) {
4949
assert!(0 <= self.small && self.small <= 3);
5050
assert!(0 <= self.big && self.big <= 5);
5151
}
5252

5353
#[invariant]
54-
fn die_hard_problem_not_solved(&self, tc: TestCase) {
54+
fn die_hard_problem_not_solved(&mut self, tc: TestCase) {
5555
tc.note(&format!("small / big = {0} / {1}", self.small, self.big));
5656
assert!(self.big != 4);
5757
}

examples/ledger.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl LedgerTest {
7676
}
7777

7878
#[invariant]
79-
fn nonnegative_balances(&self, _: TestCase) {
79+
fn nonnegative_balances(&mut self, _: TestCase) {
8080
for (_account, balance) in &self.ledger.balances {
8181
assert!(*balance >= 0);
8282
}

examples/min_stack.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl MinStackTest {
8787
}
8888

8989
#[invariant]
90-
fn minimums_agree(&self, _: TestCase) {
90+
fn minimums_agree(&mut self, _: TestCase) {
9191
assert_eq!(self.stack.minimum(), self.stack.reference());
9292
}
9393
}

0 commit comments

Comments
 (0)