When I download an exercise using exercism download --exercise=two-fer --track=gleam and then run gleam build in the directory it downloaded to I get the following compiler error:
PS C:\Users\aage\Exercism\gleam\two-fer> gleam build
Downloading packages
Downloaded 3 packages in 0.52s
Compiling gleam_stdlib
error: Syntax error
┌─ build\packages\gleam_stdlib\src\gleam\dynamic.gleam:332:22
│
332 │ use inner_result <- result.then(decode_result(value))
│ ^ This operator has no value on its right side.
Hint: Remove it or put a value after it.
Am I doing something wrong?
Running on VSCode in Windows 10
This is the output of gleam --version: gleam 0.22.1
This error shouldn’t happen. The exercise requires a stdlib version of at least 0.26.0. The manifest.toml locks in 0.27.0. The manifest acts like a .lockfile in Node/JavaScript. The error you’re getting is caused by the older version of Gleam failing to build the newer standard library.
See Installing Gleam – Gleam for installation information. I personally like using the asdf version manager, on Windows it might be easier to use the prebuilt binary.
Hope that helps. :)
Edit: Was confused in my first response, thank you to lpil for clearing things up.