Add a CI job to check the minimal version constraints of direct dependencies #124
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm seeing a few issues that I will fix in a minute, but I want to make sure this test would catch them in CI (if CI is allowed to run on my PR)Ok that has to be approved, but it turns out CI as-is wouldn't have caught my issue anyway, but I'm including it here because it caught a different issue... keep reading for more explanation but I'm happy to take out whatever commits you'd like me to.What happened
I upgraded a project I work on that uses
croaring
to move off of the yanked version1.0.0
. I did this by runningcargo update -p croaring
, forgetting thatcroaring-sys
would need an update too (and also forgetting to pass--aggressive
).The project's build started failing with these errors:
So really,
croaring
v1.0.1 depends on at least v1.1.0 ofcroaring-sys
, butcargo update -p croaring
didn't take care of that becausecroaring
specifiescroaring-sys version = "1.0.0"
so the existingcroaring-sys
v1.0.0 in my project's lockfile was compatible.I've corrected this problem by updating the version specified in
croaring
's Cargo.toml to becroaring-sys version = "1.1.0"
.I was hoping that building with cargo's unstable minimal versions flag would prevent this from reoccurring in the future, but it looks like because of the
path
dependency forcroaring-sys
that's used when building in this repo, cargo uses whatever version is at thepath
and not the minimal version someone using the crates from crates.io would experience :( I'm going to make sure this issue was raised somewhere in the discussions of the cargo feature.But when I ran with
cargo +nightly check -Zdirect-minimal-versions
, it did report a problem withbyteorder
, so I have included in this PR a commit to enable this check in CI and a commit to properly specify the minimum requiredbyteorder
version.I'm happy to make any changes you'd like, please let me know!