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

Stabilize `-Z avoid-dev-deps` as `--minimal-cargo-lock` #5133

Open
infinity0 opened this Issue Mar 6, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@infinity0
Contributor

infinity0 commented Mar 6, 2018

#5012 will add a -Z avoid-dev-deps flag to avoid installing dev-dependencies in certain targets like install.

@alexcrichton thinks that "in the long run [this wants] to be something like --minimal-cargo-lock which prunes all non-relevant dependencies like platform-specific dependencies that don't apply, dev-deps if you're not building tests, etc."

@matklad

This comment has been minimized.

Member

matklad commented Jun 26, 2018

@infinity0

Clarification question: am I correct that cargo install currently avoids dev dependencies even if the flag is not specified? That is, this issue is specifically for cargo build command?

@infinity0

This comment has been minimized.

Contributor

infinity0 commented Jun 27, 2018

@matklad when I last touched that code, yes. the dev_dependencies_no_check test is for this.

@ignatenkobrain

This comment has been minimized.

Contributor

ignatenkobrain commented Aug 18, 2018

@infinity0 do you have some patch for this?

We wanted to not package some optional dependencies and hit this issue.

@ignatenkobrain

This comment has been minimized.

Contributor

ignatenkobrain commented Aug 18, 2018

\cc @keszybz

@ignatenkobrain

This comment has been minimized.

Contributor

ignatenkobrain commented Aug 19, 2018

and also deps for disabled features, I hope. Right?

@infinity0

This comment has been minimized.

Contributor

infinity0 commented Aug 20, 2018

@ignatenkobrain Cargo already carries this functionality as cargo build -Z avoid-dev-deps or cargo install (with no extra flags) but only for dev-dependencies, not optional dependencies or unused features or unused target-specific dependencies. No I don't have a patch for the other things I mentioned.

@ignatenkobrain

This comment has been minimized.

Contributor

ignatenkobrain commented Oct 15, 2018

@alexcrichton any chance to get someone to work on this? I'm pretty sure that all distributions which decide to package crates will get hit by this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment