-
Notifications
You must be signed in to change notification settings - Fork 1.4k
remove resolution retry on resolution failure #3853
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
Conversation
@neonichu @abertelrud do you agree with this change? note there is a unit tests that actually checks for this behavior which is naturally now failing. my default posture is we should remove the test, but it does have the following somewhat interesting comment:
wdyt? |
In theory I think this is a good change since it removes some source of confusion and "magic" behavior.
This is an interesting comment though. So now we would just get a failure, and then the user would need to reresolve? |
…ailure motivation: resolution retry + removing of package resolved in failure is difficult to justify changes: * remove the retry code from package resolution and "give up" after one attemtp without mutating the package resolved file * fix the resolver to also compare locations so that resolved file with same identity but different location would work correctly * add and adjust tests
11b79c4
to
750b4a7
Compare
@swift-ci please smoke test |
@swift-ci please test package compatibility |
return completion(.success(container)) | ||
} | ||
|
||
if let prefetchSync = self.prefetches[package] { | ||
// If this container is already being prefetched, wait for that to complete | ||
prefetchSync.notify(queue: .sharedConcurrent) { | ||
if let container = self.containersCache[package] { | ||
if let container = self.containersCache[package], package.equalsIncludingLocation(container.package) { |
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.
@abertelrud @neonichu fixed the logic so now the test passes, its actually the right thing to do anyways
@neonichu @abertelrud this is ready, also passes the package compatibility test |
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.
Fantastic! LGTM!
motivation: resolution retry + removing of package resolved in failure is difficult to justify
changes: remove the retry code from package resolution and "give up" after one attempt without mutating the package resolved file