-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Compatibility with workspace inheritance #590
Comments
Yes, absolutely! I hope to take on proper workspace support in the next version. |
Any guidance/help on this one?? |
As in: you want to help with implementing this, or how you can workaround it right now? :) |
I want to implement it |
Awesome! Before implementing anything though, we'll need to think about what the proper workspace support will entail. For this, I wanted to first look in detail at how Cargo handles workspaces (on a user and implementation level), and then what other cargo plugins currently do. Probably we'll want to mimic Cargo where we can. I'll try to find some time this week to think this through and write it down. |
Unless I'm missing some complexity, this issue would just be inheriting whatever is specified at the workspace level in each crate. Then #295 might be slightly more involved — i.e. does |
I think two things need to happen.
Considering (1), the Cargo book states:
In other words: paths to workspace member crates are always children, so e.g., this would be invalid:
This makes the problem much simpler; if members could have been anywhere relative to the workspace, well, you might've needed to seach your complete file system to find a workspace from a member crate (since the workspace points to its children, but not the reverse). Now we can simply recursively enumerate parent Cargo manifests, and check whether there is a workspace, and whether we're a member of it: In pseudo code:
The second part (2), is simply replacing the inherited values, in the respective |
@gautamprikshit1 Do you still want to give it a shot? |
I really don't see any reason why cargo-msrv should reimplement the Cargo config resolution, when it can just obtain the resolved configuration via The only obstacle is that the Once that type is fixed in |
That would be wonderful 😄. Thanks! |
I'm just getting back into Rust after a long hiatus, so please forgive me if this is silly. But doesn't |
@not-my-profile hej! I see that oli-obk/cargo_metadata#244 has been merged. Do you still remember how you would fix the workspace issue with that now done? Update: Oh! I see that you made that PR yourself.. Anyways, if you're still active, maybe I can help? |
I think to solve this issue, we need:
Feel free to submit a PR; I won't have time to implement this myself in the next week or so, but am happy to help or review a PR. |
Hey, was just wondering on the status of this issue now? If it's not on anyone's radar at the moment, I can take a shot at implementing a PR to push this over the finish line 🙂 |
I don't think anyone is working on thus right now :) |
I think we can close, thanks to #882 |
Hello. |
Yikes, that should've worked. |
Related to #295, but I think not the same.
Currently running
cargo msrv verify
on https://github.com/prql/prql withinprql-compiler
raises an error:I think that's because we use workspace inheritance, taking the rust version from the workspace.
Is that something that could be supported?
Thanks!
The text was updated successfully, but these errors were encountered: