-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Dependency Scanning] Diagnose an error when only finding incompatible Swift binary modules #82460
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
base: main
Are you sure you want to change the base?
[Dependency Scanning] Diagnose an error when only finding incompatible Swift binary modules #82460
Conversation
f798987
to
0c0f75f
Compare
This is a great enhancement Artem! |
df01027
to
be6c7ec
Compare
@swift-ci test |
be6c7ec
to
fa4dce9
Compare
@swift-ci 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.
Nice. The diagnostics are so much better now!
3dea017
to
3a36c37
Compare
@swift-ci test |
@swift-ci test macOS platform |
3a36c37
to
60be4db
Compare
swiftlang/swift-driver#1943 |
60be4db
to
58faf1d
Compare
swiftlang/swift-driver#1943 |
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.
I think this is much clean now. Thanks.
…e Swift binary modules When querying a Swift module, the scanner now also keeps track of all discovered candidate binary modules which are not compatible with current compilation. - If a Swift dependency is successfully resolved to a compatible binary module or a textual interface, a warning is emitted for every incompatible binary Swift module discovered along the way. - If a Swift dependency is not resolved, but incompatible module candidates were found, an error is emitted - while it is likely that the scan would fail downstream, it is also possible that an underlying Clang module dependency (with the same name) is successfuly resolved and the Swift lookup failure is ignored, which is still going to lead to failures most of the time if the client code assumes the presence of the Swift overlay module in this scenario. This change refactors common error reporting by the scanner into a 'ModuleDependencyIssueReporter' class, which also keeps track of all diagnosed failed lookups to avoid repeating diagnostics.
58faf1d
to
f5530a1
Compare
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.
LGTM
@swift-ci smoke test |
@swift-ci smoke test |
@swift-ci smoke test Windows platform |
When querying a Swift module, the scanner now also keeps track of all discovered candidate binary modules which are not compatible with current compilation.
This change refactors common error reporting by the scanner into a
ModuleDependencyIssueReporter
class, which also keeps track of all diagnosed failed lookups to avoid repeating diagnostics.