Skip to content

Commit

Permalink
release v0.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
V0ldek authored Sep 23, 2023
1 parent 60676a2 commit 8301eda
Show file tree
Hide file tree
Showing 20 changed files with 70 additions and 75 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ body:
attributes:
label: Version of the release
options:
# <newest-release=v0.8.1>
# <newest-release=v0.8.2>
- v0.8.2
- v0.8.1
- v0.8.0
- v0.7.1
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

## [unreleased]
## [0.8.2] - 2023-09-23

### Performance

Expand Down
50 changes: 14 additions & 36 deletions Cargo.lock

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

8 changes: 6 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,19 @@ alias v := verify-quick
alias verify := verify-full

# Run all lints and checks required.
verify-full: build-all verify-clippy verify-doc verify-fmt test-full
verify-full: build-all verify-deny verify-clippy verify-doc verify-fmt test-full

# Run a quick formatting and compilation check.
verify-quick: verify-fmt verify-check verify-bench
verify-quick: verify-fmt verify-check verify-deny verify-bench

# Run cargo check on non-benchmark packages.
verify-check:
cargo check --workspace --all-features

# Run cargo deny check.
verify-deny:
cargo deny check

# Run cargo check on the benchmark package
verify-bench:
cargo check --manifest-path ./crates/rsonpath-benchmarks/Cargo.toml --all-features
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ cargo tree --package rsonpath --edges normal --depth 1

<!-- rsonpath dependencies start -->
```ini
rsonpath v0.8.1 (/home/mat/rsonpath/crates/rsonpath)
rsonpath v0.8.2 (/home/mat/rsonpath/crates/rsonpath)
├── clap v4.4.4
├── color-eyre v0.6.2
├── eyre v0.6.8
├── log v0.4.20
├── rsonpath-lib v0.8.1 (/home/mat/rsonpath/crates/rsonpath-lib)
├── rsonpath-lib v0.8.2 (/home/mat/rsonpath/crates/rsonpath-lib)
└── simple_logger v4.2.0
[build-dependencies]
├── rustflags v0.1.4
Expand All @@ -236,12 +236,12 @@ cargo tree --package rsonpath-lib --edges normal --depth 1

<!-- rsonpath-lib dependencies start -->
```ini
rsonpath-lib v0.8.1 (/home/mat/rsonpath/crates/rsonpath-lib)
rsonpath-lib v0.8.2 (/home/mat/rsonpath/crates/rsonpath-lib)
├── cfg-if v1.0.0
├── log v0.4.20
├── memmap2 v0.7.1
├── nom v7.1.3
├── smallvec v1.11.0
├── smallvec v1.11.1
├── static_assertions v1.1.0
├── thiserror v1.0.48
└── vector-map v1.0.1
Expand Down Expand Up @@ -269,7 +269,7 @@ cargo tree --package rsonpath --edges normal

<!-- rsonpath-full dependencies start -->
```ini
rsonpath v0.8.1 (/home/mat/rsonpath/crates/rsonpath)
rsonpath v0.8.2 (/home/mat/rsonpath/crates/rsonpath)
├── clap v4.4.4
│ ├── clap_builder v4.4.4
│ │ ├── anstream v0.5.0
Expand All @@ -295,7 +295,7 @@ rsonpath v0.8.1 (/home/mat/rsonpath/crates/rsonpath)
│ │ ├── clap_lex v0.5.1
│ │ ├── strsim v0.10.0
│ │ └── terminal_size v0.3.0
│ │ ├── rustix v0.38.13
│ │ ├── rustix v0.38.14
│ │ │ ├── bitflags v2.4.0
│ │ │ ├── errno v0.3.3
│ │ │ │ ├── errno-dragonfly v0.1.2
Expand Down Expand Up @@ -340,15 +340,15 @@ rsonpath v0.8.1 (/home/mat/rsonpath/crates/rsonpath)
│ └── owo-colors v3.5.0
├── eyre v0.6.8 (*)
├── log v0.4.20
├── rsonpath-lib v0.8.1 (/home/mat/rsonpath/crates/rsonpath-lib)
├── rsonpath-lib v0.8.2 (/home/mat/rsonpath/crates/rsonpath-lib)
│ ├── cfg-if v1.0.0
│ ├── log v0.4.20
│ ├── memmap2 v0.7.1
│ │ └── libc v0.2.148
│ ├── nom v7.1.3
│ │ ├── memchr v2.6.3
│ │ └── minimal-lexical v0.2.1
│ ├── smallvec v1.11.0
│ ├── smallvec v1.11.1
│ ├── static_assertions v1.1.0
│ ├── thiserror v1.0.48
│ │ └── thiserror-impl v1.0.48 (proc-macro)
Expand Down Expand Up @@ -380,7 +380,7 @@ rsonpath v0.8.1 (/home/mat/rsonpath/crates/rsonpath)
├── colored v2.0.4
│ ├── is-terminal v0.4.9
│ │ ├── hermit-abi v0.3.3
│ │ ├── rustix v0.38.13 (*)
│ │ ├── rustix v0.38.14 (*)
│ │ └── windows-sys v0.48.0 (*)
│ ├── lazy_static v1.4.0
│ └── windows-sys v0.48.0 (*)
Expand All @@ -407,7 +407,7 @@ rsonpath v0.8.1 (/home/mat/rsonpath/crates/rsonpath)
└── vergen v8.2.5
├── anyhow v1.0.75
├── rustc_version v0.4.0
│ └── semver v1.0.18
│ └── semver v1.0.19
└── time v0.3.28
├── deranged v0.3.8
├── itoa v1.0.9
Expand Down
2 changes: 1 addition & 1 deletion book/src/user/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To verify it works, check if `rq` is available from your command line:

```console
$ rq -V
rq 0.8.1
rq 0.8.2

```

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.8.1"
version = "0.8.2"
authors = ["Mateusz Gienieczko <mat@gienieczko.com>"]
edition = "2021"
description = "Blazing fast JSONPath query engine powered by SIMD. Core library of `rsonpath`."
Expand Down
4 changes: 2 additions & 2 deletions crates/rsonpath-lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ cargo tree --package rsonpath-lib --edges normal --depth 1

<!-- rsonpath-lib dependencies start -->
```ini
rsonpath-lib v0.8.1 (/home/mat/rsonpath/crates/rsonpath-lib)
rsonpath-lib v0.8.2 (/home/mat/rsonpath/crates/rsonpath-lib)
├── cfg-if v1.0.0
├── log v0.4.20
├── memmap2 v0.7.1
├── nom v7.1.3
├── smallvec v1.11.0
├── smallvec v1.11.1
├── static_assertions v1.1.0
├── thiserror v1.0.48
└── vector-map v1.0.1
Expand Down
14 changes: 8 additions & 6 deletions crates/rsonpath-lib/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ struct LastBlock {

pub(super) mod in_slice {
use super::{LastBlock, MAX_BLOCK_SIZE};
use crate::query::JsonString;
use crate::{query::JsonString, JSON_SPACE_BYTE};

#[inline]
pub(super) fn pad_last_block(bytes: &[u8]) -> LastBlock {
let mut last_block_buf = [b' '; MAX_BLOCK_SIZE];
let mut last_block_buf = [JSON_SPACE_BYTE; MAX_BLOCK_SIZE];
let last_block_start = (bytes.len() / MAX_BLOCK_SIZE) * MAX_BLOCK_SIZE;
let last_block_slice = &bytes[last_block_start..];

Expand Down Expand Up @@ -300,6 +300,8 @@ mod tests {
}

mod pad_last_block {
use crate::JSON_SPACE_BYTE;

use super::*;
use pretty_assertions::assert_eq;

Expand All @@ -308,7 +310,7 @@ mod tests {
let result = in_slice::pad_last_block(&[]);

assert_eq!(result.absolute_start, 0);
assert_eq!(result.bytes, [b' '; MAX_BLOCK_SIZE]);
assert_eq!(result.bytes, [JSON_SPACE_BYTE; MAX_BLOCK_SIZE]);
}

#[test]
Expand All @@ -319,7 +321,7 @@ mod tests {

assert_eq!(result.absolute_start, 0);
assert_eq!(&result.bytes[0..11], bytes);
assert_eq!(&result.bytes[11..], [b' '; MAX_BLOCK_SIZE - 11]);
assert_eq!(&result.bytes[11..], [JSON_SPACE_BYTE; MAX_BLOCK_SIZE - 11]);
}

#[test]
Expand All @@ -329,7 +331,7 @@ mod tests {
let result = in_slice::pad_last_block(&bytes);

assert_eq!(result.absolute_start, MAX_BLOCK_SIZE);
assert_eq!(result.bytes, [b' '; MAX_BLOCK_SIZE]);
assert_eq!(result.bytes, [JSON_SPACE_BYTE; MAX_BLOCK_SIZE]);
}

#[test]
Expand All @@ -341,7 +343,7 @@ mod tests {

assert_eq!(result.absolute_start, 2 * MAX_BLOCK_SIZE);
assert_eq!(result.bytes[0..77], [69; 77]);
assert_eq!(result.bytes[77..], [b' '; MAX_BLOCK_SIZE - 77]);
assert_eq!(result.bytes[77..], [JSON_SPACE_BYTE; MAX_BLOCK_SIZE - 77]);
}
}

Expand Down
6 changes: 4 additions & 2 deletions crates/rsonpath-lib/src/input/buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
use super::{
error::InputError, in_slice, repr_align_block_size, Input, InputBlock, InputBlockIterator, MAX_BLOCK_SIZE,
};
use crate::{error::InternalRsonpathError, query::JsonString, result::InputRecorder, FallibleIterator};
use crate::{
error::InternalRsonpathError, query::JsonString, result::InputRecorder, FallibleIterator, JSON_SPACE_BYTE,
};
use std::{cell::RefCell, io::Read, ops::Deref, slice};

const BUF_SIZE: usize = 64 * 1024;
Expand Down Expand Up @@ -74,7 +76,7 @@ impl<R: Read> InternalBuffer<R> {
}

if self.chunk_idx == self.bytes.len() {
self.bytes.push(BufferedChunk([b' '; BUF_SIZE]));
self.bytes.push(BufferedChunk([JSON_SPACE_BYTE; BUF_SIZE]));
}

let buf = &mut self.bytes[self.chunk_idx].0;
Expand Down
4 changes: 2 additions & 2 deletions crates/rsonpath-lib/src/input/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//! than using a buffered input stream.

use super::{borrowed::BorrowedBytesBlockIterator, error::InputError, *};
use crate::query::JsonString;
use crate::{query::JsonString, JSON_SPACE_BYTE};
use std::{alloc, ptr, slice};

/// Input into a query engine.
Expand Down Expand Up @@ -116,7 +116,7 @@ impl OwnedBytes {
// SAFETY:
unsafe {
ptr::copy_nonoverlapping(slice.as_ptr(), ptr.as_ptr(), slice.len());
ptr::write_bytes(ptr.as_ptr().add(slice.len()), b' ', pad);
ptr::write_bytes(ptr.as_ptr().add(slice.len()), JSON_SPACE_BYTE, pad);
};

// SAFETY: At this point we allocated and initialized exactly `size` bytes.
Expand Down
Loading

0 comments on commit 8301eda

Please sign in to comment.