Repository navigation
Add rust-version to published sub-crates - #3476
Conversation
|
Can this use |
|
We don’t currently define |
|
Good call — pushed a follow-up commit that centralizes |
|
Conflicts with c035d23. |
The workspace root already declares rust-version = "1.85", and every sub-crate uses edition = "2024" (which requires rustc >= 1.85 anyway), but none of the 9 published sub-crates carried their own rust-version field, so it was missing from their individual Cargo.toml on crates.io. Fixes BurntSushi#3473
Per maintainer feedback on the rust-version PR: rather than hardcoding edition/rust-version in every sub-crate manifest, define them once in the root [workspace.package] and have each crate inherit via edition.workspace = true / rust-version.workspace = true.
36557c2 to
0e54779
Compare
|
Rebased onto master to resolve the conflict with |
| "crates/ignore", | ||
| ] | ||
|
|
||
| [workspace.package] |
There was a problem hiding this comment.
nit: Could we move [workspace.package] to the top of the file?
There was a problem hiding this comment.
Please move it above [[bin]] but below the [package] section.
|
I think the main problem preventing me from merging this PR is that Rust 1.96 is fine for ripgrep, but it might be too new for some of the library crates like So I guess for |
…ce default The workspace rust-version (1.96) is fine for ripgrep itself, but too new for globset and ignore, which don't need it. Rust 1.88 is the actual requirement (that's where let-chains stabilized, which a downstream ignore release already depends on), and both crates build clean under it.
|
Done — globset and ignore now pin |
|
I don't think it's necessarily a floor. But I think this is fine for now. |
Fixes #3473
The workspace root
Cargo.tomlalready declaresrust-version = "1.85", and every sub-crate usesedition = "2024"(which mechanically requires rustc >= 1.85), but none of the 9 published sub-crates carried their ownrust-versionfield — so it was missing from their individualCargo.tomlon crates.io even though the workspace itself documents the MSRV.Added
rust-version = "1.85"to:crates/cli(grep-cli)crates/globset(globset)crates/grep(grep)crates/ignore(ignore)crates/matcher(grep-matcher)crates/pcre2(grep-pcre2)crates/printer(grep-printer)crates/regex(grep-regex)crates/searcher(grep-searcher)Verified
cargo metadata --no-depsandcargo check --workspaceboth succeed with no changes needed elsewhere.