core icon indicating copy to clipboard operation
core copied to clipboard

wsfsc hanging with dotnet 8 on linux

Open rbauduin opened this issue 10 months ago • 8 comments

I'm taking a new look at a project I had done with WS5. I'm working on linux. I've installed the latest WS8 from the repo:

    <PackageReference Include="WebSharper" Version="8.0.0.487-beta1" />
    <PackageReference Include="WebSharper.FSharp" Version="8.0.0.487-beta1" />
    <PackageReference Include="WebSharper.UI" Version="8.0.0.473-beta1" />
    <PackageReference Include="WebSharper.AspNetCore" Version="8.0.0.487-beta1" />

and set the target framework to net8.0.

Using

$ dotnet --version
8.0.403

Running dotnet build never terminates and a ps shows this process:

dotnet /home/rb/.nuget/packages/websharper.fsharp/8.0.0.487-beta1/build//../tools/net8.0/linux-x64/wsfsc.dll @/tmp/tmpC5xb2p.tmp

I had dotnet-ws for dotnet6 but removed it, and the service is not running.

rbauduin avatar Jan 14 '25 11:01 rbauduin

@rbauduin IIRC Seppi (/cc @Jooseppi12) was checking on this earlier and found that the build process hangs on Alpine Linux, but not on any of the others he tried. Are you using Alpine by any chance?

granicz avatar Jan 28 '25 13:01 granicz

(By the way, the Booster is integrated with the compiler, and dotnet-ws is just another way to interact with it. So if all else fails, you can try disabling the Booster.)

granicz avatar Jan 28 '25 13:01 granicz

@rbauduin Yeah, as @granicz said above, can you try turning off the Booster process, by adding this in your project file in the PropertyGroup:

<WebSharperStandalone>True</WebSharperStandalone>

Also upon further investigation, the issue is actually not just limited to Alpine, but was able to reproduce it on other distros as well

Jooseppi12 avatar Jan 28 '25 13:01 Jooseppi12

I confirm that turning off the booster in the PropertyGroup lets me build the project successfully (This is on ubuntu 20.04). Thanks!

rbauduin avatar Jan 28 '25 13:01 rbauduin

@rbauduin There is a new set of WS8-beta1 with changes around the booster IPC that we suspected with @Jooseppi12 to be the culprit. We will do more testing on it too before proper release, but wanted to give you a heads up.

Jand42 avatar Feb 06 '25 14:02 Jand42

Not sure if the goal is to be able to remove it eventually, but when I comment the line <WebSharperStandalone>True</WebSharperStandalone> in my .fsproj, I get this error when I try to build the project:

/home/rb/.nuget/packages/websharper.fsharp/8.0.0.502-beta1/build/WebSharper.FSharp.targets(50,5): error MSB6006: "wsfsc.sh" exited with code 134.

rbauduin avatar Feb 10 '25 18:02 rbauduin

@rbauduin There is some progress on this (reworking the pipe communication layer) but could use more eyes/hands on it - here is an invite to the WebSharper Discord (see #linux), it'd be great if you could join. Thanks!

granicz avatar Feb 11 '25 00:02 granicz

Hello,

I am having the same issue as in this issue.

Is it possible to back port the fix to WS 6 ?

MangelMaxime avatar Apr 01 '25 07:04 MangelMaxime