fable-compiler / repl

Fable online REPL
http://fable.io/repl
MIT License
61 stars 34 forks source link

add language-specific defines to repl #199

Closed joprice closed 1 month ago

joprice commented 1 month ago

I copied pasted a chunk of code from a project that included FABLE_COMPILER_JAVASCRIPT and was surprised when it compiled, expecting the piece behind the guard to break. Turns out the language-specific define is not set: https://github.com/fable-compiler/repl/blob/fecf9d756f7847e74a2cba4efdfc65fe1db0b8d0/src/App/Widgets/Options.fs#L27

Would it make sense to keep them in sync with the the cli passes, for easier reproing? https://github.com/fable-compiler/Fable/blob/main/src/Fable.Cli/Entry.fs#L312-L322

MangelMaxime commented 1 month ago

This should be available in a few minutes

joprice commented 1 month ago

Thank you!