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

Adding jmespath to dependencies causes compile error #39

Closed
turettn opened this issue Apr 16, 2021 · 7 comments
Closed

Adding jmespath to dependencies causes compile error #39

turettn opened this issue Apr 16, 2021 · 7 comments

Comments

@turettn
Copy link

turettn commented Apr 16, 2021

I added jmespath to an existing project, and immediately started getting weird compile errors. I tried replicating with a blank project, added the dependency, and got the same result:

$ cargo new mytest
     Created binary (application) `mytest` package
$ echo 'jmespath = "^0.2.0"' >> mytest/Cargo.toml 
$ cd mytest
$ cargo build
    Updating crates.io index
   Compiling serde v1.0.125
   Compiling ryu v1.0.5
   Compiling serde_json v1.0.64
   Compiling deunicode v0.4.3
   Compiling itoa v0.4.7
   Compiling lazy_static v0.2.11
   Compiling slug v0.1.4
   Compiling jmespath v0.2.0
error[E0603]: enum `ErrorCode` is private
   --> /home/nturett/.cargo/registry/src/github.com-1ecc6299db9ec823/jmespath-0.2.0/src/variable.rs:9:32
    |
9   | use serde_json::error::{Error, ErrorCode};
    |                                ^^^^^^^^^ private enum
    |
note: the enum `ErrorCode` is defined here
   --> /home/nturett/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_json-1.0.64/src/error.rs:176:1
    |
176 | pub(crate) enum ErrorCode {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0624]: associated function `syntax` is private
    --> /home/nturett/.cargo/registry/src/github.com-1ecc6299db9ec823/jmespath-0.2.0/src/variable.rs:1205:36
     |
1205 |             _ => return Err(Error::syntax(ErrorCode::KeyMustBeAString, 0, 0)),
     |                                    ^^^^^^ private associated function

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0603, E0624.
For more information about an error, try `rustc --explain E0603`.
error: could not compile `jmespath`

I'm relatively new to Rust, so if I'm doing something wrong please let me know.

@davisp
Copy link

davisp commented Apr 19, 2021

I'm seeing the same errors as well locally. My rustc version is:

$ rustc --version
rustc 1.51.0 (2fd73fabe 2021-03-23)

@davisp
Copy link

davisp commented Apr 19, 2021

@turettn This appears to be fixed on master.

@turettn
Copy link
Author

turettn commented Apr 23, 2021

@davisp Good catch. Based on the lack of release despite #35, and the lack of commits in the past year, I'm tempted to assume this project is mothballed.

@davisp
Copy link

davisp commented Apr 23, 2021

@turettn I did notice there's another crate under jmespatch that is this repo with some patches.

@cetra3
Copy link
Collaborator

cetra3 commented Apr 27, 2021

@davisp & @turettn it's not mothballed, just that PR is massive & will take some time to work through. There is a lot of work to be done to modernise this library & would love your help if you are able.

@turettn
Copy link
Author

turettn commented Apr 28, 2021

@cetra3 Excellent news - I completely missed the recent updates to that massive PR.

I'm very much a Rust novice, but I'll take a look at the giant PR and see if there's anything I can do where I won't just be in the way.

@cetra3
Copy link
Collaborator

cetra3 commented Feb 24, 2022

@turettn I have published 0.3.0 of this lib which should resolve compilation errors. Let me know how you go!

@cetra3 cetra3 closed this as completed Feb 24, 2022
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