Skip to content

Commit

Permalink
release v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
V0ldek committed Feb 14, 2023
1 parent 1a23ae5 commit 9956fed
Show file tree
Hide file tree
Showing 7 changed files with 132 additions and 65 deletions.
73 changes: 70 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,76 @@

All notable changes to this project will be documented in this file.

## [0.3.0] - 2023-02-14

### Features

- Better error reporting. (#88)
- Added separate `engine::error::DepthError` type.
- Additional context for depth-related `EngineError`s including the character at which depth overflow occurred.
- New error, `EngineError::MissingClosingCharacter` reported if the engine reaches end of JSON and cannot match opening characters.
- Improvements to the CLI error reporting/display.
- Increase max automaton size to 256 from 128.
- Compiling wildcard child selectors. (#90, #7)
- Expressions parsed in #6 are now compiled into correct automata.
- Wildcard child support in engines. (#9, #8, #73)
- Large overhaul to the query engines to enable processing the wildcard child selector. This closes the #9 epic of wildcard child support.
- Both `main` and `recursive` engines now support wildcard child selectors.
- The `commas` feature flag was removed.
- Feature flags of `head-skip`, `tail-skip`, and `unique-labels` were introduced to guard optimization paths.
- The `head-skip` and `tail-skip` features make the code faster without significant tradeoffs.
- The `unique-labels` feature utilizes the assumption of key uniqueness within a single JSON object to speed up query execution, but it will not work correctly when an object with duplicate keys is given. Currently only the first occurence of such a key will be processed.
- Many changes to the library structure and module visibility.

### Bug Fixes

- Too complex query now produces an error. (#88)
- Previously the compiled automaton was silently truncated, which would cause incorrect results.

### Reliability

- Rename engine modules. (#88)
- The `Runner` trait was renamed to `Engine`.
- The `stackless` module is now `engine::main`.
- The `stack_based` module is now `engine::recursive`.
- The `StacklessRunner` is now the `MainEngine`, and is also reexported as `engine::RsonpathEngine`
- The `StackBasedRunner` is now the `RecursiveEngine`.
- Added the `Compiler` trait. (#88)
- The `compile_query` function creating engines is now part of that trait.
- Rename `NotSupportedError` to `NotSupported`.
- Moved `result` to a standalone module.
- Move all classifiers to `classification`.
- Module `classify` renamed to `classification`.
- Moved all resumption related things to `classification` proper.
- Removed only use of `unsafe` outside of SIMD.
- Forbid unsafe code outside of simd.
- Added test for heterogenous list.
- Hide `debug` and `bin` macros.
- Added `Compiler::from_compiled_query`.

### Dependencies

- Bump clap from 4.0.25 to 4.1.4.

- Bumped a number of dependencies.
- backtrace (required by color-eyre) from 0.3.65 to 0.3.67.
- once_cell (required by color-eyre) from 1.16.0 to 1.17.0.
- owo-colors (required by color-eyre) from 3.3.0 to 3.5.0.
- ppv-lite86 (required by thiserror) from 0.2.16 to 0.2.17.
- itoa (required by simple_logger) from 1.0.2 to 1.0.5.
- Remove benchmarks crate from workspace.
- This drastically reduces the number of dependencies tracked for the binary.
- Make some deps optional.
- `memchr` is now included only with the `head-skip` feature
- `replace_with` is now included only with the `tail-skip` feature

### Documentation

- Update toplevel lib docs.
- Add separate README for lib.
- Updated most of module docs.
- Added architecture diagram to lib README.

## [0.2.1] - 2023-01-25

### Features
Expand All @@ -13,18 +83,15 @@ All notable changes to this project will be documented in this file.
- Specifying `--compile` or `-c` will cause rsonpath to compile the query and output its automaton, without running the engine.
This option is mutually exclusive with `--engine` or providing an input path.


### Bug Fixes

- Compile error on `cargo install rsonpath`. ([#86](https://github.com/V0ldek/rsonpath/issues/86))


### Reliability

- Added install check to release CI/CD. ([#86](https://github.com/V0ldek/rsonpath/issues/86))
- This will catch issues with the simplest `cargo install rsonpath` invocation before release to avoid these issues in the future.


### Dependencies

- Bump cc from 1.0.76 to 1.0.78. ([#82](https://github.com/V0ldek/rsonpath/issues/82))
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

105 changes: 54 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ cargo tree --package rsonpath --edges normal --depth 1

<!-- rsonpath dependencies start -->
```ini
rsonpath v0.2.1 (/home/mgienieczko/rsonpath/crates/rsonpath)
├── clap v4.0.25
rsonpath v0.3.0 (/home/mat/rsonpath/crates/rsonpath)
├── clap v4.1.4
├── color-eyre v0.6.2
├── eyre v0.6.8
├── log v0.4.17
├── rsonpath-lib v0.2.1 (/home/mgienieczko/rsonpath/crates/rsonpath-lib)
├── rsonpath-lib v0.3.0 (/home/mat/rsonpath/crates/rsonpath-lib)
└── simple_logger v4.0.0
```
<!-- rsonpath dependencies end -->
Expand All @@ -181,7 +181,7 @@ cargo tree --package rsonpath-lib --edges normal --depth 1

<!-- rsonpath-lib dependencies start -->
```ini
rsonpath-lib v0.2.1 (/home/mgienieczko/rsonpath/crates/rsonpath-lib)
rsonpath-lib v0.3.0 (/home/mat/rsonpath/crates/rsonpath-lib)
├── aligners v0.0.10
├── cfg-if v1.0.0
├── log v0.4.17
Expand Down Expand Up @@ -217,60 +217,62 @@ cargo tree --package rsonpath --edges normal

<!-- rsonpath-full dependencies start -->
```ini
rsonpath v0.2.1 (/home/mgienieczko/rsonpath/crates/rsonpath)
├── clap v4.0.25
│ ├── atty v0.2.14
│ │ └── libc v0.2.139
rsonpath v0.3.0 (/home/mat/rsonpath/crates/rsonpath)
├── clap v4.1.4
│ ├── bitflags v1.3.2
│ ├── clap_derive v4.0.21 (proc-macro)
│ │ ├── heck v0.4.0
│ ├── clap_derive v4.1.0 (proc-macro)
│ │ ├── heck v0.4.1
│ │ ├── proc-macro-error v1.0.4
│ │ │ ├── proc-macro-error-attr v1.0.4 (proc-macro)
│ │ │ │ ├── proc-macro2 v1.0.47
│ │ │ │ │ └── unicode-ident v1.0.0
│ │ │ │ └── quote v1.0.18
│ │ │ │ └── proc-macro2 v1.0.47 (*)
│ │ │ ├── proc-macro2 v1.0.47 (*)
│ │ │ ├── quote v1.0.18 (*)
│ │ │ └── syn v1.0.75
│ │ │ ├── proc-macro2 v1.0.47 (*)
│ │ │ ├── quote v1.0.18 (*)
│ │ │ └── unicode-xid v0.2.2
│ │ ├── proc-macro2 v1.0.47 (*)
│ │ ├── quote v1.0.18 (*)
│ │ └── syn v1.0.75 (*)
│ ├── clap_lex v0.3.0
│ │ └── os_str_bytes v6.1.0
│ ├── once_cell v1.16.0
│ │ │ │ ├── proc-macro2 v1.0.51
│ │ │ │ │ └── unicode-ident v1.0.6
│ │ │ │ └── quote v1.0.23
│ │ │ │ └── proc-macro2 v1.0.51 (*)
│ │ │ ├── proc-macro2 v1.0.51 (*)
│ │ │ ├── quote v1.0.23 (*)
│ │ │ └── syn v1.0.107
│ │ │ ├── proc-macro2 v1.0.51 (*)
│ │ │ ├── quote v1.0.23 (*)
│ │ │ └── unicode-ident v1.0.6
│ │ ├── proc-macro2 v1.0.51 (*)
│ │ ├── quote v1.0.23 (*)
│ │ └── syn v1.0.107 (*)
│ ├── clap_lex v0.3.1
│ │ └── os_str_bytes v6.4.1
│ ├── is-terminal v0.4.3
│ │ ├── io-lifetimes v1.0.5
│ │ │ └── libc v0.2.139
│ │ └── rustix v0.36.8
│ │ ├── bitflags v1.3.2
│ │ ├── io-lifetimes v1.0.5 (*)
│ │ ├── libc v0.2.139
│ │ └── linux-raw-sys v0.1.4
│ ├── once_cell v1.17.0
│ ├── strsim v0.10.0
│ ├── termcolor v1.1.3
│ └── terminal_size v0.2.2
│ └── rustix v0.35.13
│ ├── bitflags v1.3.2
│ ├── io-lifetimes v0.7.5
│ ├── libc v0.2.139
│ └── linux-raw-sys v0.0.46
│ ├── termcolor v1.2.0
│ └── terminal_size v0.2.3
│ └── rustix v0.36.8 (*)
├── color-eyre v0.6.2
│ ├── backtrace v0.3.65
│ │ ├── addr2line v0.17.0
│ │ │ └── gimli v0.26.1
│ ├── backtrace v0.3.67
│ │ ├── addr2line v0.19.0
│ │ │ └── gimli v0.27.1
│ │ ├── cfg-if v1.0.0
│ │ ├── libc v0.2.139
│ │ ├── miniz_oxide v0.5.1
│ │ ├── miniz_oxide v0.6.2
│ │ │ └── adler v1.0.2
│ │ ├── object v0.28.3
│ │ ├── object v0.30.3
│ │ │ └── memchr v2.5.0
│ │ └── rustc-demangle v0.1.21
│ ├── eyre v0.6.8
│ │ ├── indenter v0.3.3
│ │ └── once_cell v1.16.0
│ │ └── once_cell v1.17.0
│ ├── indenter v0.3.3
│ ├── once_cell v1.16.0
│ └── owo-colors v3.3.0
│ ├── once_cell v1.17.0
│ └── owo-colors v3.5.0
├── eyre v0.6.8 (*)
├── log v0.4.17
│ └── cfg-if v1.0.0
├── rsonpath-lib v0.2.1 (/home/mgienieczko/rsonpath/crates/rsonpath-lib)
├── rsonpath-lib v0.3.0 (/home/mat/rsonpath/crates/rsonpath-lib)
│ ├── aligners v0.0.10
│ │ ├── cfg-if v1.0.0
│ │ ├── lazy_static v1.4.0
Expand All @@ -286,31 +288,32 @@ rsonpath v0.2.1 (/home/mgienieczko/rsonpath/crates/rsonpath)
│ ├── smallvec v1.10.0
│ ├── thiserror v1.0.38
│ │ └── thiserror-impl v1.0.38 (proc-macro)
│ │ ├── proc-macro2 v1.0.47 (*)
│ │ ├── quote v1.0.18 (*)
│ │ └── syn v1.0.75 (*)
│ │ ├── proc-macro2 v1.0.51 (*)
│ │ ├── quote v1.0.23 (*)
│ │ └── syn v1.0.107 (*)
│ └── vector-map v1.0.1
│ ├── contracts v0.4.0 (proc-macro)
│ │ ├── proc-macro2 v1.0.47 (*)
│ │ ├── quote v1.0.18 (*)
│ │ └── syn v1.0.75 (*)
│ │ ├── proc-macro2 v1.0.51 (*)
│ │ ├── quote v1.0.23 (*)
│ │ └── syn v1.0.107 (*)
│ └── rand v0.7.3
│ ├── getrandom v0.1.16
│ │ ├── cfg-if v1.0.0
│ │ └── libc v0.2.139
│ ├── libc v0.2.139
│ ├── rand_chacha v0.2.2
│ │ ├── ppv-lite86 v0.2.16
│ │ ├── ppv-lite86 v0.2.17
│ │ └── rand_core v0.5.1
│ │ └── getrandom v0.1.16 (*)
│ └── rand_core v0.5.1 (*)
└── simple_logger v4.0.0
├── colored v2.0.0
│ ├── atty v0.2.14 (*)
│ ├── atty v0.2.14
│ │ └── libc v0.2.139
│ └── lazy_static v1.4.0
├── log v0.4.17 (*)
└── time v0.3.17
├── itoa v1.0.2
├── itoa v1.0.5
├── libc v0.2.139
├── num_threads v0.1.6
├── time-core v0.1.0
Expand Down
2 changes: 1 addition & 1 deletion crates/rsonpath-benchmarks
2 changes: 1 addition & 1 deletion crates/rsonpath-lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rsonpath-lib"
version = "0.2.1"
version = "0.3.0"
authors = ["Mateusz Gienieczko <[email protected]>"]
edition = "2021"
description = "Blazing fast JSONPath query engine powered by SIMD. Core library of `rsonpath`."
Expand Down
7 changes: 2 additions & 5 deletions crates/rsonpath-lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ cargo tree --package rsonpath-lib --edges normal --depth 1

<!-- rsonpath-lib dependencies start -->
```ini
rsonpath-lib v0.2.1 (/home/mgienieczko/rsonpath/crates/rsonpath-lib)
rsonpath-lib v0.3.0 (/home/mat/rsonpath/crates/rsonpath-lib)
├── aligners v0.0.10
├── cfg-if v1.0.0
├── log v0.4.17
Expand All @@ -64,12 +64,9 @@ rsonpath-lib v0.2.1 (/home/mgienieczko/rsonpath/crates/rsonpath-lib)

### Justification

- `clap` &ndash; standard crate to provide the CLI.
- `color-eyre`, `eyre` &ndash; more accessible error messages for the parser.
- `log`, `simple-logger` &ndash; diagnostic logs during compilation and execution.

- `aligners` &ndash; SIMD operations require correct input data alignment, putting those requirements at type level makes our code more robust.
- `cfg-if` &ndash; used to support SIMD and no-SIMD versions.
- `log` &ndash; diagnostic logs during compilation and execution.
- `memchr` &ndash; rapid, SIMDified substring search for fast-forwarding to labels.
- `nom` &ndash; for parser implementation.
- `replace_with` &ndash; for safe handling of internal classifier state when switching classifiers.
Expand Down
4 changes: 2 additions & 2 deletions crates/rsonpath/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rsonpath"
version = "0.2.1"
version = "0.3.0"
authors = ["Mateusz Gienieczko <[email protected]>"]
edition = "2021"
description = "Blazing fast JSONPath CLI application powered by SIMD."
Expand All @@ -22,7 +22,7 @@ clap = { version = "4.1.4", features = ["derive", "wrap_help"] }
color-eyre = { version = "0.6.2", default-features = false }
eyre = "0.6.8"
log = "0.4.17"
rsonpath-lib = { version = "0.2.1", default-features = false }
rsonpath-lib = { version = "0.3.0", default-features = false }
simple_logger = "4.0.0"

[features]
Expand Down

0 comments on commit 9956fed

Please sign in to comment.