Skip to content

Upload dependency kinds to the registry #939

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

Merged
merged 1 commit into from
Nov 24, 2014

Conversation

alexcrichton
Copy link
Member

This ensures that the registry understands whether dependencies are build
dependencies or dev dependencies.

Closes rust-lang/crates.io#38

let kind = match kind.as_ref().map(|s| s.as_slice()).unwrap_or("") {
"dev" => Kind::Development,
"build" => Kind::Build,
_ => Kind::Normal,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this could be "normal" => Kind::Normal, s => panic!("unknown kind: {}", s) to assist with future refactorings?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was actually hoping that this would help with future compatibility in that if an older version of cargo were used with a more recent version of the registry (with a newer kind available) that it would just interpret the dependency as a normal dependency rather than a special one. Not sure how useful that would be though...

This ensures that the registry understands whether dependencies are build
dependencies or dev dependencies.

Closes rust-lang/crates.io#38
bors added a commit that referenced this pull request Nov 24, 2014
This ensures that the registry understands whether dependencies are build
dependencies or dev dependencies.

Closes rust-lang/crates.io#38
@bors bors merged commit 3b5994e into rust-lang:master Nov 24, 2014
@alexcrichton alexcrichton deleted the issue-38 branch November 25, 2014 04:03
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

Successfully merging this pull request may close these issues.

Dev dependencies are listed as regular dependencies
3 participants