-
Notifications
You must be signed in to change notification settings - Fork 1
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
Patch dependencies whose latest versions are no longer compatible with 1.75 #42
Conversation
…h 1.75 Signed-off-by: Michael X. Grey <[email protected]>
@koonpeng this PR fixes a CI failure related to a dependency problem, but it seems there's still a test failure related to a panic for the Join operation. I'd suggest merging this in despite the CI still not passing, and then you can continue working on the implementation of Join to fix the remaining panic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we pin home
in cargo.toml instead of this?
Pinning and committing it inside the The specific version of There's a more detailed explanation of the same problem here. In the ros2-rust case we found a simpler solution, but that simpler solution doesn't apply to |
After reading up on the cause of the issue and exploring various solutions, I think the best approach would be to add
|
Our support for 1.75 is specifically targeted at environments where all available crates are selected to be compatible with Rust 1.75, e.g. a Debian-based crate registry, which is what we expect the build farm to be like if/when it rolls out official support for Rust crates. In such a registry the I am not trying to accommodate users who have 1.75 installed locally and are trying to use cargo without running I'm surprised that Please give one more round of consideration to this approach. |
I think if we ever get a dependency that no longer compiles on 1.75, then we need to consider maintaining multiple branches. For the case of a third party cargo registry, this shouldn't affect them as they should not see the updated dependency. But I think that if we are testing for that scenario, then we should test with that third party registry instead of trying to replicate that from crates.io, debian, being known to do a lot of patching on their repository, home 0.5.9 might not be the same home 0.5.9 on the debian repository. debian might even use home 0.5.11 but patch it so it compiles on rustc 1.75. In the end, I don't think there is any good solution until either cargo supports a MSRV aware resolver (it is scheduled on the next release), or when we can test with the third party registry. |
That registry doesn't exist yet. It's a hypothetical target, so we have no choice but to attempt to replicate it from crates.io. The alternative would be to not try at all, in which case we may find ourselves in a year needing to claw back a dependency or a new language feature that could have been avoided if we were aware that it was going to be incompatible with 1.75.
We don't need to care about exactly what version they use, what we need is for our dependencies specifically inside of the 1.75 workflow to be compatible with Rust version 1.75 so we can ensure that new language features don't crawl into our own code and also ensure that some API-comaptible version of each of our dependencies is compatible with 1.75. This PR does not embody a perfect solution to the problem, but it is the only feasible approach to damage minimization that anyone has put forward so far. In your PR #27 you've added several new dependencies, but also added If you're strongly opposed to the approach in this PR and can't find an alternative that meets the needs of giving some assurance that we'll remain compatible with the environment that we expect the build farm to provide, then I can add this topic to the agenda of the next PMC meeting. There the committee can discuss whether the hypothetical target of the build farm is important and what an acceptable set of trade-offs would be for targeting it. |
I think there are pros and cons to both ways, the third party registry would not contain packages that can't be build on 1.75, and because MSRV is a minor change, even if a new update bumps it and it no longer builds on 1.75 without I think something to consider is setting up a separate repo that keep tracks of crates that potentially breaks on the build farm, maybe provide a github action to "build on the build farm" (or what the environment would look like when it is ready). Technically this breakage would affect any crates that transitively depends on I guess for now what we can do is to move the patching to a script, |
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
That's a good idea. As you saw I've updated the PR with this approach. I've also removed |
This PR attempts to fix the CI for version 1.75, locking down specific versions of dependencies whose latest versions are no longer compatible.