Skip to content

Commit

Permalink
Merge pull request #544 from rsonquery/v0ldek/dependabot
Browse files Browse the repository at this point in the history
V0ldek/dependabot
  • Loading branch information
V0ldek authored Oct 2, 2024
2 parents e4cbaf3 + a98be77 commit c9b7732
Show file tree
Hide file tree
Showing 16 changed files with 689 additions and 558 deletions.
628 changes: 456 additions & 172 deletions Cargo.lock

Large diffs are not rendered by default.

15 changes: 6 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@ members = [
"crates/rsonpath",
"crates/rsonpath-lib",
"crates/rsonpath-syntax",
"crates/rsonpath-test"
"crates/rsonpath-test",
]

exclude = [
"crates/rsonpath-benchmarks",
"crates/rsonpath-test-codegen"
]
exclude = ["crates/rsonpath-benchmarks", "crates/rsonpath-test-codegen"]

resolver = "2"

Expand All @@ -28,10 +25,10 @@ debug = 1
# The time impact of build is not large (~33% time increase).
[profile.distribution]
inherits = "release"
lto = "fat" # Better codegen, much slower compile time.
codegen-units = 1 # Better codegen, much slower compile time.
debug = 0 # Smaller binary size.
strip = "debuginfo" # Smaller binary size.
lto = "fat" # Better codegen, much slower compile time.
codegen-units = 1 # Better codegen, much slower compile time.
debug = 0 # Smaller binary size.
strip = "debuginfo" # Smaller binary size.

[patch.crates-io]
rsonpath-lib = { path = "./crates/rsonpath-lib" }
Expand Down
2 changes: 1 addition & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ doc $RUSTDOCFLAGS="--cfg docsrs":

# Run the codegen for rsonpath-test, generating the E2E tests and JSONs.
gen-tests:
RSONPATH_ENABLE_TEST_CODEGEN=1 cargo build --package rsonpath-test
RSONPATH_ENABLE_TEST_CODEGEN=1 cargo build -p rsonpath-test

# === RUN ===

Expand Down
2 changes: 1 addition & 1 deletion crates/rsonpath-benchmarks
16 changes: 8 additions & 8 deletions crates/rsonpath-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ rustdoc-args = ["--cfg", "docsrs"]
all-features = true

[dependencies]
arbitrary = { version = "1.3.1", features = ["derive"], optional = true }
arbitrary = { version = "1.3.2", features = ["derive"], optional = true }
cfg-if = "1.0.0"
log = "0.4.21"
memmap2 = "0.9.4"
log = "0.4.22"
memmap2 = "0.9.5"
nom = "7.1.3"
rsonpath-syntax = { version = "0.3.1", path = "../rsonpath-syntax" }
smallvec = { version = "1.13.1", features = ["union"] }
smallvec = { version = "1.13.2", features = ["union"] }
static_assertions = "1.1.0"
thiserror = "1.0.58"
thiserror = "1.0.64"
vector-map = "1.0.1"

[dev-dependencies]
itertools = "0.12.1"
pretty_assertions = "1.4.0"
proptest = "1.4.0"
itertools = "0.13.0"
pretty_assertions = "1.4.1"
proptest = "1.5.0"
test-case = "3.3.1"

[features]
Expand Down
8 changes: 4 additions & 4 deletions crates/rsonpath-lib/src/input/mmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ impl Input for MmapInput {

#[inline]
fn seek_backward(&self, from: usize, needle: u8) -> Option<usize> {
return if from < self.last_block_start {
if from < self.last_block_start {
self.mmap.seek_backward(from, needle)
} else {
self.as_padded_input().seek_backward(from, needle)
};
}
}

#[inline]
Expand Down Expand Up @@ -153,11 +153,11 @@ impl Input for MmapInput {

#[inline]
fn seek_non_whitespace_backward(&self, from: usize) -> Option<(usize, u8)> {
return if from < self.last_block_start {
if from < self.last_block_start {
self.mmap.seek_non_whitespace_backward(from)
} else {
self.as_padded_input().seek_non_whitespace_backward(from)
};
}
}

#[inline]
Expand Down
6 changes: 1 addition & 5 deletions crates/rsonpath-lib/src/result/nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,11 +425,7 @@ fn append_block(dest: &mut Vec<u8>, src: &[u8], src_start: usize, read_start: us
fn append_final_block(dest: &mut Vec<u8>, src: &[u8], src_start: usize, read_start: usize, read_end: usize) {
debug!("src_start: {src_start}, read_start: {read_start}, read_end: {read_end}");
debug_assert!(read_end >= src_start);
let in_block_start = if read_start > src_start {
read_start - src_start
} else {
0
};
let in_block_start = read_start.saturating_sub(src_start);
let in_block_end = read_end - src_start;

dest.extend(&src[in_block_start..in_block_end]);
Expand Down
14 changes: 7 additions & 7 deletions crates/rsonpath-syntax/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ rustdoc-args = ["--cfg", "docsrs"]
all-features = true

[dependencies]
arbitrary = { version = "1.3.1", features = ["derive"], optional = true }
owo-colors = { version = "4.0.0", default-features = false, optional = true }
arbitrary = { version = "1.3.2", features = ["derive"], optional = true }
owo-colors = { version = "4.1.0", default-features = false, optional = true }
nom = "7.1.3"
thiserror = "1.0.58"
unicode-width = "0.1.11"
thiserror = "1.0.64"
unicode-width = "0.2.0"

[dev-dependencies]
insta = "1.38.0"
pretty_assertions = "1.4.0"
proptest = "1.4.0"
insta = "1.40.0"
pretty_assertions = "1.4.1"
proptest = "1.5.0"
test-case = "3.3.1"

[features]
Expand Down
2 changes: 1 addition & 1 deletion crates/rsonpath-syntax/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ fn logical_expr<'q>(q: &'q str, ctx: ParseCtx) -> IResult<&'q str, LogicalExpr,
return fail(SyntaxErrorKind::NonSingularQueryInComparison, q.len(), query_len, rest);
};
if negated {
return fail(SyntaxErrorKind::InvalidNegation, q.len(), 1, rest);
fail(SyntaxErrorKind::InvalidNegation, q.len(), 1, rest)
} else {
Ok((
rest,
Expand Down
126 changes: 84 additions & 42 deletions crates/rsonpath-test-codegen/Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/rsonpath-test-codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ serde = { version = "1.0.210", features = ["derive"] }
toml = "0.8.19"
proc-macro2 = "1.0.86"
quote = "1.0.37"
heck = { version = "0.4.1", features = ["unicode"] }
heck = { version = "0.5.0" }
walkdir = "2.5.0"

[dev-dependencies]
Expand Down
Loading

0 comments on commit c9b7732

Please sign in to comment.