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

Why is --optional mutually exclusive with --build and --dev? #85

Closed
jimmycuadra opened this issue Apr 15, 2016 · 2 comments · Fixed by #494
Closed

Why is --optional mutually exclusive with --build and --dev? #85

jimmycuadra opened this issue Apr 15, 2016 · 2 comments · Fixed by #494

Comments

@jimmycuadra
Copy link

--optional      Add as an optional dependency (for use in features). This does not work
                for `dev-dependencies` or `build-dependencies`.

Why is this? Several of my projects have a build dependency that is optional, and I always have to move things around manually since cargo add has this limitation.

@killercup
Copy link
Owner

Does cargo allow optional dev/build dependencies now? When I implemented this featured, it didn't.

cf. rust-lang/cargo#1596

@jimmycuadra
Copy link
Author

Oh, interesting. I think I've only tried to do it with build dependencies, and it definitely works for that. (Here's an example.) Maybe Cargo only disallows optional dependencies for dev dependencies.

@killercup killercup added this to backlog in cargo-worlddomination Jul 1, 2017
epage added a commit to epage/cargo-edit that referenced this issue Sep 16, 2021
I've not verified assumptions with other conflicts.

Fixes killercup#85
ordian pushed a commit that referenced this issue Sep 16, 2021
I've not verified assumptions with other conflicts.

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

Successfully merging a pull request may close this issue.

2 participants