Some users have reported on Twitter a strange compiler error when referencing Fable.Core 3.2.0 or 3.2.1 (see #2317): https://twitter.com/cognipla/status/1339862505838043137
I cannot reproduce it. Note this seems to happen only when building with VS or running "dotnet build", Fable compilation works file. Apparently something similar was being reported 2 years ago to the fsharp repo happening in Fable projects:
https://github.com/dotnet/fsharp/issues/4670
https://github.com/dotnet/fsharp/issues/5293
@PawelStadnicki I've prepared a Fable.Core package that is compiled with dotnet sdk 3.1 to see if there's any difference. Could you please give it a try? Download and unzip this file: Fable.Core.3.0.0-local-build-20201220-0732.nupkg.zip
And then run the following command (replace the path with the one where you put the .nupkg):
dotnet add package Fable.Core --version "3.0.0-local-build-20201220-0732" --add-source ~/Downloads
@PawelStadnicki I published a new release of Fable.Core, not sure if it makes any difference, but could you please try with 3.2.2 just in case?
I have the same issue when I try to do a build just to check the project I get: primDestForallTy: not a forall type
Compilation to js works fine so it's more of a cosmetic issue for me.
Project is netstandard2.0, using JetBrains Rider (assuming it does dotnet build)
Updating the project to use Fable.Core 3.2.2 didn't help although there are libraries referencing the older version.
Thanks for checking @uxsoft! Unfortunately I'm still totally clueless. This is being reported in fsharp repo, this comment suggests removing Fable.Elmish.Debugger dependency removes the error too: https://github.com/dotnet/fsharp/issues/6528#issuecomment-746310456
I collected some data:
Environment
dotnet --list-runtimes
Microsoft.AspNetCore.All 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
dotnet --list-sdks
3.1.402 [C:\Program Files\dotnet\sdk]
5.0.101 [C:\Program Files\dotnet\sdk]
# global -> 3.1.402
dotnet msbuild -version -nologo
16.7.0.41201
paket --version
Paket version 5.257.0
# global -> 5.0.101
dotnet msbuild -version -nologo
16.8.0.52002
./paket --version
Paket version 6.0.0-beta8
Tests done with this paket.dependencies and clearing the lock
source https://api.nuget.org/v3/index.json
framework netcoreapp3.1 #net5.0
storage none
nuget FSharp.Core = 4.7.2
nuget Fable.Core = 3.1.6
nuget Fable.Elmish
nuget Fable.Elmish.Debugger
nuget Fable.Elmish.HMR
nuget Fable.Elmish.React
nuget Fable.FontAwesome.Free
nuget Thoth.Fetch
nuget Thoth.Json
nuget Fable.React
nuget Fulma
| | Fable.Core 3.1.6 | Fable.Core 3.2.0 | Fable.Core 3.2.1 | Fable.Core 3.2.2 |
|-------------------|------------------|------------------|------------------|------------------|
| FSharp.Core 4.7.1 | ok | paket fail | fail | fail |
| FSharp.Core 4.7.2 | ok | paket fail | fail | fail |
| FSharp.Core 5.0.0 | ok (paket6) | fail | fail | fail |
Yup, fixing Fable.Core to 3.1.6 "fixes" this error. Happened to me as well when running dotnet pack of new Feliz.Bulma packages (after updating Feliz as dependency to the latests version). There is something with incompatible versions for sure.
I've released Fable.Core 3.2.3 to fix the issue discovered by @TIHan. Could you please check if updating the Fable.Core dependency fixes the issue?
I think this issue can be closed out, since there's work on the F# compiler side to make it better, but the root of the issue was resolved in the Fable.Core update.
Most helpful comment
I think this issue can be closed out, since there's work on the F# compiler side to make it better, but the root of the issue was resolved in the Fable.Core update.