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

small refactor #6097

Merged
merged 2 commits into from
Sep 26, 2018
Merged

small refactor #6097

merged 2 commits into from
Sep 26, 2018

Conversation

Eh2406
Copy link
Contributor

@Eh2406 Eh2406 commented Sep 25, 2018

This moves the visual indicator code out of the most complicated loop in the resolver. The activate_deps_loop is the heart of the resolver, with all its moving pieces in play at the same time. It is completely overwhelming. This is a true refactoring, nothing about the executable has changed, but a screen full of code/comments got moved to a helper type in a different file.

I'd love to see more moved out of activate_deps_loop but this is the thing that came most cleanly.

edit: I was also able to move the pop_most_constrained code out as well. So that is now also in this PR.

@rust-highfive
Copy link

r? @alexcrichton

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

@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Contributor

bors commented Sep 26, 2018

📌 Commit cca4d45 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Sep 26, 2018

⌛ Testing commit cca4d45 with merge 2a13f7395538169be686090a1689a3a935796c57...

@bors
Copy link
Contributor

bors commented Sep 26, 2018

💔 Test failed - status-appveyor

@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Contributor

bors commented Sep 26, 2018

⌛ Testing commit cca4d45 with merge 0253f4e...

bors added a commit that referenced this pull request Sep 26, 2018
small refactor

This moves the visual indicator code out of the most complicated loop in the resolver. The `activate_deps_loop` is the heart of the resolver, with all its moving pieces in play at the same time. It is completely overwhelming. This is a true refactoring, nothing about the executable has changed, but a screen full of code/comments got moved to a helper type in a different file.

I'd love to see more moved out of `activate_deps_loop` but this is the thing that came most cleanly.

edit: I was also able to move the `pop_most_constrained` code out as well. So that is now also in this PR.
@dwijnand
Copy link
Member

Nice one. Looks nice.

@bors
Copy link
Contributor

bors commented Sep 26, 2018

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

@bors bors merged commit cca4d45 into rust-lang:master Sep 26, 2018
@Eh2406 Eh2406 deleted the refactoring branch September 26, 2018 18:31
bors added a commit that referenced this pull request Sep 27, 2018
Proptest/Resolver move test helper functions to support

This moves all the code in `tests/testsuite/resolve.rs` that is not tests of cargo to ` tests/testsuite/support/resolve.rs`. (follow up to #5921)
This also clears up some inconsistencies in naming between local variables in `activate_deps_loop` and `BacktrackFrame`. (follow up to #6097) This is a true refactoring, nothing about the executable has changed.
@ehuss ehuss added this to the 1.31.0 milestone Feb 6, 2022
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 this pull request may close these issues.

6 participants