-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[5.4] Actually skip not needed dependencies during dependency resolution #3185
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
[5.4] Actually skip not needed dependencies during dependency resolution #3185
Conversation
…wiftlang#3166) Actually skip not needed dependencies during dependency resolution This is a follow-up to swiftlang#3162. While that brought back the code for `dependenciesRequired(for:)`, the guard based on `productFilter` actually made it so that it was practically never executed. Instead, the guard should be based on whether the package in question is a root package. Additionally, this made the order of the returned dependencies unstable, due to use of `Set`. Since `dependenciesRequired(for: keepUnused:)` is now only used if `ENABLE_TARGET_BASED_DEPENDENCY_RESOLUTION` is set, I removed some dead code from there as well. (cherry picked from commit da4d643)
@swift-ci please smoke test |
@swift-ci please test |
} | ||
} | ||
} | ||
|
||
return Array(requiredDependencies) | ||
|
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.
Can we please remove the added invisibles at line 171, 173 and 181?
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.
We can surely remove them in main, but I don't think another multi-hour CI run is necessary to do it in 5.4 as well.
Scope of Issue: Any package that relied on dependencies not used by any products being skipped, e.g. because it is using a non-versioned dependency for tests. Notably, this is utilized by the Firebase SDK which is widely used. |
5.4 cherry-pick of #3166