Skip to content

Commit 32bd4f2

Browse files
committed
cargo-rail: reordering the schema/builder to keep 'msrv' cfg together. pinning actions; adjusting readme/docs
1 parent 477c867 commit 32bd4f2

File tree

9 files changed

+35
-32
lines changed

9 files changed

+35
-32
lines changed

.github/actions-lock.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,54 +26,54 @@
2626
actions/checkout:
2727
ref: v5.0.0
2828
sha: "08c6903cd8c0fde910a37f88322edcfb5dd907a8"
29-
updated: "2025-12-13T19:32:16Z"
29+
updated: "2025-12-19T04:31:36Z"
3030
notes: "Repository checkout - used in every workflow"
3131
actions/upload-artifact:
3232
ref: v5.0.0
3333
sha: "330a01c490aca151604b8cf639adc76d48f6c5d4"
34-
updated: "2025-12-13T19:32:16Z"
34+
updated: "2025-12-19T04:31:37Z"
3535
notes: "Upload build artifacts and test results"
3636
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
3737
# Testing & Reporting
3838
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
3939
mikepenz/action-junit-report:
4040
ref: v6.0.1
4141
sha: "e08919a3b1fb83a78393dfb775a9c37f17d8eea6"
42-
updated: "2025-12-13T19:32:17Z"
42+
updated: "2025-12-19T04:31:38Z"
4343
notes: "Publish JUnit test reports as GitHub Checks"
4444
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4545
# Rust Toolchain & Ecosystem
4646
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4747
dtolnay/rust-toolchain:
4848
ref: master
49-
sha: "0b1efabc08b657293548b77fb76cc02d26091c7e"
50-
updated: "2025-12-13T19:32:18Z"
49+
sha: "f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561"
50+
updated: "2025-12-19T04:31:39Z"
5151
notes: "Rust toolchain installation - always tracks latest nightly"
5252
taiki-e/install-action:
5353
ref: v2
54-
sha: "59679e24ffb0dbbbc136684eda7fcd21fe9eddea"
55-
updated: "2025-12-13T19:32:18Z"
54+
sha: "60581cd7025e0e855cebd745379013e286d9c787"
55+
updated: "2025-12-19T04:31:40Z"
5656
notes: "Install cargo tools (nextest, just, deny, audit)"
5757
Swatinem/rust-cache:
5858
ref: v2.8.1
5959
sha: "f13886b937689c021905a6b90929199931d60db1"
60-
updated: "2025-12-13T19:32:19Z"
60+
updated: "2025-12-19T04:31:41Z"
6161
notes: "GitHub runner Rust cache"
6262
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
6363
# Release Workflow Actions
6464
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
6565
taiki-e/create-gh-release-action:
6666
ref: v1.8.4
6767
sha: "b7abb0cf5e72cb5500307b577f9ca3fd4c5be9d2"
68-
updated: "2025-12-13T19:32:20Z"
68+
updated: "2025-12-19T04:31:42Z"
6969
notes: "Create GitHub releases from CHANGELOG.md"
7070
taiki-e/setup-cross-toolchain-action:
7171
ref: v1.26.0
7272
sha: "bdeb9ca6f0f909ea36bb94e1e3ec916b2ceb35fc"
73-
updated: "2025-12-13T19:32:20Z"
73+
updated: "2025-12-19T04:31:43Z"
7474
notes: "Cross-compilation toolchain setup for multi-target builds"
7575
taiki-e/upload-rust-binary-action:
7676
ref: v1.24.0
7777
sha: "e7953b6078194a4ae5f5619632e3715db6275561"
78-
updated: "2025-12-13T19:32:21Z"
78+
updated: "2025-12-19T04:31:44Z"
7979
notes: "Build and upload pre-built binaries to GitHub Releases"

.github/actions/setup/action.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,37 @@ runs:
1515
# Install cargo tools FIRST, before Rust toolchain installation
1616
# This prevents Windows issues where massive toolchain updates interfere with cargo bin directory
1717
- name: Install just
18-
uses: taiki-e/install-action@59679e24ffb0dbbbc136684eda7fcd21fe9eddea # v2
18+
uses: taiki-e/install-action@60581cd7025e0e855cebd745379013e286d9c787 # v2
1919
with:
2020
tool: just
2121

2222
- name: Install cargo-nextest
23-
uses: taiki-e/install-action@59679e24ffb0dbbbc136684eda7fcd21fe9eddea # v2
23+
uses: taiki-e/install-action@60581cd7025e0e855cebd745379013e286d9c787 # v2
2424
with:
2525
tool: cargo-nextest
2626

2727
- name: Install cargo-deny
28-
uses: taiki-e/install-action@59679e24ffb0dbbbc136684eda7fcd21fe9eddea # v2
28+
uses: taiki-e/install-action@60581cd7025e0e855cebd745379013e286d9c787 # v2
2929
with:
3030
tool: cargo-deny
3131

3232
- name: Install cargo-audit
33-
uses: taiki-e/install-action@59679e24ffb0dbbbc136684eda7fcd21fe9eddea # v2
33+
uses: taiki-e/install-action@60581cd7025e0e855cebd745379013e286d9c787 # v2
3434
with:
3535
tool: cargo-audit
3636

3737
- name: Install cargo-semver-checks
38-
uses: taiki-e/install-action@59679e24ffb0dbbbc136684eda7fcd21fe9eddea # v2
38+
uses: taiki-e/install-action@60581cd7025e0e855cebd745379013e286d9c787 # v2
3939
with:
4040
tool: cargo-semver-checks
4141

4242
- name: Install git-cliff
43-
uses: taiki-e/install-action@59679e24ffb0dbbbc136684eda7fcd21fe9eddea # v2
43+
uses: taiki-e/install-action@60581cd7025e0e855cebd745379013e286d9c787 # v2
4444
with:
4545
tool: git-cliff
4646

4747
- name: Install Rust Nightly Toolchain
48-
uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e # master
48+
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
4949
with:
5050
toolchain: nightly
5151
components: clippy, rustfmt

.github/workflows/commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
echo "Using MSRV: $msrv"
9494
9595
- name: Install Rust MSRV Toolchain
96-
uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e # master
96+
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
9797
with:
9898
toolchain: ${{ steps.msrv.outputs.msrv }}
9999

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
persist-credentials: false
9797

9898
- name: Install Rust
99-
uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e # master
99+
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # master
100100
with:
101101
toolchain: stable
102102

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ detect_unused = true
177177
prune_dead_features = true
178178
179179
msrv = true
180-
enforce_msrv_inheritance = false
181180
msrv_source = "max" # deps | workspace | max
181+
enforce_msrv_inheritance = false
182182
183183
[release]
184184
tag_format = "{crate}-{prefix}{version}"

docs/config.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ Controls workspace dependency unification behavior. All options are optional wit
120120
[unify]
121121
msrv = true
122122
msrv_source = "max" # "deps" | "workspace" | "max"
123+
enforce_msrv_inheritance = false
123124
detect_unused = true
124125
remove_unused = true
125126
prune_dead_features = true
@@ -195,8 +196,8 @@ transitive_host = "root"
195196
[unify]
196197
# Core options (defaults shown)
197198
msrv = true
198-
enforce_msrv_inheritance = false
199199
msrv_source = "max" # "deps" | "workspace" | "max"
200+
enforce_msrv_inheritance = false
200201
detect_unused = true
201202
remove_unused = true
202203
prune_dead_features = true
@@ -548,6 +549,7 @@ targets = [
548549
# Core
549550
msrv = true
550551
msrv_source = "max" # "deps" | "workspace" | "max"
552+
enforce_msrv_inheritance = false
551553
detect_unused = true
552554
remove_unused = true
553555
prune_dead_features = true

src/commands/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ const KNOWN_UNIFY_KEYS: &[&str] = &[
9898
"include",
9999
"msrv",
100100
"msrv_source",
101+
"enforce_msrv_inheritance",
101102
"prune_dead_features",
102103
"preserve_features",
103104
"strict_version_compat",

src/config/schema.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,18 @@ pub const SYNCABLE_FIELDS: &[FieldSpec] = &[
6868
default_toml: "true",
6969
comment: "Compute and write rust-version (default: true)",
7070
},
71-
FieldSpec {
72-
section: "unify",
73-
key: "enforce_msrv_inheritance",
74-
default_toml: "false",
75-
comment: "Ensure members inherit workspace rust-version",
76-
},
7771
FieldSpec {
7872
section: "unify",
7973
key: "msrv_source",
8074
default_toml: "\"max\"",
8175
comment: "How to compute MSRV: deps, workspace, max (default: max)",
8276
},
77+
FieldSpec {
78+
section: "unify",
79+
key: "enforce_msrv_inheritance",
80+
default_toml: "false",
81+
comment: "Ensure members inherit workspace rust-version",
82+
},
8383
FieldSpec {
8484
section: "unify",
8585
key: "prune_dead_features",

src/toml/builder.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ impl RailConfigBuilder {
9494

9595
// === MSRV ===
9696
content.push_str(&format!("\nmsrv = {}\n", config.msrv));
97-
content.push_str(&format!(
98-
"enforce_msrv_inheritance = {} # set rust-version = {{ workspace = true }} for members\n",
99-
config.enforce_msrv_inheritance
100-
));
10197
let msrv_source_str = match config.msrv_source {
10298
crate::config::MsrvSource::Deps => "deps",
10399
crate::config::MsrvSource::Workspace => "workspace",
@@ -107,6 +103,10 @@ impl RailConfigBuilder {
107103
"msrv_source = \"{}\" # deps | workspace | max\n",
108104
msrv_source_str
109105
));
106+
content.push_str(&format!(
107+
"enforce_msrv_inheritance = {} # Ensure members inherit workspace rust-version\n",
108+
config.enforce_msrv_inheritance
109+
));
110110

111111
// === Unused detection ===
112112
content.push_str(&format!("\ndetect_unused = {}\n", config.detect_unused));

0 commit comments

Comments
 (0)