Fable icon indicating copy to clipboard operation
Fable copied to clipboard

Can't compile standalone target

Open MangelMaxime opened this issue 1 year ago • 0 comments

Description

Hello @alfonsogarciacaro @ncave,

I am trying to fix https://github.com/fable-compiler/repl/issues/181 but I am stuck because I can't build the standalone version of Fable locally and the NPM package (fable-standalone) is outdated (it is for Fable 3 and not Fable 4).

When running dotnet fsi build.fsx standalone I get this compilation error:

Building standalone...
Clean build/fable-standalone
Clean src/fable-standalone/dist
/Users/mmangel/Workspaces/Github/fable-compiler/Fable> dotnet run -c Release --project src/Fable.Cli -- src/fable-standalone/src --outDir build/fable-standalone/bundle
Fable 4.1.4: F# to JavaScript compiler
Minimum fable-library version (when installed from npm): 1.1.1

Thanks to the contributor! @cloudRoutine
Stand with Ukraine! https://standwithukraine.com.ua/

Parsing src/fable-standalone/src/Fable.Standalone.fsproj...
src/fable-standalone/src> dotnet restore Fable.Standalone.csproj -p:FABLE_COMPILER=true -p:FABLE_COMPILER_4=true -p:FABLE_COMPILER_JAVASCRIPT=true
  Determining projects to restore...
  All projects are up-to-date for restore.
Project and references (309 source files) parsed in 2465ms

Started Fable compilation...
Compiled 11/188: src/fcs-fable/System.Collections.fsStack overflow.
   at Fable.Transforms.AST.visit$cont@949(Microsoft.FSharp.Core.FSharpFunc`2<Fable.AST.Fable.Expr,Fable.AST.Fable.Expr>, Fable.AST.Fable.Expr, Microsoft.FSharp.Core.Unit)
   at Fable.Transforms.AST.visit(Microsoft.FSharp.Core.FSharpFunc`2<Fable.AST.Fable.Expr,Fable.AST.Fable.Expr>, Fable.AST.Fable.Expr)
   at Fable.Transforms.AST.visitFromInsideOut(Microsoft.FSharp.Core.FSharpFunc`2<Fable.AST.Fable.Expr,Fable.AST.Fable.Expr>, Fable.AST.Fable.Expr)
   at Microsoft.FSharp.Primitives.Basics.List.map[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,System.__Canon>, Microsoft.FSharp.Collections.FSharpList`1<System.__Canon>)
   at Fable.Transforms.AST.visit$cont@949(Microsoft.FSharp.Core.FSharpFunc`2<Fable.AST.Fable.Expr,Fable.AST.Fable.Expr>, Fable.AST.Fable.Expr, Microsoft.FSharp.Core.Unit)
   at Fable.Transforms.AST.visit(Microsoft.FSharp.Core.FSharpFunc`2<Fable.AST.Fable.Expr,Fable.AST.Fable.Expr>, Fable.AST.Fable.Expr)
   at Fable.Transforms.AST.visitFromInsideOut(Microsoft.FSharp.Core.FSharpFunc`2<Fable.AST.Fable.Expr,Fable.AST.Fable.Expr>, Fable.AST.Fable.Expr)
   at Fable.Transforms.AST.visit$cont@949(Microsoft.FSharp.Core.FSharpFunc`2<Fable.AST.Fable.Expr,Fable.AST.Fable.Expr>, Fable.AST.Fable.Expr, Microsoft.FSharp.Core.Unit)
   at Fable.Transforms.AST.visit(Microsoft.FSharp.Core.FSharpFunc`2<Fable.AST.Fable.Expr,Fable.AST.Fable.Expr>, Fable.AST.Fable.Expr)
   at Fable.Transforms.AST.visitFromInsideOut(Microsoft.FSharp.Core.FSharpFunc`2<Fable.AST.Fable.Expr,Fable.AST.Fable.Expr>, Fable.AST.Fable.Expr)
   at Fable.Transforms.AST.visit$cont@949(Microsoft.FSharp.Core.FSharpFunc`2<Fable.AST.Fable.Expr,Fable.AST.Fable.Expr>, Fable.AST.Fable.Expr, Microsoft.FSharp.Core.Unit)
   at Fable.Transforms.AST.visit(Microsoft.FSharp.Core.FSharpFunc`2<Fable.AST.Fable.Expr,Fable.AST.Fable.Expr>, Fable.AST.Fable.Expr)
Compiled 12/188: src/fcs-fable/SR.fs   at Fable.Transforms.AST.visitFromInsideOut(Microsoft.FSharp.Core.FSharpFunc`2<Fable.AST.Fable.Expr,Fable.AST.Fable.Expr>, Fable.AST.Fable.Expr)
...

Could you please have a look at why this is failing and if we can do something to fix it?

MangelMaxime avatar Aug 06 '23 14:08 MangelMaxime