dotnet-websharper / core

WebSharper - Full-stack, functional, reactive web apps and microservices in F# and C#
https://websharper.com
Apache License 2.0
595 stars 50 forks source link

Handle stackoverflowerror during builds via the WebSharperTask. #1380

Closed Jooseppi12 closed 8 months ago

Jooseppi12 commented 8 months ago

At the moment, if during the build we instantiate a type that has an infinitely recursive constructor the build fails, but on a subsequent build it passes, as the logic to clean up dlls in the obj folder in case of an error is not getting executed.

Adding a fallback in the WebSharperTask, so that upon error, if the normal version of the .dll is there, we move it to a file ending with .failed