Repository navigation
This is a minor release of WebSharper 10.1. NuGet version 10.1.8.682.
Templates for .NET Core SDK: dotnet new install WebSharper.Templates@10.1.8.682
Enhancements
- Faster builds:
- #1608
wsfsc,wscscand thewsfscservicebooster now run with Server GC (non-concurrent), likefscandcsc. - #1609 The F# type check needed for WebSharper translation now uses the F# compiler service's TransparentCompiler, which type checks files in parallel. This applies to both standalone compilation and the
wsfscservicebooster. Opt out system-wide with theWebSharperTransparentCompilerenvironment variable set tofalse, or per project with"transparentCompiler": falseinwsconfig.json, theWebSharperTransparentCompilerMSBuild property set tofalse, or the--transparentcompiler-flag. - #1587 F# projects now emit the .NET assembly in parallel with WebSharper translation, both standalone and through the booster. When translation needs to reflect into the project's own assembly (macros or generators defined in the same project,
[<ReflectedDefinition>]bodies,RequireFeaturetypes, RPC signature verification), it waits for the assembly at that point. WIG and bundle-only projects still compile serially. Opt out with"parallelCompilation": falseinwsconfig.json, theWebSharperParallelCompilationMSBuild property set tofalse, or the--parallelcompilation-flag. The--wstimings/WebSharperTimingLogstage log reports the emission separately, plusWaiting for F# output (join)andWaiting for F# output (reflection)stages for the time translation was blocked on it.
- #1608
- #1440 The WebSharper C# analyzer is included again in the
WebSharper.CSharppackage, showing WebSharper translation errors and warnings live in the IDE for C# projects.
Fixes
- #1607
wsfsc"Global error" messages now include the stack trace of the original exception, not only the compiler's worker-thread wrapper. wsfscno longer fails with exit code 1 and no message when the F# compiler fails with an exception but no error diagnostics, or when only the type check for WebSharper translation reports errors.- #1440 The WebSharper C# analyzer works again in Visual Studio:
- It no longer turns itself off on first use. It detects command line builds (
csc,VBCSCompiler), where the WebSharper compiler reports the same diagnostics, by the process instead of a compilation action, which Roslyn also runs for single-document IDE analysis. - Macros from referenced assemblies run again in the .NET-hosted Roslyn analyzer process: references to WebSharper compiler assemblies resolve to the analyzer's own copies instead of loading a second
WebSharper.Core. Referenced assemblies are loaded from bytes, so build outputs are not locked by the IDE. - Referenced C# projects passed by the IDE as in-memory compilations are translated for their WebSharper metadata.
- Constructor macros that cannot run in the analyzer give a warning instead of an error, same as method macros.
- WebSharper F# projects do not produce reference assemblies in design-time builds either, so IDEs reference their output assembly that contains WebSharper metadata, not a nonexistent
obj/.../refassembly. - Reference errors are shown on the analyzed file instead of skipping analysis silently, and cached reference metadata is refreshed when the referenced assembly is rebuilt.
- It no longer turns itself off on first use. It detects command line builds (