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

Fix enum for module stability #406

Merged
merged 3 commits into from
Mar 15, 2021
Merged

Fix enum for module stability #406

merged 3 commits into from
Mar 15, 2021

Conversation

NikolayJuly
Copy link
Contributor

@NikolayJuly NikolayJuly commented Mar 14, 2021

For working project, I need to build this pod as binary framework. To avoid rebuild it with every new xcode, we build them with BUILD_LIBRARY_FOR_DISTRIBUTION=YES.

In this mode, swift generate swiftinterface file, which is crucial for module stability

Unfortunately it has bug, which make swiftinterface invalid for BonMot specifically.

Here is link for swift bug: https://bugs.swift.org/browse/SR-14355

Looks like it just skip string literals, because they are not needed, and do not check that RawValue type is not String.

I see no other way, rather than change raw type to String. In this way swiftinterface can be compiled.

Additionally I added CaseIterable and still keep all for backward compatibility.

I would appreciate if you take my changes and create new release, so I would avoid creating fork of BonMot repo

]
/// Property kept here for backward compatibility
@inlinable
public static var all: [Special] { allCases }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we mark this as deprecated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, done

Copy link
Contributor

@chrisballinger chrisballinger left a comment

Choose a reason for hiding this comment

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

I dig it. Thank you!

@chrisballinger chrisballinger merged commit 59765b0 into Rightpoint:master Mar 15, 2021
@NikolayJuly NikolayJuly deleted the fix-enum-for-module-stability branch March 15, 2021 21:04
nikolaytw pushed a commit to transferwise/BonMot that referenced this pull request Mar 22, 2021
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