You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds the JAVASCRIPT conditional compilation symbol so that #if JAVASCRIPT blocks are used.
WebSharper is translating Proxy projects only in a single pass, to generate JS code only, no .NET code generated. So there is no compilation time degradation from this.
On regular F# WebSharper projects, .NET and JS translation are done usually with a single F# parser+typecheck pass to save on compiler running time, for this reason "UseJavaScriptSymbol" setting should be enabled explicitly when you want to differentiate server/client code with a compilation symbol. (An alternative is using the WebSharper.JavaScript.Pervasives.IsClient constant - or just IsClient if you have open WebSharper.JavaScript in F#)
ALSO: this can introduce F# errors that are not present without the JAVASCRIPT symbol, make sure those are printed.
WebSharper's C# compiler currently runs a separate code parser, but maybe best to keep the explicit setting there too, bc this might change with new Roslyn features.
The text was updated successfully, but these errors were encountered:
This adds the JAVASCRIPT conditional compilation symbol so that
#if JAVASCRIPT
blocks are used.WebSharper is translating Proxy projects only in a single pass, to generate JS code only, no .NET code generated. So there is no compilation time degradation from this.
On regular F# WebSharper projects, .NET and JS translation are done usually with a single F# parser+typecheck pass to save on compiler running time, for this reason
"UseJavaScriptSymbol"
setting should be enabled explicitly when you want to differentiate server/client code with a compilation symbol. (An alternative is using theWebSharper.JavaScript.Pervasives.IsClient
constant - or justIsClient
if you haveopen WebSharper.JavaScript
in F#)ALSO: this can introduce F# errors that are not present without the JAVASCRIPT symbol, make sure those are printed.
WebSharper's C# compiler currently runs a separate code parser, but maybe best to keep the explicit setting there too, bc this might change with new Roslyn features.
The text was updated successfully, but these errors were encountered: