Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling fails - error[E0599] #15

Closed
Openuser87 opened this issue May 6, 2024 · 4 comments
Closed

Compiling fails - error[E0599] #15

Openuser87 opened this issue May 6, 2024 · 4 comments

Comments

@Openuser87
Copy link

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
Copy link
Contributor

Zheoni commented May 6, 2024

Thanks for reporting. This is an issue with the dependency ariadne that I just reported (zesterer/ariadne#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
Copy link

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, 01mf02/jaq#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
Copy link
Contributor

Zheoni commented Jul 26, 2024

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.

  • As the codesnake description says Pretty printer for non-overlapping code spans non-overlapping and we have a couple of overlapping code spans. This should be easy to solve but requires manually checking every possible error span created by the compiler.

  • It does not support "empty labels" which we use quite often. This is highlighting a piece of code without adding an arrow with a message. (Like the one in the image, the arrow should not be there)

image

I have opened an issue in codesnake (01mf02/codesnake#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
Copy link
Contributor

Zheoni commented Aug 12, 2024

Fixed in 0.13.3 😄

@Zheoni Zheoni closed this as completed Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants