I'm attempting to use Lustre and the lustre_dev_tools project relies on this project as a dependency.
However, the mist package when ends up in my packages folder doesn't compile due to the following code in ./src/mist/internal/websocket.gleam:
fn unmask_data(
data: BitArray,
masks: List(BitArray),
index: Int,
resp: BitArray,
) -> BitArray {
case data {
<<masked:bits-size(8), rest:bits>> -> {
let assert Ok(mask_value) = list.at(masks, index % 4)
let unmasked = crypto_exor(mask_value, masked)
unmask_data(rest, masks, index + 1, <<resp:bits, unmasked:bits>>)
}
_ -> resp
}
}
The compilation error message is:
/gleam_dev/lustre_play_gleam/build/packages/mist/src/mist/internal/websocket.gleam:44:39
│
44 │ let assert Ok(mask_value) = list.at(masks, index % 4)
│ ^^^ Did you mean `last`?
The module `gleam/list` does not have a `at` value.
The lustre_dev_tools project lists mist as a dependency in the gleam.toml file as such:
mist = "~> 1.0"
I tried to the version of websocket.gleam on my local computer to what you have in this github repo, and it seems that you've refactored it recently as the unmask_data function is not present in that file now.
Is it possible that whatever solution was implemented for package management has "cached" the previous 1.0.0 version of mist and that the old version is still being pulled down because you haven't bumped the version?
Hello, I'm new to Gleam.
I'm attempting to use Lustre and the lustre_dev_tools project relies on this project as a dependency.
However, the mist package when ends up in my packages folder doesn't compile due to the following code in ./src/mist/internal/websocket.gleam:
The compilation error message is:
The lustre_dev_tools project lists mist as a dependency in the gleam.toml file as such:
I tried to the version of websocket.gleam on my local computer to what you have in this github repo, and it seems that you've refactored it recently as the unmask_data function is not present in that file now.
Is it possible that whatever solution was implemented for package management has "cached" the previous 1.0.0 version of mist and that the old version is still being pulled down because you haven't bumped the version?