Skip to content

[6.0🍒] NCGenerics: handle failure to load stdlib #75212

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

kavon
Copy link
Member

@kavon kavon commented Jul 12, 2024

  • Explanation: More gracefully handle cases where the stdlib module failedToLoad, but without allowing compilation to proceed without an error.
  • Scope: Very limited; a defensive check.
  • Issue: rdar://129092011
  • Original PR: NCGenerics: handle failure to load stdlib #75211
  • Risk: Very low. A case that previously would segfault will now emit an error diagnostic and proceed using the Builtin module instead.
  • Testing: None.
  • Reviewer: @tbkka

@kavon kavon requested a review from a team as a code owner July 12, 2024 20:37
@kavon
Copy link
Member Author

kavon commented Jul 12, 2024

@swift-ci test

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
(cherry picked from commit b02b94c)
@kavon kavon force-pushed the 6.0-handle-stdlib-with-no-files-129092011 branch from 39d37ed to 95d6ddf Compare July 12, 2024 23:01
@kavon
Copy link
Member Author

kavon commented Jul 12, 2024

@swift-ci test

@kavon kavon merged commit 97ef673 into swiftlang:release/6.0 Jul 15, 2024
5 checks passed
@kavon kavon deleted the 6.0-handle-stdlib-with-no-files-129092011 branch July 15, 2024 17:28
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