Skip to content
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

Add the frozen keyword only to enums with the public or package modifiers #595

Merged
merged 8 commits into from
Jul 22, 2024

Conversation

ojun9
Copy link
Contributor

@ojun9 ojun9 commented Jul 21, 2024

Motivation

As reported in #586, using Xcode 16 Beta 3, the generated Type.swift file now shows multiple warnings due to the @frozen attribute being applied to non-public enums.

Modifications

In order to resolve the above issue, I have modified the code to annotate the @frozen keyword only on enum with the public or package modifiers.

Result

No warnings are issued when the @frozen keyword is annotated on enums with the public or package modifiers.

Copy link
Contributor

@czechboy0 czechboy0 left a comment

Choose a reason for hiding this comment

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

Great, thank you!

@czechboy0
Copy link
Contributor

@swift-server-bot test this please

@ojun9 ojun9 requested a review from czechboy0 July 22, 2024 03:20
@czechboy0
Copy link
Contributor

@swift-server-bot test this please

@czechboy0
Copy link
Contributor

For the 5.9 and 5.9.0 pipelines, we're running into the deprecation warning being escalated to an error. We already disabled warnings-as-errors on most other pipelines, please also comment out this line in the two files for 5.9 and 5.9.0, then the CI should pass.

- WARN_AS_ERROR_ARG=-Xswiftc -warnings-as-errors

@czechboy0
Copy link
Contributor

@swift-server-bot test this please

@czechboy0 czechboy0 enabled auto-merge (squash) July 22, 2024 11:46
@czechboy0 czechboy0 merged commit edf766a into apple:main Jul 22, 2024
9 checks passed
@czechboy0 czechboy0 added the 🔨 semver/patch No public API change. label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warnings due to @frozen attribute on non-public enums with Xcode 16 Beta 3
2 participants