You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've inherited from code that uses jaq 1.5 and did something like this:
use jaq_core;use jaq_interpret::{Ctx,Filter,FilterT,ParseCtx,RcIter,Val};use jaq_std;fnnew(jq:&str,inputs:Vec<String>) -> Result<Self,String>{letmut defs = ParseCtx::new(inputs.clone());
defs.insert_natives(jaq_core::core());
defs.insert_defs(jaq_std::std());let(parsed, errs) = jaq_parse::parse(jq, jaq_parse::main());// ...letSome(parsed) = parsed else{returnErr("parsed filter contains no main handler".to_string());};// ...Ok(Jq{ inputs, filter })}
Now with jaq 2.1 this does not compile anymore as the API changed, we get errors such as:
error[E0425]: cannot find function `core` incrate `jaq_core`
--> src/nodes/jq.rs:72:39
|
72 | defs.insert_natives(jaq_core::core());
| ^^^^ not found in `jaq_core`
For the life of me I cannot figure out how this translates into jaq 2.1. Is there a migration guide or a clear changelog somewhere (that isn't just a link to the commits)? I am not even able to understand where the above 1.5 example was sourced from as it doesn't seem to be a part of 1.5 documentation or examples.
Thank you.
The text was updated successfully, but these errors were encountered:
Oh, I see, it seems I misinterpreted the purpose of the project! I seem to understand it does not provide a stable Rust API, but really a pure Rust jq clone, my bad. Ok, I see now the above snippet was taken from the crate itself, and based on what I see in the 2.1 crate I should be able to work with that!
Hello,
We've inherited from code that uses jaq 1.5 and did something like this:
Now with jaq 2.1 this does not compile anymore as the API changed, we get errors such as:
For the life of me I cannot figure out how this translates into jaq 2.1. Is there a migration guide or a clear changelog somewhere (that isn't just a link to the commits)? I am not even able to understand where the above 1.5 example was sourced from as it doesn't seem to be a part of 1.5 documentation or examples.
Thank you.
The text was updated successfully, but these errors were encountered: