Skip to content
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

[hakari] [feature-request] Support non-workspace crates #316

Open
RalfJung opened this issue Sep 12, 2024 · 0 comments
Open

[hakari] [feature-request] Support non-workspace crates #316

RalfJung opened this issue Sep 12, 2024 · 0 comments

Comments

@RalfJung
Copy link

RalfJung commented Sep 12, 2024

I have a use for hakari (or something very much like it) in a non-workspace crate: some of my [dev-dependencies] cause features to be enable for crates that also appear (transitively) as regular [dependencies]. This means that even after I did cargo test, which builds the binary and test targets, if I now do cargo run that takes a minute because cargo re-builds the binary target with a different feature set for one of its dependencies. For a while I tried to manually add more [dependencies] to avoid this, but this regresses very easily (I never figured out a good way to have CI check this) and it's quite tedious to figure out what one has to add. So, would be great if hakari could automate that. :-)

However, right now when I try to enable hakari in my crate, that fails because there is no workspace:

Error: 
   0: for path /home/r/src/rust/miri/Cargo.toml, [workspace] section not found

Would it make sense to support hakari in a non-workspace setting as well? My plan was to add the "hack" crate as a path dependency to my main crate, which AFAIK should work fine even when there is no workspace.

EDIT: I have now found a different solution for Miri. But this could still be useful for someone else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant