On _dotnet build_ or _dotnet run yarn-watch_ compiler fails with an internal error.
Clone my repository from here
Run _dotnet build_ or _dotnet run yarn-watch_ inside "src" folder.
Compilation succede.
Compilation fails with following error:
Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 24.31 ms for /Users/joakimsjohaug/Projects/fsharp/nobina/app/src/app.fsproj.
Restore completed in 48.86 ms for /Users/joakimsjohaug/Projects/fsharp/nobina/app/src/app.fsproj.
error FS0192 : internal error : primDestForallTy: not a forall type [/Users/joakimsjohaug/Projects/fsharp/nobina/app/src/app.fsproj]
Build FAILED.
error FS0192 : internal error : primDestForallTy: not a forall type [/Users/joakimsjohaug/Projects/fsharp/nobina/app/src/app.fsproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:04.90
I looked at this yesterday and it's easy to reproduce. Unfortunately it
does not show line numbers. It also does not reproduce in the IDE. Only if
you run a build. I tried to make the repro smaller but failed.
Joakim Sjøhaug notifications@github.com schrieb am Sa., 13. Apr. 2019,
23:57:
On dotnet build or dotnet run yarn-watch compiler fails with an
internal error.
Repro steps1.
Clone my repository from here
https://github.com/JoakimSjo/fable-react-nobinaApp
2.Run dotnet build or dotnet run yarn-watch inside "src" folder.
Expected behavior
Compilation succede.
Actual behaviorCompilation fails with following error:
Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.Restore completed in 24.31 ms for /Users/joakimsjohaug/Projects/fsharp/nobina/app/src/app.fsproj.
Restore completed in 48.86 ms for /Users/joakimsjohaug/Projects/fsharp/nobina/app/src/app.fsproj.
error FS0192 : internal error : primDestForallTy: not a forall type [/Users/joakimsjohaug/Projects/fsharp/nobina/app/src/app.fsproj]Build FAILED.
error FS0192 : internal error : primDestForallTy: not a forall type [/Users/joakimsjohaug/Projects/fsharp/nobina/app/src/app.fsproj]
0 Warning(s)
1 Error(s)Time Elapsed 00:00:04.90
Related information
- Operating system: macOS 10.14.4
- Branch: master
- .NET: 2.2.103
- Editing Tools: Visual Studio Code
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/visualfsharp/issues/6528, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AADgNPUvWj54a1V-__GcoTFavgQdEew7ks5vglK9gaJpZM4cuStP
.
I can look at this one.
@JoakimSjo Do you still see this one? The repro has some older dependencies and it could be that a fix is in place, but not present in the current project.
I just came across this issue and have no idea where to go from here :/ using latest net5 sdk and it seems like another FSharp.Core version resolution issue.
I just came across this issue and have no idea where to go from here :/ using latest net5 sdk and it seems like another FSharp.Core version resolution issue.
Could you make a minimal repro? And try changing referenced FSharp.Core to see if that makes a difference? Also --langversion:4.7
Just anything to reduce the matrix of possibilities and causes
Also, it may be possible to propagate a range parameter down to primDestForallTy to give a better location error on this failure.
I've only ever seen this manifest in fable projects (via bug reports) and so there is likely some subtle issue in the interplay of FSharp.Core there
We have the same issue in our project and we found out following:
TLDR: Changing reference to Fable.Core 3.1.6 solved our problem 😅
I hope this information can help finding the issue.
I followed the trail and made a smallest repro I could come up with.
In the App.fs if you comment out Program.withDebugger compilation works and with this line it does not.
module App
open Elmish
open Elmish.React
#if DEBUG
open Elmish.Debug
#endif
Program.mkProgram Index.init Index.update Index.view
|> Program.withReactSynchronous "elmish-app"
// #if DEBUG
// |> Program.withDebugger
// #endif
|> Program.run
also with Fable.Core 3.1.6 compilation works and with 3.2.0 it does not.
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Index.fs" />
<Compile Include="App.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Fable.Core" Version="3.1.6" />
<PackageReference Include="Fable.Elmish" Version="3.1.0" />
<PackageReference Include="Fable.Elmish.Debugger" Version="3.2.0" />
<PackageReference Include="Fable.Elmish.React" Version="3.0.1" />
<PackageReference Include="Fable.React" Version="7.2.0" />
</ItemGroup>
</Project>
So, I guess it has to be something with Fable.Core 3.2.0 and implementation of Program.withDebugger in Fable.Elmish.Debugger.
I tried following:
Remove Fable.Elmish.Debugger nuget package and add the two source files Fable.Import.fs and Elmish.Debugger.fs from elmish/debugger repo branch v3.x to my project and then everything works again. 🤔
Most helpful comment
I just came across this issue and have no idea where to go from here :/ using latest net5 sdk and it seems like another FSharp.Core version resolution issue.