We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems like we are missing information about the original file file and the source., which cause Fable 5 to break if --sourceMaps is provided.
--sourceMaps
To me it looks like the last blocking bug we need to fix to release Fable 5. Other things like full support for F# 9 feature can be done over time.
./../quicktest/QuickTest.fs(1,1): error EXCEPTION: Invalid mapping: { generated = { line = 54 column = 85 } name = None original = Some { line = 0 column = 0 } source = Some "unknown" } at SourceMapSharp.SourceMapGenerator.ValidateMapping(MappingIndex generated, FSharpOption`1 original, FSharpOption`1 source, FSharpOption`1 name) at SourceMapSharp.SourceMapGenerator.AddMapping(MappingIndex generated, FSharpOption`1 original, FSharpOption`1 source, FSharpOption`1 name) at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintCallExpression(Printer printer, Expression callee, Expression[] args, TypeAnnotation[] typeArguments, FSharpOption`1 loc) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 1231 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintArrowFunctionExpression(Printer printer, Parameter[] parameters, BlockStatement body, FSharpOption`1 returnType, TypeParameter[] typeParameters, FSharpOption`1 loc) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 1041 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer-PrintCommaSeparatedArray@229-10.Invoke(Printer p, Expression x) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 229 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintArray[a](Printer printer, a[] items, FSharpFunc`2 print, FSharpFunc`2 printSeparator) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 135 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintCommaSeparatedArray(Printer printer, Expression[] items) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 229 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintCallExpression(Printer printer, Expression callee, Expression[] args, TypeAnnotation[] typeArguments, FSharpOption`1 loc) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 1235 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer-PrintCommaSeparatedArray@229-10.Invoke(Printer p, Expression x) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 229 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintArray[a](Printer printer, a[] items, FSharpFunc`2 print, FSharpFunc`2 printSeparator) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 135 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintCommaSeparatedArray(Printer printer, Expression[] items) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 229 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintCallExpression(Printer printer, Expression callee, Expression[] args, TypeAnnotation[] typeArguments, FSharpOption`1 loc) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 1235 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintArrowFunctionExpression(Printer printer, Parameter[] parameters, BlockStatement body, FSharpOption`1 returnType, TypeParameter[] typeParameters, FSharpOption`1 loc) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 1041 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer-PrintCommaSeparatedArray@229-10.Invoke(Printer p, Expression x) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 229 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintArray[a](Printer printer, a[] items, FSharpFunc`2 print, FSharpFunc`2 printSeparator) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 135 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintCommaSeparatedArray(Printer printer, Expression[] items) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 229 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintCallExpression(Printer printer, Expression callee, Expression[] args, TypeAnnotation[] typeArguments, FSharpOption`1 loc) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 1235 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer-PrintCommaSeparatedArray@229-10.Invoke(Printer p, Expression x) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 229 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintArray[a](Printer printer, a[] items, FSharpFunc`2 print, FSharpFunc`2 printSeparator) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 135 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintCommaSeparatedArray(Printer printer, Expression[] items) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 229 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintCallExpression(Printer printer, Expression callee, Expression[] args, TypeAnnotation[] typeArguments, FSharpOption`1 loc) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 1235 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintProductiveStatement(Printer printer, Statement s, FSharpOption`1 printSeparator) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 78 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer-PrintBlock@88.Invoke(Printer p, Statement s) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 88 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintBlock[a](Printer printer, a[] nodes, FSharpFunc`2 printNode, FSharpFunc`2 printSeparator, FSharpOption`1 skipNewLineAtEnd) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 61 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintArrowFunctionExpression(Printer printer, Parameter[] parameters, BlockStatement body, FSharpOption`1 returnType, TypeParameter[] typeParameters, FSharpOption`1 loc) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 1041 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer-PrintCommaSeparatedArray@229-10.Invoke(Printer p, Expression x) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 229 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintArray[a](Printer printer, a[] items, FSharpFunc`2 print, FSharpFunc`2 printSeparator) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 135 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintCommaSeparatedArray(Printer printer, Expression[] items) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 229 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintCallExpression(Printer printer, Expression callee, Expression[] args, TypeAnnotation[] typeArguments, FSharpOption`1 loc) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 1235 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintProductiveStatement(Printer printer, Statement s, FSharpOption`1 printSeparator) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 78 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer-PrintBlock@88.Invoke(Printer p, Statement s) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 88 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintBlock[a](Printer printer, a[] nodes, FSharpFunc`2 printNode, FSharpFunc`2 printSeparator, FSharpOption`1 skipNewLineAtEnd) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 61 at Fable.Transforms.BabelPrinter.PrinterExtensions.Printer.PrintDeclaration(Printer printer, Declaration decl) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 664 at Fable.Transforms.BabelPrinter.printDeclWithExtraLine@1558-1.Invoke(Printer printer, ModuleDeclaration decl) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 1558 at [email protected](ModuleDeclaration decl) in /Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/Fable.Transforms/BabelPrinter.fs:line 1585 at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in /home/dev/Projects/fsharp/src/FSharp.Core/async.fs:line 510 at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in /home/dev/Projects/fsharp/src/FSharp.Core/async.fs:line 112
Add |> CmdLine.appendRaw "--sourceMaps" to src/Fable.Build/Quicktest/Core.fs and run ./build.sh quicktest javascript
|> CmdLine.appendRaw "--sourceMaps"
src/Fable.Build/Quicktest/Core.fs
./build.sh quicktest javascript
Should compile
5.0.0-alpha.2
The text was updated successfully, but these errors were encountered:
It looks like the issue happens when a CE exist in the code:
let testCaseAsync f = async { do! f () }
or
let testCaseAsync f = promise { do! f () }
both fails
Sorry, something went wrong.
Comparing the calls to AddSourceMapping
AddSourceMapping
Fable/src/Fable.Cli/Pipeline.fs
Line 152 in 935f05a
It seems like the problem is from do! which don't return its information now:
do!
Fable 4.24.0
srcLine: 9 srcCol: 4 genLine: 4 genCol: 11 file: Some "/Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/quicktest/QuickTest.fs" displayName: None srcLine: 9 srcCol: 4 genLine: 4 genCol: 11 file: Some "/Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/quicktest/QuickTest.fs" displayName: Some "``builder@``" srcLine: 10 srcCol: 12 genLine: 4 genCol: 33 file: Some "/Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/quicktest/QuickTest.fs" displayName: None
Fable 5
srcLine: 9 srcCol: 4 genLine: 4 genCol: 11 file: Some "/Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/quicktest/QuickTest.fs" displayName: None srcLine: 9 srcCol: 4 genLine: 4 genCol: 11 file: Some "/Users/mmangel/Workspaces/Github/fable-compiler/Fable/src/quicktest/QuickTest.fs" displayName: Some "``builder@``" srcLine: 0 srcCol: 0 genLine: 4 genCol: 33 file: Some "unknown" displayName: None
See the last paragraph
No branches or pull requests
Description
It seems like we are missing information about the original file file and the source., which cause Fable 5 to break if
--sourceMaps
is provided.To me it looks like the last blocking bug we need to fix to release Fable 5. Other things like full support for F# 9 feature can be done over time.
Repro code
Add
|> CmdLine.appendRaw "--sourceMaps"
tosrc/Fable.Build/Quicktest/Core.fs
and run./build.sh quicktest javascript
Expected and actual results
Should compile
Related information
5.0.0-alpha.2
The text was updated successfully, but these errors were encountered: