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

Migrate package include/exclude to gitignore patterns. #6924

Merged
merged 3 commits into from
May 10, 2019

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented May 10, 2019

This moves to the next phase of #4268.

This also includes a few more changes which can be removed if desired:

  • Add support for ! negate gitignore patterns.
  • Add a warning if both package.include and package.exclude are specified.

@rust-highfive
Copy link

r? @nrc

(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 May 10, 2019
@ehuss
Copy link
Contributor Author

ehuss commented May 10, 2019

I'm on the fence about describing the gitignore patterns in the docs. It takes up a little more space than I'd like, but I think it is useful to include.

@alexcrichton
Copy link
Member

This looks great to me, thanks for all the new tests and for pushing this forward! I personally feel like the current state of the docs is best where it links to the reference and otherwise jots down a few notes for convenience.

@bors: r+

@bors
Copy link
Collaborator

bors commented May 10, 2019

📌 Commit d3472ce5ebe2bb88097d90d081fc757f6eab48f6 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 May 10, 2019
@bors
Copy link
Collaborator

bors commented May 10, 2019

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout include-exclude-patterns (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self include-exclude-patterns --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging tests/testsuite/package.rs
CONFLICT (content): Merge conflict in tests/testsuite/package.rs
Auto-merging src/doc/src/reference/manifest.md
Auto-merging src/cargo/sources/path.rs
CONFLICT (content): Merge conflict in src/cargo/sources/path.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors bors added S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 10, 2019
@bors
Copy link
Collaborator

bors commented May 10, 2019

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

@ehuss ehuss force-pushed the include-exclude-patterns branch from d3472ce to db3328e Compare May 10, 2019 14:50
@ehuss
Copy link
Contributor Author

ehuss commented May 10, 2019

@bors r=alexcrichton

@bors
Copy link
Collaborator

bors commented May 10, 2019

📌 Commit db3328e 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-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. labels May 10, 2019
@bors
Copy link
Collaborator

bors commented May 10, 2019

⌛ Testing commit db3328e with merge ceb1389...

bors added a commit that referenced this pull request May 10, 2019
Migrate package include/exclude to gitignore patterns.

This moves to the next phase of #4268.

This also includes a fdew more changes which can be removed if desired:
- Add support for `!` negate gitignore patterns.
- Add a warning if both package.include and package.exclude are specified.
@bors
Copy link
Collaborator

bors commented May 10, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: alexcrichton
Pushing ceb1389 to master...

@bors bors merged commit db3328e into rust-lang:master May 10, 2019
bors added a commit to rust-lang/rust that referenced this pull request May 16, 2019
Update cargo

17 commits in 759b6161a328db1d4863139e90875308ecd25a75..c4fcfb725b4be00c72eb9cf30c7d8b095577c280
2019-05-06 20:47:49 +0000 to 2019-05-15 19:48:47 +0000
- tests: registry: revert readonly permission after running tests. (rust-lang/cargo#6947)
- Remove Candidate (rust-lang/cargo#6946)
- Fix for "Running cargo update without a Cargo.lock ignores arguments" rust-lang/cargo#6872 (rust-lang/cargo#6904)
- Fix a minor mistake in the changelog. (rust-lang/cargo#6944)
- Give a better error message when crates.io requests time out (rust-lang/cargo#6936)
- Re-enable compatibility with readonly CARGO_HOME (rust-lang/cargo#6940)
- Fix version of `ignore`. (rust-lang/cargo#6938)
- Stabilize offline mode. (rust-lang/cargo#6934)
- zsh: Add doc options to include non-public items documentation (rust-lang/cargo#6929)
- zsh: Suggest --lib option as binary template now the default (rust-lang/cargo#6926)
- Migrate package include/exclude to gitignore patterns. (rust-lang/cargo#6924)
- Implement the Cargo half of pipelined compilation (take 2) (rust-lang/cargo#6883)
- Always include `Cargo.toml` when packaging. (rust-lang/cargo#6925)
- Remove unnecessary calls to masquerade_as_nightly_cargo. (rust-lang/cargo#6923)
- download: fix "Downloaded 1 crates" message (crates -> crate) (rust-lang/cargo#6920)
- Changed RUST_LOG usage to CARGO_LOG to avoid confusion. (rust-lang/cargo#6918)
- crate download: don't print that a crate was the largest download if it was the only download (rust-lang/cargo#6916)
@behnam
Copy link
Contributor

behnam commented May 23, 2019

Thanks for working on this, @ehuss! :)

bors added a commit that referenced this pull request Jul 23, 2019
Remove include/exclude glob warning.

This removes the warning when a package include/exclude pattern produces different results from glob vs gitignore.

The pre-warnings were added in 1.21 (released 2017-10-12) #4270.
The migration was done in 1.36 (released 2019-07-04) #6924.
This will remove the warnings in 1.38 (to be released 2019-09-26).

Closes #4268
@ehuss ehuss added this to the 1.36.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
Development

Successfully merging this pull request may close these issues.

6 participants