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

Use Cargo workspace inheritance to reduce Cargo.toml duplication #498

Closed
edmorley opened this issue Sep 22, 2022 · 2 comments · Fixed by #500
Closed

Use Cargo workspace inheritance to reduce Cargo.toml duplication #498

edmorley opened this issue Sep 22, 2022 · 2 comments · Fixed by #500

Comments

@edmorley
Copy link
Member

Rust 1.64's Cargo ships with a new workspace inheritance feature:
https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html#cargo-improvements-workspace-inheritance-and-multi-target-builds

Amongst other things this allows for specifying the libcnb version once in the repo root Cargo.toml and then having that be used by all crates, which (along with dependency inheritance) would simplify the release process (and also make the check-versions CI check redundant).

It's not clear whether we'd need to bump the MSRV to 1.64, or whether newer Cargo is only needed when working on this repository itself (it's possible the published crates might use the resolved value and so work with older Cargo). Running cargo package locally and inspecting the resultant archives should be able to answer that.

@Malax
Copy link
Member

Malax commented Sep 23, 2022

I think we still want the check-versions check since nothing prevents you from not using the workspace version in a package.

@edmorley
Copy link
Member Author

edmorley commented Sep 23, 2022

True, though I wonder if it's worth paying the cost (in terms of waiting for checks and having that check clutter up the CI status list) for that given adding new crates is pretty rare? We also don't have a check to ensure that the other workspace attributes are consistent (eg rust-version) for example.

It feels to me like the new workspace feature adds just enough guard rails here that we no longer need to worry about this being an issue moving forwards?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants