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

Modify CI to run directed-minimal-versions #41

Merged
merged 1 commit into from
Dec 2, 2023

Conversation

Qkessler
Copy link
Contributor

@Qkessler Qkessler commented Dec 2, 2023

Change Summary

-Zdirected-minimal-versions will run with the minimal versions of the specified direct dependencies (of rune and all workspace crates), but the maximum indirect dependencies. This means that we won't fail CI for any issues our direct deps have with -Zminimal-versions.

Additionally, fixed some of the versions that were selected for syn, quote and proc-macro2. It's recommended to use qualified versions, to avoid issues with minimal versions.

Risks associated with this change

I don't really see a risk of taking a dependency on-Zdirected-minimal-versions. Here's the documentation, and why I think it's particularly useful for our crate (s, as it counts the workspace). Taiki Endo is also the creator of cargo-hack, which we also plan to use here.

When a Cargo.lock file is generated, the -Z direct-minimal-versions flag will resolve the dependencies to the minimum SemVer version that will satisfy the requirements (instead of the greatest version) for direct dependencies only.

The intended use-case of this flag is to check, during continuous integration, that the versions specified in Cargo.toml are a correct reflection of the minimum versions that you are actually using. That is, if Cargo.toml says foo = "1.0.0" that you don’t accidentally depend on features added only in foo 1.5.0.

Indirect dependencies are resolved as normal so as not to be blocked on their minimal version validation.

source

Testing

Ran CI on my own commit on my fork, you can find the test run here: https://github.com/Qkessler/rune/actions/runs/7072080397/job/19250513320

`-Zdirected-minimal-versions` will run with the minimal versions of the
specified direct dependencies (of rune and all workspace crates), but
the maximum indirect dependencies. This means that we won't fail CI for
any issues our direct deps have with `-Zminimal-versions`.

Additionally, fixed some of the versions that were selected for syn,
quote and proc-macro2. It's recommended to use qualified versions, to
avoid issues with minimal versions.
@CeleritasCelery CeleritasCelery merged commit 3d2ca3d into CeleritasCelery:master Dec 2, 2023
13 checks passed
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