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

Better support for license-file. #7905

Merged
merged 2 commits into from
Feb 20, 2020
Merged

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Feb 19, 2020

This adds some changes to how cargo package and cargo publish handle the license-file field. This also incorporates some refactoring which hopefully makes the code a little clearer and straightforward, but which also resulted in some minor behavior changes.

  • Warn if license-file points to a non-existent file.
  • Automatically include license-file, even if it is not listed in the package.include list (similar to how Cargo.toml/lock are automatically included).
  • If license-file points outside of the package root, copy the file to the package root (and rewrite the field in Cargo.toml).
  • Files are now sorted when archived.
  • Archiving: Cargo.toml.orig is explicitly printed where before it did not report that.
  • cargo package --list now shows Cargo.toml.orig where before it was not reported.

Closes #3537
Closes #7830

@rust-highfive
Copy link

r? @Eh2406

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 19, 2020
@ehuss ehuss force-pushed the license-file-updates branch from 942f4c7 to efed107 Compare February 19, 2020 20:32
@alexcrichton
Copy link
Member

@bors: r+

Nice!

@bors
Copy link
Contributor

bors commented Feb 19, 2020

📌 Commit efed107648156d6c6f76bc89c58062bddbe30c62 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 19, 2020
@bors
Copy link
Contributor

bors commented Feb 19, 2020

⌛ Testing commit efed107648156d6c6f76bc89c58062bddbe30c62 with merge df18fa62b808db4f492d4a1665e91c6334d1215c...

@bors
Copy link
Contributor

bors commented Feb 19, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 19, 2020
@bors
Copy link
Contributor

bors commented Feb 20, 2020

☔ The latest upstream changes (presumably #7820) made this pull request unmergeable. Please resolve the merge conflicts.

@ehuss ehuss force-pushed the license-file-updates branch from efed107 to 9088770 Compare February 20, 2020 21:27
@ehuss
Copy link
Contributor Author

ehuss commented Feb 20, 2020

@bors retry
Failed to fetch https://packages.microsoft.com/ubuntu/16.04/prod/dists/xenial/main/binary-amd64/Packages Writing more data than expected (670139 > 669553)

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 20, 2020
@ehuss
Copy link
Contributor Author

ehuss commented Feb 20, 2020

@bors retry
Failed to fetch https://packages.microsoft.com/ubuntu/16.04/prod/dists/xenial/main/binary-amd64/Packages Writing more data than expected (670139 > 669553)

@ehuss ehuss closed this Feb 20, 2020
@ehuss ehuss reopened this Feb 20, 2020
@ehuss
Copy link
Contributor Author

ehuss commented Feb 20, 2020

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Feb 20, 2020

📌 Commit 9088770 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Feb 20, 2020

⌛ Testing commit 9088770 with merge 8d4db3e...

@bors
Copy link
Contributor

bors commented Feb 20, 2020

☀️ Test successful - checks-azure
Approved by: alexcrichton
Pushing 8d4db3e to master...

@bors bors merged commit 8d4db3e into rust-lang:master Feb 20, 2020
bors added a commit to rust-lang/rust that referenced this pull request Feb 22, 2020
Update cargo

11 commits in e02974078a692d7484f510eaec0e88d1b6cc0203..e57bd02999c9f40d52116e0beca7d1dccb0643de
2020-02-18 15:24:43 +0000 to 2020-02-21 20:20:10 +0000
- fix most remaining clippy findings (mostly redundant imports) (rust-lang/cargo#7912)
- Add -Zfeatures tracking issues. (rust-lang/cargo#7917)
- Use rust-lang/rust linkchecker on CI. (rust-lang/cargo#7913)
- Clean up code mostly based on clippy suggestions (rust-lang/cargo#7911)
- Add an option to include crate versions to the generated docs (rust-lang/cargo#7903)
- Better support for license-file. (rust-lang/cargo#7905)
- Add new feature resolver. (rust-lang/cargo#7820)
- Switch azure to macOS 10.15. (rust-lang/cargo#7906)
- Modified the help information of cargo-rustc (rust-lang/cargo#7892)
- Update for nightly rustfmt. (rust-lang/cargo#7904)
- Support `--config path_to_config.toml` cli syntax. (rust-lang/cargo#7901)
bors added a commit that referenced this pull request Apr 28, 2020
Allow `cargo package --list` even for things that don't package.

`cargo package --list` was changed in #7905 to generate `Cargo.lock` earlier. If there is a problem, then it would fail where previously it would succeed. This changes it so that file generation is deferred until after `--list`.

This also changes it so that the "dependencies must have a version" check is deferred until after `--list` as well.

Closes #8151
ehuss pushed a commit to ehuss/cargo that referenced this pull request May 6, 2020
Allow `cargo package --list` even for things that don't package.

`cargo package --list` was changed in rust-lang#7905 to generate `Cargo.lock` earlier. If there is a problem, then it would fail where previously it would succeed. This changes it so that file generation is deferred until after `--list`.

This also changes it so that the "dependencies must have a version" check is deferred until after `--list` as well.

Closes rust-lang#8151
@ehuss ehuss added this to the 1.43.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
5 participants