Skip to content

Conversation

@bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Oct 28, 2020

Adds a new frontend option
"-experimental-allow-module-with-compiler-errors". If any compilation
errors occur while generating the .swiftmodule, this mode will skip SIL
entirely and only serialize the (likey invalid) AST.

This existence of this option during generation is serialized into the
resulting .swiftmodule. Errors found in deserialization are only allowed
if it is set.

Primarily intended for IDE requests (eg. indexing and code completion)
to ensure robust cross-module results, despite possible errors.

Resolves rdar://69815975

@bnbarham
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 54e06619e644b419a065820901eedd906902018b

@bnbarham bnbarham force-pushed the benb/allow-errors-69815975 branch from 54e0661 to 0ffb7e9 Compare October 29, 2020 06:27
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@akyrtzi akyrtzi requested a review from CodaFi October 29, 2020 16:45
Copy link
Contributor

@xymus xymus left a comment

Choose a reason for hiding this comment

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

This looks good!

Do you expect having to put in more work to suppress other errors in this mode or should this cover most of it already?

@bnbarham
Copy link
Contributor Author

bnbarham commented Oct 29, 2020

This looks good!

Do you expect having to put in more work to suppress other errors in this mode or should this cover most of it already?

I'm hoping there's shouldn't be many more errors to suppress, but I suspect there likely is.

@bnbarham bnbarham force-pushed the benb/allow-errors-69815975 branch from c64c163 to f5f87a5 Compare November 10, 2020 03:02
@bnbarham bnbarham changed the title [WIP] [Serialization] Add an option to output modules regardless of errors [Serialization] Add an option to output modules regardless of errors Nov 10, 2020
@bnbarham
Copy link
Contributor Author

Going to merge and fix any error that crop up from the stress tester after the fact (this arg will only be used in an opt-in mode for now).

@bnbarham
Copy link
Contributor Author

@swift-ci please smoke test

@bnbarham bnbarham force-pushed the benb/allow-errors-69815975 branch from f5f87a5 to ef0e4d7 Compare November 10, 2020 03:53
@bnbarham
Copy link
Contributor Author

@swift-ci please smoke test

Adds a new frontend option
"-experimental-allow-module-with-compiler-errors". If any compilation
errors occur while generating the .swiftmodule, this mode will skip SIL
entirely and only serialize the (likey invalid) AST.

This existence of this option during generation is serialized into the
resulting .swiftmodule. Errors found in deserialization are only allowed
if it is set.

Primarily intended for IDE requests (eg. indexing and code completion)
to ensure robust cross-module results, despite possible errors.

Resolves rdar://69815975
@bnbarham bnbarham force-pushed the benb/allow-errors-69815975 branch from ef0e4d7 to 241559d Compare November 10, 2020 04:47
@bnbarham
Copy link
Contributor Author

Fixed test after a couple other PRs were merged to fix the missing global case.

@swift-ci please smoke test

@bnbarham
Copy link
Contributor Author

@swift-ci please test Windows platform

@bnbarham bnbarham merged commit b0577b0 into swiftlang:main Nov 10, 2020
@bnbarham bnbarham deleted the benb/allow-errors-69815975 branch November 10, 2020 22:31
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