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

Build failure for v1.3.0 on macos & linux, but building from latest main (1699a7d1fc7ede) works #176

Closed
derekfrye opened this issue Apr 30, 2024 · 5 comments · Fixed by #185

Comments

@derekfrye
Copy link

I just tried to compile the latest version with cargo, and maybe I'm doing something wrong but I can only get v1.2.0 to build. Here's what I tried.

Note, if i either cargo install jaq --version "1.2.0" or I clone from git (1699a7d1fc7ede as of now) I can build either of those. So IDK..? I am pretty new to rust so maybe I'm missing a step?

$ uname -a
Darwin NUSLANYKC904450 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:19:22 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8112 arm64
$ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
$ rustc --version
rustc 1.77.2 (25ef9e3d8 2024-04-09)
$ cargo --version
cargo 1.77.2 (e52e36006 2024-03-26)
$ cargo install jaq
    Updating crates.io index
    Installing jaq v1.3.0
    Updating crates.io index
  Downloaded cc v1.0.96
  Downloaded 1 crate (76.6 KB) in 1.02s
   Compiling proc-macro2 v1.0.81
   ...
   Compiling jaq v1.3.0
error[E0599]: no variant or associated item named `Unset` found for enum `ariadne::Color` in the current scope
   --> /Users/a0761532/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jaq-1.3.0/src/main.rs:476:17
    |
476 |         (Color::Unset, Color::Unset)
    |                 ^^^^^ variant or associated item not found in `Color`

error[E0599]: no variant or associated item named `Unset` found for enum `ariadne::Color` in the current scope
   --> /Users/a0761532/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jaq-1.3.0/src/main.rs:476:31
    |
476 |         (Color::Unset, Color::Unset)
    |                               ^^^^^ variant or associated item not found in `Color`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `jaq` (bin "jaq") due to 2 previous errors
error: failed to compile `jaq v1.3.0`, intermediate artifacts can be found at `/var/folders/vf/9dvlj94d7d990822xvnpbqn40000gn/T/cargo-installa6qIVu`.

I get the same thing on my linux machine.

$ uname -a
Linux m1n3 6.8.7-402.asahi.fc39.aarch64+16k #1 SMP PREEMPT_DYNAMIC Wed Apr 24 00:11:34 UTC 2024 aarch64 GNU/Linux
@qtfkwk
Copy link

qtfkwk commented May 5, 2024

I'm on LInux and getting the same error installing via either cargo install jaq or cargo install --git https://github.com/01mf02/jaq, but the line reference I see is jaq/src/main.rs:498 not 476.

Color::Unset is indeed invalid, according to the Color enum:

enum Color {
    Always,
    Auto,
    Never,
}

How was this even able to publish to crates.io?

EDIT: Wrong Color... I missed use ariadne::{Color, Fmt, Label, Report, ReportKind}; on line 490

@qtfkwk
Copy link

qtfkwk commented May 5, 2024

ariadne::Color is really yansi::Color...

jaq depends on ariadne 0.4.0 (released 2024-01-01; 0.4.1 was just released 2024-04-25 but last commit to jaq was 2024-04-19)...

But this is weird: ariadne 0.4.0 depends on yansi 0.5.0 (released 2018-11-30; but latest is 1.0.1 on 2024-03-13)... so... ?

Also: yansi 0.5.0 Color::Unset is valid (?)

Side note relating to my previous comment: jaq/src/main.rs has a different Color enum, hence the use ariadne::{Color, Fmt, Label, Report, ReportKind}; on line 490.

@qtfkwk
Copy link

qtfkwk commented May 5, 2024

@aretrosen
Copy link

@qtfkwk when you do cargo install --git https://github.com/aretrosen/jaq.git, the Cargo.lock file is not used. See rust-lang/cargo#7169. Use cargo install --git https://github.com/aretrosen/jaq.git --locked.

@01mf02
Copy link
Owner

01mf02 commented May 7, 2024

This issue is due to a release of the ariadne package that does not respect semantic versioning.
In the meantime, you can use cargo install --locked jaq.

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

Successfully merging a pull request may close this issue.

4 participants