gleam-lang / gleam

⭐️ A friendly language for building type-safe, scalable systems!
https://gleam.run
Apache License 2.0
16.51k stars 691 forks source link

Crash of gleam compiler on windows (VS Code - LSP) #3214

Open codemonkey76 opened 1 month ago

codemonkey76 commented 1 month ago

This is on Windows 11, VS Code 1.89.1, Gleam 1.2.0 I set environment variable GLEAM_LOG=trace, but didn't seem to make any difference to the output.

INFO creating_new_language_server_engine path="\\wsl.localhost\Ubuntu\home\shane\dev\gleam\gleam_cymbal" error: Fatal compiler bug!

This is a bug in the Gleam compiler, sorry!

Please report this crash to https://github.com/gleam-lang/gleam/issues/new and include this error message with your report.

Panic: compiler-cli\src\build_lock.rs:40 Trying build locking: Os { code: 1, kind: Uncategorized, message: "Incorrect function." } Gleam version: 1.2.0 Operating system: windows

If you can also share your code and say what file you were editing or any steps to reproduce the crash that would be a great help.

You may also want to try again with the GLEAM_LOG=trace environment variable set.

[Error - 6:47:03 PM] Updating trace failed with error Error: Cannot call write after a stream was destroyed at new NodeError (node:internal/errors:405:5) at _write (node:internal/streams/writable:324:11) at Writable.write (node:internal/streams/writable:337:10) at c:\Users\Shane.vscode\extensions\gleam.gleam-2.9.0\out\extension.js:1:75514 at new Promise () at a.write (c:\Users\Shane.vscode\extensions\gleam.gleam-2.9.0\out\extension.js:1:75432) at y.doWrite (c:\Users\Shane.vscode\extensions\gleam.gleam-2.9.0\out\extension.js:1:63048) at c:\Users\Shane.vscode\extensions\gleam.gleam-2.9.0\out\extension.js:1:62943 [Info - 6:47:03 PM] Connection to server got closed. Server will restart.

Please report this crash to https://github.com/gleam-lang/gleam/issues/new and include this error message with your report.

Panic: compiler-cli\src\build_lock.rs:40 Trying build locking: Os { code: 1, kind: Uncategorized, message: "Incorrect function." } Gleam version: 1.2.0 Operating system: windows

lpil commented 1 month ago

Thank you. Looking like we couldn't establish a file lock for some reason?

Does it always happen? Or only under certain circumstances? Is it on an external drive or unusual file system?