gleam-lang/gleam

PowerShell on a WSL mount results in compiler crash

Open

#3,948 opened on Dec 3, 2024

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Rust (21,417 stars) (960 forks)batch import
help wanted

Description

The setup:

  • OS: Windows 11 Home
  • Shell: PowerShell (with Gleam installed via Scoop)
  • Gleam 1.6.2
  • Project: vanilla gladvent one, (important!) on a WSL mount.
PS Microsoft.PowerShell.Core\FileSystem::\\wsl.localhost\Ubuntu\home\martin\advent-of-code> gleam run new 13 --year 2023
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:47
        Trying build locking: Os { code: 1, kind: Uncategorized, message: "Incorrect function." }
Gleam version: 1.6.2
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.

I wasn't able to make Gleam log more. I tried these PowerShell ways to do it:

  • Set-Variable -Name "GLEAM_LOG" -Value "trace"
  • $Env:GLEAM_LOG = "trace"

A relevant finding: The same command in the same PowerShell session, but in C:\whatever, works just fine. So the issue seems to be something about WSL mounts when accessed from Windows "over the network".

Contributor guide