01mf02 / jaq

A jq clone focussed on correctness, speed, and simplicity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot cargo-install 0.10

knutwalker opened this issue · comments

Hi, with the recent update to 0.10, cargo install (and by extension, cargo install-update) fails:

❯ cargo install jaq
    Updating crates.io index
  Installing jaq v0.10.0
   Compiling jaq v0.10.0
error[E0106]: missing lifetime specifier
   --> /Users/knut/.cargo/registry/src/github.com-1ecc6299db9ec823/jaq-0.10.0/src/main.rs:454:58
    |
454 | fn report(e: chumsky::error::Simple<String>) -> ariadne::Report {
    |                                                          ^^^^^^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
help: consider using the `'static` lifetime
    |
454 | fn report(e: chumsky::error::Simple<String>) -> ariadne::Report<'static> {
    |                                                                +++++++++

For more information about this error, try `rustc --explain E0106`.
error: could not compile `jaq` due to previous error

However, running cargo build and cargo build --release from the repo works.

This might be related to zesterer/ariadne#44 where Report got a lifetime parameter and this was just released as 0.1.6. This is arguably an issue with ariadne, I opened an issue with them: zesterer/ariadne#69

Thanks for reporting this breaking change! Indeed, it looks like you are right about ariadne 0.1.6 being a breaking change.
In the meanwhile, you can install jaq via cargo install --locked jaq --- but note that you will not be able to use named capture groups; see here.