-
-
Notifications
You must be signed in to change notification settings - Fork 346
Does not compile with MSRV #1808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for bringing this to my attention! Maybe we can start to untangle this by making the MSRV CI step perform a build instead, and use stable? Then it seems that Regarding |
Is this to say that all crates whose Specifically, at the current tip of main (8776a3e), I ran: diff -U1000 <(git grep -Fn 'rust-version = "1.70"' -- '**/Cargo.toml') <(git grep -Fn 'rust-version = "' -- '**/Cargo.toml') The output was: --- /dev/fd/63 2025-02-22 16:35:26.292251700 -0500
+++ /dev/fd/62 2025-02-22 16:35:26.292251700 -0500
@@ -1,75 +1,76 @@
gix-actor/Cargo.toml:12:rust-version = "1.70"
gix-archive/Cargo.toml:11:rust-version = "1.70"
gix-attributes/Cargo.toml:12:rust-version = "1.70"
gix-bitmap/Cargo.toml:11:rust-version = "1.70"
gix-blame/Cargo.toml:11:rust-version = "1.70"
gix-chunk/Cargo.toml:13:rust-version = "1.70"
gix-command/Cargo.toml:11:rust-version = "1.70"
gix-commitgraph/Cargo.toml:13:rust-version = "1.70"
gix-config-value/Cargo.toml:11:rust-version = "1.70"
gix-config/Cargo.toml:14:rust-version = "1.70"
gix-config/tests/Cargo.toml:11:rust-version = "1.70"
gix-credentials/Cargo.toml:11:rust-version = "1.70"
gix-date/Cargo.toml:12:rust-version = "1.70"
gix-diff/Cargo.toml:12:rust-version = "1.70"
gix-diff/tests/Cargo.toml:12:rust-version = "1.70"
gix-dir/Cargo.toml:11:rust-version = "1.70"
gix-discover/Cargo.toml:12:rust-version = "1.70"
gix-features/Cargo.toml:11:rust-version = "1.70"
gix-fetchhead/Cargo.toml:11:rust-version = "1.70"
gix-filter/Cargo.toml:11:rust-version = "1.70"
gix-fs/Cargo.toml:11:rust-version = "1.70"
gix-fsck/Cargo.toml:12:rust-version = "1.70"
gix-glob/Cargo.toml:11:rust-version = "1.70"
gix-hash/Cargo.toml:12:rust-version = "1.70"
gix-hashtable/Cargo.toml:12:rust-version = "1.70"
gix-ignore/Cargo.toml:12:rust-version = "1.70"
gix-index/Cargo.toml:12:rust-version = "1.70"
gix-index/tests/Cargo.toml:12:rust-version = "1.70"
gix-lfs/Cargo.toml:11:rust-version = "1.70"
gix-lock/Cargo.toml:12:rust-version = "1.70"
gix-macros/Cargo.toml:16:rust-version = "1.70"
gix-mailmap/Cargo.toml:11:rust-version = "1.70"
gix-merge/Cargo.toml:9:rust-version = "1.70"
gix-negotiate/Cargo.toml:11:rust-version = "1.70"
gix-note/Cargo.toml:11:rust-version = "1.70"
gix-object/Cargo.toml:12:rust-version = "1.70"
gix-odb/Cargo.toml:12:rust-version = "1.70"
gix-odb/tests/Cargo.toml:11:rust-version = "1.70"
gix-pack/Cargo.toml:12:rust-version = "1.70"
gix-pack/tests/Cargo.toml:11:rust-version = "1.70"
gix-packetline-blocking/Cargo.toml:12:rust-version = "1.70"
gix-packetline/Cargo.toml:12:rust-version = "1.70"
gix-path/Cargo.toml:12:rust-version = "1.70"
gix-pathspec/Cargo.toml:11:rust-version = "1.70"
gix-prompt/Cargo.toml:12:rust-version = "1.70"
gix-protocol/Cargo.toml:12:rust-version = "1.70"
gix-quote/Cargo.toml:11:rust-version = "1.70"
gix-rebase/Cargo.toml:11:rust-version = "1.70"
gix-ref/Cargo.toml:12:rust-version = "1.70"
gix-ref/tests/Cargo.toml:12:rust-version = "1.70"
gix-refspec/Cargo.toml:12:rust-version = "1.70"
gix-revision/Cargo.toml:12:rust-version = "1.70"
gix-revwalk/Cargo.toml:12:rust-version = "1.70"
gix-sec/Cargo.toml:12:rust-version = "1.70"
gix-sequencer/Cargo.toml:11:rust-version = "1.70"
gix-shallow/Cargo.toml:12:rust-version = "1.70"
gix-status/Cargo.toml:12:rust-version = "1.70"
gix-status/tests/Cargo.toml:12:rust-version = "1.70"
gix-submodule/Cargo.toml:11:rust-version = "1.70"
gix-tempfile/Cargo.toml:12:rust-version = "1.70"
gix-tix/Cargo.toml:11:rust-version = "1.70"
gix-trace/Cargo.toml:11:rust-version = "1.70"
gix-transport/Cargo.toml:12:rust-version = "1.70"
gix-traverse/Cargo.toml:12:rust-version = "1.70"
gix-traverse/tests/Cargo.toml:11:rust-version = "1.70"
gix-tui/Cargo.toml:11:rust-version = "1.70"
gix-url/Cargo.toml:12:rust-version = "1.70"
gix-utils/Cargo.toml:11:rust-version = "1.70"
gix-validate/Cargo.toml:12:rust-version = "1.70"
gix-worktree-state/Cargo.toml:12:rust-version = "1.70"
gix-worktree-state/tests/Cargo.toml:12:rust-version = "1.70"
gix-worktree-stream/Cargo.toml:11:rust-version = "1.70"
gix-worktree/Cargo.toml:12:rust-version = "1.70"
gix-worktree/tests/Cargo.toml:11:rust-version = "1.70"
gix/Cargo.toml:12:rust-version = "1.70"
+tests/tools/Cargo.toml:11:rust-version = "1.76" I would find it convenient to be able to use Rust 1.76 in more places, such as in tests on a feature branch that are more complex without |
That's a good point! I think usually when considering MSRV updates, I change all to the highest-possible MSRV and run clippy. If it doesn't find anything, I keep the previous MSRV so the version upgrade isn't happening without need. In theory, if there was a tool to test the MSRV (and I think there is), one could run it on all crates to find the lowest possible MSRV for each of the crates. That way, each of them, if used individually, might even support a lower MSRV than we test for, making them more compatible. And since And just to state that explicitly, if it was just me, I'd use the latest stable, always, MSRV is something I don't want to think about, yet there is no way around it if one wants these crates to be as useful as possible. |
Sorry--I accidentally wrote 1.76 here as the version I hoped to use, but what I meant to write here was 1.74:
1.74 is the version I hoped to use, since |
Great! Then there should be nothing in the way of using it, upping the |
Sounds good. If it ends up being useful to keep tests that (roughly speaking) look inside an |
This changes `cargo check` commands to `cargo build` in the `ci-check-msrv` recipe in the `justfile`, which the `check-msrv` CI jobs in `msrv.yml` use. (It updates a CI step name accordingly.) The idea is to make sure at least `gix`, with the two combinations of features tested, actually *builds* under the MSRV toolchain. As in f10f18d, this also updates the `Makefile` rule corresponding to that `justfile` recipe. The idea of actually building was suggested in: GitoxideLabs#1808 (comment) However, this does not uncover any new breakages. And there has been further improvement on GitoxideLabs#1808, including in the commits leading up to this, as well as earlier, in 569c186 (GitoxideLabs#1909). Nonetheless, it seems likely that some problems remain with some combinations of crates and features that are not currently exercised in the MSRV check. GitoxideLabs#1808 is most likely not yet fully fixed.
The MSRV was increased to 1.75 in 569c186 (#1909), and I've clarified the check and made it somewhat more robust in #2003, but this issue is most not yet fully fixed. How the CI job uses nightlyRegarding this from the issue description:
And #1808 (comment) (@Byron):
The MSRV was already a stable Rust version, and the The gitoxide/.github/workflows/msrv.yml Line 40 in ac5f33d
This command is easily misread, because To verify that this really installed two separate toolchains, a run log can be examined:
After installing both toolchains, it makes the MSRV the default: gitoxide/.github/workflows/msrv.yml Line 41 in ac5f33d
It uses the nightly toolchain to downgrade dependencies in gitoxide/.github/workflows/msrv.yml Line 42 in ac5f33d
This option is planned to eventually become available as
(Note that the "minimal" in Finally, it runs gitoxide/.github/workflows/msrv.yml Line 43 in ac5f33d
That ran: Lines 243 to 245 in ac5f33d
Those commands do not specify which toolchain to use. Since we do not have a Changes in #2003All the above code snippets, as well as the linked and excerpted CI log, are from the last commit strictly before the changes in #2003, which was just merged. However, the effects described above remain as they were, except that the commands are changed so they:
The Lines 248 to 250 in 9d0c809
#2003 contained various other changes (including some related to the MSRV), but those were the only changes to the behavior I specifically described above. Also, #2003 did not attempt to do anything related to unit tests,
|
Thank you for the exhaustive analysis and summary!
The binary isn't included in the MSRV right now so for consistency the |
Currently, the MSRV is:
gix/Cargo.toml
.github/workflows/msrv.yml
gix-commitgraph/CHANGELOG.md
stating:gix
(list?), according toSTABILITY.md
However,
gix
can only build on 1.77+, due to c-string literals, used in rusqlite/rusqlite#1483. The CI passes because it only runscargo check
, which does work on 1.74.Additionally, tests only build on 1.79+, due to rust-lang/rust#121346.
gix-macros/tests/momo/ux/error_if_ineffective.rs
fails on nightly versions. This appears to be due to differences in macro source location tracking on nightly versions.The text was updated successfully, but these errors were encountered: