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

cargo chef prepare always looks at dev dependencies, but those may not be relevant if building in release mode #114

Open
itamarst opened this issue Feb 16, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@itamarst
Copy link

cargo chef prepare is failing for me because it's looking for a dev dependency it can't find during a Docker build. Since I am going to build in release mode, looking for dev dependencies seems unnecessary.

I can work around it, but it would be nice if cargo chef prepare had a --release flag corresponding to cargo chef cook --release which just skipped any dev dependencies.

@LukeMathWalker
Copy link
Owner

The release profile is an orthogonal concept to development dependencies - e.g. you can build your test using the --release flag.
We could enhance cargo-chef to determine if tests are included in the target and ignore dev-dependencies accordingly.

@itamarst
Copy link
Author

Ah, right. Anyway as I said, this isn't actually something I need, but it seems useful. And it might speed up builds? So seems like a nice to have at least.

@LukeMathWalker LukeMathWalker added the enhancement New feature or request label Feb 18, 2022
@dreamerlzl
Copy link

dreamerlzl commented Dec 24, 2023

This feature would be very helpful if a project has a dev-dependency on the migrations directory due to the use of sqlx or seaorm.

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

No branches or pull requests

3 participants