Rightpoint / BonMot

Beautiful, easy attributed strings in Swift
MIT License
3.54k stars 196 forks source link

Fix enum for module stability #406

Closed NikolayJuly closed 3 years ago

NikolayJuly commented 3 years ago

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