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

Add dependency header in default Cargo.toml #2126

Merged
merged 1 commit into from
Nov 10, 2015

Conversation

johshoff
Copy link
Contributor

@johshoff johshoff commented Nov 8, 2015

Almost any project beyond "hello world" will have some dependencies.
Including the [dependencies] header by default makes this slightly
simpler.

For new users of the language, this can potentially save some
frustration since crates.io currently does not mention the header, just
the line that goes beneath it.

For all users, this makes adding the first dependency to a project less
of a special case than to subsequent dependencies.

Almost any project beyond "hello world" will have some dependencies.
Including the `[dependencies]` header by default makes this slightly
simpler.

For new users of the language, this can potentially save some
frustration since crates.io currently does not mention the header, just
the line that goes beneath it.

For all users, this makes adding the first dependency to a project less
of a special case than to subsequent dependencies.
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @wycats (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@steveklabnik
Copy link
Member

Yeah, I've been thinking about this too. I think I'm 👍

@alexcrichton
Copy link
Member

I wonder if it may be a good idea as well to pre-generate an annotated Cargo.toml? For example this could provide a commented out example of how to depend on some common crates like libc or rand. It could also just have an example of "Here's how you depend on a git repo" or "here's how you depend on crates.io" with a dummy package.

@steveklabnik
Copy link
Member

I'm torn. We did that for a while with Bundler, but then you end up just deleting it anyway....

@alexcrichton
Copy link
Member

Hm that's true, seems fine in that case to me!

@bors: r+ e708411

bors added a commit that referenced this pull request Nov 10, 2015
Almost any project beyond "hello world" will have some dependencies.
Including the `[dependencies]` header by default makes this slightly
simpler.

For new users of the language, this can potentially save some
frustration since crates.io currently does not mention the header, just
the line that goes beneath it.

For all users, this makes adding the first dependency to a project less
of a special case than to subsequent dependencies.
@bors
Copy link
Contributor

bors commented Nov 10, 2015

⌛ Testing commit e708411 with merge 6026a18...

@bors
Copy link
Contributor

bors commented Nov 10, 2015

@bors bors merged commit e708411 into rust-lang:master Nov 10, 2015
@johshoff johshoff deleted the default_dependency_header branch November 11, 2015 15:34
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.

6 participants