cooklang / cooklang-rs

Canonical Cooklang parser in Rust
https://cooklang.github.io/cooklang-rs/
MIT License
44 stars 6 forks source link

Compiling fails - error[E0599] #15

Closed Openuser87 closed 3 months ago

Openuser87 commented 6 months ago

Following error occurs upon using cargo install cooklang-chef:

error[E0599]: no variant or associated item named `Default` found for enum `Color` in the current scope
   --> /home/<user>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cooklang-0.13.2/src/error.rs:496:20
    |
496 |             Color::Default
    |                    ^^^^^^^ variant or associated item not found in `Color`

Versions: cargo 1.77.2, rustc 1.77.2.

Zheoni commented 6 months ago

Thanks for reporting. This is an issue with the dependency ariadne that I just reported (https://github.com/zesterer/ariadne/issues/116). Until it's solved or a new version is released you can install chef with cargo install cooklang-chef --locked.

For library users, patch the ariadne version to "=0.4.0" until this is solved by, for example, adding it as a dependency even if you don't use it.

johnhkchen commented 4 months ago

Hello, it's been a few months but the ariadne crate is still inactive.

It seems like this other user switched to a different crate, https://github.com/01mf02/jaq/pull/185

https://crates.io/crates/codesnake

Codesnake is pretty explicitly meant as a rewrite of Ariadne.

Perhaps I can work on the switch to codesnake?

Zheoni commented 4 months ago

Hi, I have also been following the issue and considered codesnake. I started porting the code and it's pretty much done. But I realised that some features were missing or had limitations.

image

I have opened an issue in codesnake (https://github.com/01mf02/codesnake/issues/2) to see if the creator wants the empty labels feature. Also, my work with codesnake is in the new codesnake branch of this repo.

Zheoni commented 3 months ago

Fixed in 0.13.3 😄