Testing MSRV in a mixed edition workspace

In RustCrypto we have a strict MSRV policy which considers MSRV updates a breaking change. To enforce it we test MSRV as part of our CI. Now some of our crates migrate to 2021 edition, while others stay on 2018 for now.

Let's say we have crates foo and bar in a single workspace, the former is on edition 2018 with MSRV 1.41, while the latter is on edition 2021 and MSRV 1.56. We can not test MSRV for foo since cargo tries to parse manifests for all packages in the workspace, encounters edition = "2021" and fails with "failed to parse the edition key".

Right now we have to keep all 2021 edition crates in their own workspace using:

members = ["."]

Obviously, it's far from ideal.

Can you recommend a better solution for this problem? Maybe it's worth to relax rules around edition parsing in the case if the crate in question does not get build?

The edition of a crate may in the future affect dependency resolution. (It already does when not using workspaces, the 2021 edition defaults to dependency resolver version 2.) Dependency resolution has to happen for the entirety of the workspace. Ignoring unknown editions of other crates may thus cause dependency resolution for the crates you do want to compile to change. In the future there may also be other things added.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.