Skip to content

Fallback on swift-frontend -scan-dependencies ... fallback path in case libSwiftScan shared library cannot be loaded. #1601

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

Merged
merged 1 commit into from
May 13, 2024

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented May 9, 2024

Resolves rdar://127768140

@artemcm artemcm requested review from owenv and cachemeifyoucan May 9, 2024 00:18
do {
try interModuleDependencyOracle.verifyOrCreateScannerInstance(fileSystem: fileSystem,
swiftScanLibPath: scanLibPath)
if isCachingEnabled {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cachemeifyoucan should we error if caching is enabled but we failed to load libSwiftScan?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error out sounds good to me.

@artemcm artemcm changed the title Fallback on 'swift-frontend -scan-dependencies ...' fallback path in case libSwiftScan shared library cannot be loaded. Fallback on swift-frontend -scan-dependencies ... fallback path in case libSwiftScan shared library cannot be loaded. May 9, 2024
Copy link
Contributor

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only fixes broken libSwiftScan. I do believe if you want driver to load a broken scanner, you deserve a hard error with no fallback. Warning doesn't do anything in this case and user will assume they didn't do anything horrible if they don't hit any error afterwards.

do {
try interModuleDependencyOracle.verifyOrCreateScannerInstance(fileSystem: fileSystem,
swiftScanLibPath: scanLibPath)
if isCachingEnabled {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error out sounds good to me.

@artemcm artemcm force-pushed the DepScanFallback branch from 44b5b24 to e6d9a15 Compare May 10, 2024 16:54
@artemcm
Copy link
Contributor Author

artemcm commented May 10, 2024

@swift-ci test

…case libSwiftScan shared library cannot be loaded.

Resolves rdar://127768140
@artemcm artemcm force-pushed the DepScanFallback branch from e6d9a15 to 14c82d2 Compare May 10, 2024 17:42
@artemcm
Copy link
Contributor Author

artemcm commented May 10, 2024

@swift-ci test

Copy link
Contributor

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. LGTM

@artemcm
Copy link
Contributor Author

artemcm commented May 13, 2024

@swift-ci test Windows platform

@artemcm artemcm changed the title Fallback on swift-frontend -scan-dependencies ... fallback path in case libSwiftScan shared library cannot be loaded. Fallback on swift-frontend -scan-dependencies ... fallback path in case libSwiftScan shared library cannot be loaded. May 13, 2024
@artemcm artemcm merged commit 3e48888 into swiftlang:main May 13, 2024
3 checks passed
@artemcm artemcm deleted the DepScanFallback branch May 13, 2024 23:06
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.

3 participants