-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Consolidate doc collision detection. #9526
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(rust-highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
May 31, 2021
@bors: r+ |
📌 Commit 81defa6 has been approved by |
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
Jun 1, 2021
☀️ Test successful - checks-actions |
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Jun 3, 2021
Update cargo 10 commits in e931e4796b61de593aa1097649445e535c9c7ee0..0cecbd67323ca14a7eb6505900d0d7307b00355b 2021-05-24 16:17:27 +0000 to 2021-06-01 20:09:13 +0000 - Configure hosts separately from targets when --target is specified. (rust-lang/cargo#9322) - Add some validation to rustc-link-arg (rust-lang/cargo#9523) - Implement suggestions for unknown features in workspace (rust-lang/cargo#9420) - Extract common `make_dep_path` to cargo_util (rust-lang/cargo#9529) - Add a note about rustflags compatibility. (rust-lang/cargo#9524) - Consolidate doc collision detection. (rust-lang/cargo#9526) - Add `--depth` option for `cargo-tree` (rust-lang/cargo#9499) - `cargo tree -e no-proc-macro` to hide procedural macro dependencies (rust-lang/cargo#9488) - Update to semver 1.0.0 (rust-lang/cargo#9508) - Update tar dependency to 0.4.35 (rust-lang/cargo#9517)
bors
added a commit
that referenced
this pull request
Jun 18, 2021
Relax doc collision error. #9526 moved the `cargo doc` output name collision code to be shared with the other collision detection code. However, the way it detected collisions wasn't quite the same, and started generating errors for situations that were just warnings before. It was intended that the code should behave the same, so this PR relaxes the checks to be more like the original code. (It's still not 100% the same, but should be close enough.) Closes #9564
ehuss
pushed a commit
to ehuss/cargo
that referenced
this pull request
Jun 22, 2021
…alexcrichton Relax doc collision error. rust-lang#9526 moved the `cargo doc` output name collision code to be shared with the other collision detection code. However, the way it detected collisions wasn't quite the same, and started generating errors for situations that were just warnings before. It was intended that the code should behave the same, so this PR relaxes the checks to be more like the original code. (It's still not 100% the same, but should be close enough.) Closes rust-lang#9564
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This removes the separate collision detection pass (in cargo_doc.rs) and uses the global collision detection instead. This removes the separate pass for running the resolver (which resulted in running the resolver four times every time
cargo doc
was run).The
--open
option needs to know which path to open, so this is passed in a roundabout way viaCompilation
. Since this method uses the root units, I added a sort on the roots so that the crate that is opened is consistent between runs. This results in some slight behavioral changes.This also makes the collision check slightly more stringent. The test
doc_multiple_targets_same_name
now generates an error instead of a warning because the old code did not check for collisions between libs and bins across packages (which should be very rare).