dotnet / interactive

.NET Interactive combines the power of .NET with many other languages to create notebooks, REPLs, and embedded coding experiences. Share code, explore data, write, and learn across your apps in ways you couldn't before.
MIT License
2.8k stars 374 forks source link

Support #define in Fsharp #2918

Open Lanayx opened 1 year ago

Lanayx commented 1 year ago

Is your feature request related to a problem? Please describe. I'd like to use FSharp assert function in interactive notebook, which requires DEBUG compiler option to be enabled. However by default it's not enabled. C# provides #define statement to accomplish the goal, while F# doesn't

Describe the solution you'd like I'd like to use #define DEBUG in F# as well similarly to C#

Describe alternatives you've considered I've tried to pass it to dotnet interactive tool as argument, but it seems to be unsupported as well. So, it seems that assert is unusable witn dotnet interactive notebook

JDiLenarda commented 1 year ago

See https://github.com/fsharp/fslang-suggestions/issues/1124

colombod commented 1 year ago

@vzarytovskii, @KevinRansom would this work in fsi?