We’ve run into a conflict between the OperatingSystemType enum entry for WASM and WASM defined as a macro in other frameworks, which can be resolved most easily by having JUCE’s match other enum entries, i.e. Wasm rather than all uppercase WASM.
Since JUCE is moving towards Web GUIs, maybe it’s a good idea to make the change to avoid conflicts for other users as well?
I noticed the other framework did not have its own macro protected by a namespace, but moving it into that framework’s namespace seemingly made no difference. Because this enum entry is conflicting with a preprocessor macro, the preprocessor macro is seen first and substituted into JUCE’s enum, which causes the error:
error C2143: syntax error: missing '}' before '='
Considering it’s the only enum entry to break the convention of camelCase, I figured it might be an easy fix on the JUCE side to make it match all the other enum entries.
For the record, the way WASM is being used in the other framework is similar to how EXPORT would be used as a substitution for more verbose, platform-specific symbol exporting:
Undef’ing would have been a wild goose chase since both SDKs are referring to their respective definitions from all over the place. I was able to rename the macro in the other SDK!
Also I was flat out wrong about uppercase being only used in macros and not enums, you see it a lot in older code but clearly camelCase with underscores is most legible here.
A better suggestion instead is probably to add Sequoia at L.81,