Skip to content
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

Try adding a minimal-versions test to CI #6757

Closed

Conversation

alexcrichton
Copy link
Member

This commit is an attempt to add another CI check for Wasmtime to ensure that the minimum version bounds on all of our dependencies are accurate. This is not a stable feature of Cargo and thus requires usage of nightly. Additionally one of the reasons it's not stable is that the DX is not great as many minimal-versions errors come from transitive dependencies that we can't do anything about. Nevertheless I figure it might be good to try out having it on CI and see how it fares.

This is inspired by #6755 where we picked up a dependency on a newer version of system-interface but forgot to update the minimum version bound. Whether or not this prevents the issue or causes too many headaches is I think yet to be seen.

This commit is an attempt to add another CI check for Wasmtime to ensure
that the minimum version bounds on all of our dependencies are accurate.
This is not a stable feature of Cargo and thus requires usage of
nightly. Additionally one of the reasons it's not stable is that the DX
is not great as many minimal-versions errors come from transitive
dependencies that we can't do anything about. Nevertheless I figure it
might be good to try out having it on CI and see how it fares.

This is inspired by bytecodealliance#6755 where we picked up a dependency on a newer
version of `system-interface` but forgot to update the minimum version
bound. Whether or not this prevents the issue or causes too many
headaches is I think yet to be seen.
@alexcrichton alexcrichton marked this pull request as ready for review July 21, 2023 16:22
@alexcrichton alexcrichton requested a review from a team as a code owner July 21, 2023 16:22
@alexcrichton alexcrichton requested review from itsrainy and removed request for a team July 21, 2023 16:22
@alexcrichton
Copy link
Member Author

One thing I find quite unfortunate about this is the need to update [email protected]. Guessing that 1.x.x track version number is not easy, and I'm not sure if that current number is going to be the same a few months from now. I've not use -Z minimal-versions myself so I don't know how this will fare on CI over time.

One option I think is to simply not have this PR as well. It's a pretty niche issue that likely won't crop up much, so I'm not sure what to do about it.

Copy link
Contributor

@itsrainy itsrainy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! What will this look like when it fails? Is there a place we could add a message saying "you probably forgot to update X dependency", or will that be apparent from the cargo check output?

@alexcrichton
Copy link
Member Author

My guess is that failures may look a little obscure. One class of failures can show up in transitive dependencies which can look quite bizarre. Other failures though may be more obvious in that a PR may update usage of a crate and the error from CI would say "this function isn't available" which may serve as a reminder to update the minimum version requirement.

Either way I can document more in the CI configuration, although my guess is that few will read that before posting on zulip "it's broke why?", but worth a shot!

@alexcrichton
Copy link
Member Author

I'm going to close this for now and we can always reconsider if it crops up again.

@alexcrichton alexcrichton deleted the check-minimal-versions branch February 22, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants