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

Default exclude list for cargo --new #4262

Closed
behnam opened this issue Jul 8, 2017 · 6 comments · Fixed by #4272
Closed

Default exclude list for cargo --new #4262

behnam opened this issue Jul 8, 2017 · 6 comments · Fixed by #4272

Comments

@behnam
Copy link
Contributor

behnam commented Jul 8, 2017

It recently came up that cargo packages are not expected to publish tests, in addition to other development-related materials. (servo/unicode-bidi#43)

So, the question is shouldn't cargo --new have the exclude list already populated with test/*, banches/*, etc?

Having it would make publishing new crates faster by helping newcomers with getting it right easier and learning what needs to be done for publishing.

What do you think?

@steveklabnik
Copy link
Member

steveklabnik commented Jul 9, 2017

It recently came up that cargo packages are not expected to publish tests,

I think that's a bit strong. I've never heard of anyone doing this until this thread!

@alexcrichton
Copy link
Member

Yeah I don't think that we'd want to do this by default, some crates have no problem publishing tests while others have megabytes of tests that don't need to be published. I wouldn't say there's a concrete recommendation one way or the other here.

@behnam
Copy link
Contributor Author

behnam commented Jul 10, 2017

Cool! So the original assumption here was my misunderstanding of the common practices. Do you think it's worth mentioning this somewhere in the docs? Where would be a good place for it?If so, I can try submitting a PR for that. Otherwise, we can just close this then.

@alexcrichton
Copy link
Member

I'm always fine with mentioning stuff in the docs, although I don't know offhand where this'd go. Somewhere in src/doc most likely, so feel free to throw it in there if you find an appropriate place.

@behnam
Copy link
Contributor Author

behnam commented Jul 11, 2017

I'm going to write up a sentence for this section: http://doc.crates.io/crates-io.html#before-publishing-a-new-crate

@alexcrichton
Copy link
Member

👍

behnam added a commit to behnam/rust-cargo that referenced this issue Jul 11, 2017
bors added a commit that referenced this issue Jul 12, 2017
[doc/crates-io] Add text about packaging tests/benches

Fixes <#4262>
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 a pull request may close this issue.

3 participants