Skip to content

NCGenerics: handle failure to load stdlib #75211

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 2 commits into from
Jul 15, 2024

Conversation

kavon
Copy link
Member

@kavon kavon commented Jul 12, 2024

The stdlib module can end up being a non-null ModuleDecl* that contains
no files, due to a failure to load the stdlib. I've seen only backtraces showing such crashes, but don't know to reproduce them.

In such an unusual case, fall-back to synthesizing Copyable/Escapable
into the Builtin module so that Sema can proceed.

rdar://129092011

@kavon
Copy link
Member Author

kavon commented Jul 12, 2024

@swift-ci test

kavon added 2 commits July 12, 2024 15:48
The stdlib module can end up being a non-null ModuleDecl that contains
no files, due to a failure to load the stdlib.

In such an unusual case, fall-back to synthesizing Copyable/Escapable
into the Builtin module so that Sema can proceed.

rdar://129092011
@kavon kavon force-pushed the handle-stdlib-with-no-files-129092011 branch from af59c16 to 8624b17 Compare July 12, 2024 22:50
@kavon
Copy link
Member Author

kavon commented Jul 12, 2024

@swift-ci test

@kavon
Copy link
Member Author

kavon commented Jul 13, 2024

@swift-ci test macOS

@kavon kavon merged commit be0e61e into swiftlang:main Jul 15, 2024
5 checks passed
@kavon kavon deleted the handle-stdlib-with-no-files-129092011 branch July 15, 2024 04:13
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.

1 participant