Skip to content

[ParseableInterface] Fix failing to build a module when the importing file has errors. #22550

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

Conversation

nathawes
Copy link
Contributor

This is #22476 again because it had to be reverted due to a test failure. This updates the code completion test to use %target-swift-ide-test rather than plain %swift-ide-test.

rdar://problem/43906499 (original issue)
Resolves rdar://problem/47975126 (test failure)

@nathawes
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - cfe3894ca3d8ca2dde4e09eff112f4e8f77a0dd2

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - cfe3894ca3d8ca2dde4e09eff112f4e8f77a0dd2

… file has errors.

We were checking the parent invocation's DiagnosticEnginer rather than the
subinstance's to determine if there were any errors building the module, which
meant we would fail to load the module if there were errors prior to the import
statement in the importing file.

This also meant code completion would fail to load the module, because it always
emits a bogus error in order to mark the AST as erroneous so that different
parts of the compiler (e.g. the verifier) have less strict assumptions.

rdar://problem/43906499
@nathawes nathawes force-pushed the code-complete-parseable-interface branch from cfe3894 to e146630 Compare February 12, 2019 20:32
@nathawes
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - cfe3894ca3d8ca2dde4e09eff112f4e8f77a0dd2

@nathawes
Copy link
Contributor Author

@swift-ci please test OS X Platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - cfe3894ca3d8ca2dde4e09eff112f4e8f77a0dd2

@nathawes
Copy link
Contributor Author

@swift-ci please test OS X

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - e146630

@nathawes
Copy link
Contributor Author

OSX failure was unrelated (a SwiftSyntax issue Argyrios has since fixed)

@swift-ci please test OS X

@nathawes nathawes merged commit 6aad52a into swiftlang:master Feb 13, 2019
@nathawes nathawes deleted the code-complete-parseable-interface branch February 13, 2019 22:12
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.

2 participants