docs icon indicating copy to clipboard operation
docs copied to clipboard

Add fix to FAQ for .net9 breaking dotnet watch

Open shayanhabibi opened this issue 1 year ago • 3 comments

Issue

Upgrading to .net9 has broken the build process for the SAFE stack by default

What does this pull request address

This pull request adds another section to the FAQ section troubleshoot page which suggests a potential fix should this issue occur in the future with major dotnet releases

How does this pull request address this

Provides the additional command to be passed to Build.fs to allow continued development (without hot-code-reloading stopping despite the name of the argument as is discussed the above referenced issue thread).

Target.create "Run" (fun _ ->
    run dotnet [ "restore"; "Application.sln" ] "."
    run dotnet [ "build" ] sharedPath

    [
        "server", dotnet [ "watch"; "run"; "--no-restore" ; "--no-hot-reload"] serverPath
        "client", dotnet [ "fable"; "watch"; "-o"; "output"; "-s"; "--run"; "npx"; "vite" ] clientPath
    ]
    |> runParallel)

shayanhabibi avatar Dec 04 '24 12:12 shayanhabibi

My understanding of dotnet and interaction between CLR languages is shallow, but the arguments in the referenced thread seem to refer to --no-hot-reload having nil/negligible impact on F# and other non-C# languages on the CLR.

Would this not be incentive for --no-hot-reload to be default behaviour for the SAFE template?

shayanhabibi avatar Dec 05 '24 01:12 shayanhabibi

@shayanhabibi That has always been the default behaviour of .NET and shouldn't have been changed for .NET 9. My belief is that this will be rolled back / fixed in a patch in the next few weeks.

isaacabraham avatar Dec 11 '24 15:12 isaacabraham

Undoubtedly; this was simply an issue I ran into for which I personally would have benefitted from having an answer/fix described for in the documentation or template or elsewhere.

I think that a ‘stable’ release of dotnet which causes a known issue for whatever amount of time should have the fix documented to help with newcomers who might come through at these awkward times such as myself.

That is just a personal opinion though, thank you for your work on this stack!

On Wed, 11 Dec 2024 at 11:07 PM, Isaac Abraham @.***> wrote:

@shayanhabibi https://github.com/shayanhabibi That has always been the default behaviour of .NET and shouldn't have been changed for .NET 9. My belief is that this will be rolled back / fixed in a patch in the next few weeks.

— Reply to this email directly, view it on GitHub https://github.com/SAFE-Stack/docs/pull/369#issuecomment-2536259711, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN2EZW6HUWXIS37MMDIGYTT2FBILDAVCNFSM6AAAAABTAB7SH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZWGI2TSNZRGE . You are receiving this because you were mentioned.Message ID: @.***>

shayanhabibi avatar Dec 11 '24 17:12 shayanhabibi