-
Notifications
You must be signed in to change notification settings - Fork 63
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
resolvelib: Stop resolving requirements one-by-one #488
Merged
Merged
Changes from 3 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
b7d46c8
resolvelib: Stop resolving requirements one-by-one
tetsuo-cpp 90e17cf
requirement, resolvelib: Propagate origin requirements for each candi…
tetsuo-cpp 20d16ee
requirement: Use the new origin requirements field
tetsuo-cpp 1f7b15d
Merge branch 'main' into alex/dep-resolution-fix
tetsuo-cpp 8e65f89
Merge remote-tracking branch 'origin/main' into alex/dep-resolution-fix
tetsuo-cpp 9517b8d
requirement: Fix `--skip-editable` flag
tetsuo-cpp 7556eb6
Merge remote-tracking branch 'origin/alex/pip-requirements-parser-fix…
tetsuo-cpp 3e396a6
resolvelib: Fix lint
tetsuo-cpp 74cde16
Merge remote-tracking branch 'origin/main' into alex/dep-resolution-fix
tetsuo-cpp d547d05
test: Remove incorrect online annotation
tetsuo-cpp 5eeef40
requirement, resolvelib: Rename dependee map variables/functions
tetsuo-cpp 4935dd0
test: Get a few resolvelib tests working
tetsuo-cpp 92bc864
resolvelib: Return a dummy candidate when a project can't be found on…
tetsuo-cpp 9dd0fbf
test: Get tests passing
tetsuo-cpp f0d6b5d
requirement, resolvelib: Fix lint
tetsuo-cpp 894168e
resolvelib: Document new classes
tetsuo-cpp e16fcd9
Merge branch 'main' into alex/dep-resolution-fix
tetsuo-cpp 2912a2f
CHANGELOG: Add changelog entry
tetsuo-cpp 8709ef6
dependency_source: Mark the interface with "no cover"
tetsuo-cpp 2e4079b
test: Fill out remaining coverage
tetsuo-cpp a2d8cf3
Merge branch 'main' into alex/dep-resolution-fix
tetsuo-cpp cecbb6c
requirement: Use `pass` statement to check for coverage and mark
tetsuo-cpp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@woodruffw I just found a serious problem here as I was fixing unit tests. The fact that we record the skipped candidate is fine, but then we proceed to return 0 candidates for a given requirement. This causes the resolver to raise a
ResolutionImpossible
.In the past, we just skipped the top-level requirement and then try resolving the next one (since it was doing one at a time). But the resolver is "all or nothing" so we can't really get partial results from it. And once we get into
find_matches
, I don't think there's a way to backtrack and say "nevermind, just forget about that requirement I said I needed earlier". I'm at a bit of a loss figuring out how to fix this.Do you have any ideas? I was considering doing something like creating a dummy candidate without any dependencies just to get past the resolver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is reminding me why I thought "one at a time" made sense despite not accurately reflecting the actual dependency resolution process 😅
IMO a dummy candidate here is fine, but we should probably tread carefully -- it'd be good to have it be a separate type entirely similarly to how we handle
SkippedDependency
(SkippedCandidate
maybe?).