-
Notifications
You must be signed in to change notification settings - Fork 10
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
generate workspace dependencies #7
Comments
Thanks for the question! There seem to be two parts to this: 1. Do workspace dependencies mean feature unification is no longer important?As far as I can tell, defining workspace dependencies doesn't obviate the need for workspace-hack. Since not every crate enables every workspace dependency, feature unification might still result in different feature sets for different workspace crates through transitive dependencies. Thus, in order to serve the goals of hakari, some sort of extra feature unification is still going to be necessary. 2. Can cargo-hakari write to the workspace dependency list rather than to a separate workspace-hack package?As far as I can tell, this is infeasible as well. There are two big reasons for it, in my mind:
Because of these two issues, I believe that the current implementation is still the best one even in the face of workspace dependencies. Hope this helps! |
One improvement that could potentially happen is: what if the workspace-hack Cargo.toml tried to use workspace dependencies as much as possible. That would be an interesting project, though it's not one I plan to work on at the moment. |
Similar to oxidecomputer/crucible#956, this adds a workspace-hack package managed by cargo-hakari. This should massively cut down on incremental build times. `cargo hakari` doesn't yet support writing out `workspace-hack` dependency lines using workspace inheritance (guppy-rs/guppy#7), so skip over it in the lint. Reverting this change can be done by following the instructions at https://docs.rs/cargo-hakari/latest/cargo_hakari/#disabling-and-uninstalling.
Cargo now supports specify
workspace.dependencies
. Is it possible forcargo-hakari
to generateworkspace.dependencies
so thatworkspace-hack
isn't needed anymore? 🤔https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html#cargo-improvements-workspace-inheritance-and-multi-target-builds
The text was updated successfully, but these errors were encountered: