Fable icon indicating copy to clipboard operation
Fable copied to clipboard

Error doesn't show .fs line number

Open terryspitz opened this issue 4 years ago • 1 comments

Description

I have a reasonable error message showing .fs filename but not obvious which line of the code is triggering it. Can all errors show the line numbers?

Repro code

not a minimal repro but a real case!

https://github.com/terryspitz/dactyl-font/tree/SpiroFs at commit a789333

Expected and actual results

Executing task: dotnet build /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary <

Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Core Copyright (C) Microsoft Corporation. All rights reserved.

Restore completed in 47 ms for C:\src\dactyl-font\SpiroFs\SpiroFs.fsproj. Restore completed in 304.53 ms for C:\src\dactyl-font\generator\generator.fsproj. Restore completed in 304.54 ms for C:\src\dactyl-font\explorer\src\explorer.fsproj. SpiroFs -> C:\src\dactyl-font\SpiroFs\bin\Debug\netstandard2.0\SpiroFs.dll generator -> C:\src\dactyl-font\generator\bin\Debug\netcoreapp3.0\generator.dlTerminal will be reused by tasks, press any key to close it. explorer -> C:\src\dactyl-font\explorer\src\bin\Debug\netcoreapp3.0\explorer.d> Executing task: npm run start <

@ start C:\src\dactyl-font\explorer webpack-dev-server

i 「wds」: Project is running at http://localhost:8080/ i 「wds」: webpack output is served from / i 「wds」: Content not from webpack is served from ./public fable-compiler 2.4.15 dotnet binary: C:\src\Fable\src\Fable.Cli fable: Compiled src\explorer.fsproj fable: Compiled src\explorer.fs × 「wdm」: Hash: 7c13cea601e6ca23db11 Version: webpack 4.41.6 Time: 32597ms Built at: 09/05/2020 11:03:37 Asset Size Chunks Chunk Names bundle.js 370 KiB main [emitted] main
Entrypoint main = bundle.js [0] multi (webpack)-dev-server/client?http://localhost:8080 ./src/explorer.fsproj 40 bytes {main} [built] [../generator/generator.fs] 356 bytes {main} [built] [failed] [1 error] [./.fable/fable-library.2.8.1/Int32.js] 4.12 KiB {main} [built] [./node_modules/ansi-html/index.js] 4.16 KiB {main} [built] [./node_modules/webpack-dev-server/client/index.js?http://localhost:8080] (webpack)-dev-server/client?http://localhost:8080 4.29 KiB {main} [built]
[./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.51 KiB {main} [built] [./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.53 KiB {main} [built] [./node_modules/webpack-dev-server/client/utils/createSocketUrl.js] (webpack)-dev-server/client/utils/createSocketUrl.js 2.91 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/log.js] (webpack)-dev-server/client/utils/log.js 964 bytes {main} [built] [./node_modules/webpack-dev-server/client/utils/reloadApp.js] (webpack)-dev-server/client/utils/reloadApp.js 1.59 KiB {main} [built] [./node_modules/webpack-dev-server/client/utils/sendMessage.js] (webpack)-dev-server/client/utils/sendMessage.js 402 bytes {main} [built] [./node_modules/webpack-dev-server/node_modules/strip-ansi/index.js] (webpack)-dev-server/node_modules/strip-ansi/index.js 161 bytes {main} [built]
[./node_modules/webpack/hot sync ^./log$] (webpack)/hot sync nonrecursive ^./log$ 170 bytes {main} [built] [./src/explorer.fs] 1.25 KiB {main} [built] [./src/explorer.fsproj] 30 bytes {main} [built] + 21 hidden modules

ERROR in ../generator/generator.fs Module build failed (from ./node_modules/fable-loader/index.js): Error: Unexpected type Enum SpiroPointType for literal [ (System.Char) (C:/src/dactyl-font/generator/generator.fs) at C:\src\dactyl-font\explorer\node_modules\fable-loader\index.js:99:22 at processTicksAndRejections (internal/process/task_queues.js:97:5) @ ./src/explorer.fs 2:0-244 12:15-65 12:81-115 12:123-127 17:21-46 @ ./src/explorer.fsproj i 「wdm」: Failed to compile.

Related information

  • Fable version: npm show fable-compiler version or yarn info fable-compiler version npm show fable-compiler version 2.9.0
  • Windows 10
  • VSCode

terryspitz avatar May 09 '20 10:05 terryspitz

Sorry for replying so late, I think I missed the notification of this issue 😓 Not sure why the line is not shown, maybe this has been caused by an uncaught exception and the range information has been lost. I'll try to investigate.

alfonsogarciacaro avatar Nov 06 '20 02:11 alfonsogarciacaro