You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cargo hakari manage-deps currently adds the workspace-hack crate to all crates in the workspace. This means that even crates that have no dependencies now get a dependency on the workspace-hack crate.
If I understand correctly, the workspace-hack only needs to be added to crates that directly depend on one of the crates in the workspace-hack crate's dependencies. More clearly, the workspace hack depends on a set of third party crates S. The manage-deps step only needs to add the workspace hack to crates that directly depend on at least one member of S.
The benefit of this change would be that it reduces the footprint of using hakari.
Thoughts?
The text was updated successfully, but these errors were encountered:
Hi, thanks for the report! Sorry to have missed it earlier, I've been busy with other projects.
That's definitely an interesting idea. We don't do it automatically at the moment, but can you achieve it with traversal-excludes or final-excludes? Both of them should cause the crate to no longer be counted in cargo hakari manage-deps.
More clearly, the workspace hack depends on a set of third party crates S. The manage-deps step only needs to add the workspace hack to crates that directly depend on at least one member of S.
Hm, this is not quite true as you've specified it -- if a package has third-party dependencies for which there are transitive dependencies in S, it could need the workspace-hack for feature unification as well. This is pretty common with crates like syn -- few crates directly depend on it, but in large projects, many crates transitively depend on it.
cargo hakari manage-deps
currently adds the workspace-hack crate to all crates in the workspace. This means that even crates that have no dependencies now get a dependency on the workspace-hack crate.If I understand correctly, the workspace-hack only needs to be added to crates that directly depend on one of the crates in the workspace-hack crate's dependencies. More clearly, the workspace hack depends on a set of third party crates
S
. Themanage-deps
step only needs to add the workspace hack to crates that directly depend on at least one member ofS
.The benefit of this change would be that it reduces the footprint of using hakari.
Thoughts?
The text was updated successfully, but these errors were encountered: