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

Fix panic with doc collision orphan. #9142

Merged
merged 1 commit into from
Feb 5, 2021
Merged

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Feb 5, 2021

As I feared, the collision removal added in #9077 caused problems due to orphans left in the unit graph. Ironically, it was the collision warning detection code which failed, as it iterates over all the keys of the graph.

The solution is to remove all orphans from the graph after collisions have been removed.

Fixes #9136

@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 5, 2021
@Eh2406
Copy link
Contributor

Eh2406 commented Feb 5, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Feb 5, 2021

📌 Commit 5ebb605 has been approved by Eh2406

@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 5, 2021
@bors
Copy link
Contributor

bors commented Feb 5, 2021

⌛ Testing commit 5ebb605 with merge 90b6fa8...

@bors
Copy link
Contributor

bors commented Feb 5, 2021

☀️ Test successful - checks-actions
Approved by: Eh2406
Pushing 90b6fa8 to master...

@bors bors merged commit 90b6fa8 into rust-lang:master Feb 5, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Feb 10, 2021
Update cargo

5 commits in 34170fcd6e0947808a1ac63ac85ffc0da7dace2f..ab64d1393b5b77c66b6534ef5023a1b89ee7bf64
2021-02-04 15:52:52 +0000 to 2021-02-10 00:19:10 +0000
- Allow `true` and `false` as options for `strip` option (rust-lang/cargo#9153)
- Change git dependencies to use `HEAD` by default (rust-lang/cargo#9133)
- appendix auth gcm link to new repo (which is xplat) (rust-lang/cargo#9152)
- Fix warnings of the new non_fmt_panic lint (rust-lang/cargo#9148)
- Fix panic with doc collision orphan. (rust-lang/cargo#9142)
ehuss pushed a commit to ehuss/cargo that referenced this pull request Feb 22, 2021
Fix panic with doc collision orphan.

As I feared, the collision removal added in rust-lang#9077 caused problems due to orphans left in the unit graph. Ironically, it was the collision warning detection code which failed, as it iterates over all the keys of the graph.

The solution is to remove all orphans from the graph after collisions have been removed.

Fixes rust-lang#9136
@ehuss ehuss mentioned this pull request Feb 22, 2021
bors added a commit that referenced this pull request Feb 22, 2021
[beta] backports for 1.51

Beta backports for the following:

* Fix panic with doc collision orphan. (#9142)
    * This is an important regression that is fairly easy to hit.
* Do not exit prematurely if anything failed installing. (#9185)
    * This is not a regression, but I think an important fix.
* Add schema field to the index (#9161)
    * This is only the first commit from the PR which checks for the `v` field in the index, and skips entries that are not understood. The reason to backport is to get this in as early as possible so that if we do decide to start using it in the future, it works as early as possible.  This otherwise doesn't do anything, so I think it should be safe.
* Fix warnings of the new non_fmt_panic lint (#9148)
    * Fixes CI for a new warning in nightly.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 24, 2021
[beta] Update cargo

Backport of rust-lang/cargo#9196:

* Fix panic with doc collision orphan. (rust-lang/cargo#9142)
* Do not exit prematurely if anything failed installing. (rust-lang/cargo#9185)
* Add schema field to the index (rust-lang/cargo#9161)
* Fix warnings of the new non_fmt_panic lint (rust-lang/cargo#9148)
bors added a commit that referenced this pull request Mar 16, 2021
Fix doc duplicate removal of root units.

The doc collision removal code didn't consider the possibility that there was a collision with a root unit.  This caused problems in conjunction with #9142 where cargo would panic because a root unit got removed from the graph because of a filename collision. The solution here is to avoid removing root units during the doc collision sweep.

This has a downside that this reintroduces a filename collision.

An alternate solution would be to make the set of root units mutable, and remove from that list, but I figured this is simpler and more conservative.

Fixes #9274
ehuss pushed a commit to ehuss/cargo that referenced this pull request Mar 16, 2021
…excrichton

Fix doc duplicate removal of root units.

The doc collision removal code didn't consider the possibility that there was a collision with a root unit.  This caused problems in conjunction with rust-lang#9142 where cargo would panic because a root unit got removed from the graph because of a filename collision. The solution here is to avoid removing root units during the doc collision sweep.

This has a downside that this reintroduces a filename collision.

An alternate solution would be to make the set of root units mutable, and remove from that list, but I figured this is simpler and more conservative.

Fixes rust-lang#9274
@ehuss ehuss modified the milestones: 1.52.0, 1.51.0 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.

cargo doc panicked at 'no entry found for key'
4 participants