Skip to content

[5.9 πŸ’][Compile Time Constant Extraction] Deprecated extraction of property mangled names #67659

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

artemcm
Copy link
Contributor

@artemcm artemcm commented Aug 1, 2023

Cherry-pick of #67658

––– CCC Information –––
β€’ Train: Swift 5.9
β€’ Explanation: We have recently made late changes to compile-time metadata extraction from the AST in the compiler, in order to gather additional info about relevant conformances. One such addition is collecting mangled names of conformances’ properties. Extracting mangled type names of nominal type properties has edge cases that the code did not cover, such as how to mangle types containing archetypes. Upon encountering such properties, the compiler, unfortunately, crashes during extraction. We have realized that extracting this data is unnecessary, the code’s client does not utilize it, and addressing the additional complexity of mangling property types which contain archetypes is not worth the effort, so the solution is to remove the error-prone code-path entirely.
β€’ Scope of Issue: User code with nominal types which conform to the extracted protocols and have properties whose type contains an archetype will crash the compiler.
β€’ Origination: Recent changes to extraction code to augment it with additional metadata.
β€’ Risk: Minimal. This change removes functionality and a code-path which may be error-prone and even cause crashes. Since this functionality is not used by clients of this code, I consider it a safe change.
β€’ main Pull Request URL: #67658
β€’ Reviewed By: @nkcsgexi
β€’ Automated Testing: Compiler test suite modified to reflect the expected output of this kind of extraction (not extracting property mangled names).

Resolves rdar://113039215

@artemcm artemcm requested a review from a team as a code owner August 1, 2023 21:23
@artemcm artemcm added πŸ’ release cherry pick Flag: Release branch cherry picks swift 5.9 labels Aug 1, 2023
@artemcm
Copy link
Contributor Author

artemcm commented Aug 1, 2023

@swift-ci test

…mangled

names. It can often be more complex than the code can currently handle (e.g.
properties whose types include archetypes), and we
do not have a good motivating use-case to extract them.

Resolves rdar://113039215
@artemcm artemcm force-pushed the 59NoPropertyMangledNameConstExtract branch from c648071 to 483e06f Compare August 1, 2023 22:54
@artemcm
Copy link
Contributor Author

artemcm commented Aug 1, 2023

@swift-ci test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
πŸ’ release cherry pick Flag: Release branch cherry picks swift 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants