Skip to content

build(deps): bump the compatible non-grammar dependencies - #357

Merged
sunerpy merged 3 commits into
mainfrom
build/deps-compatible-bumps
Nov 27, 2026
Merged

sunerpy merged 3 commits into
mainfrom
build/deps-compatible-bumps

Conversation

@sunerpy

@sunerpy sunerpy commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Summary

Three commits from the #345 split, covering the updates that touch no grammar, scanner or watcher crate:

  1. build(deps): bump the compatible non-grammar dependencies: anyhow 1.0.105, clap and clap_derive 4.6.9 (clap_builder stays at 4.6.7), clap_complete 4.6.12, self_update 1.3.3, regex 1.13.2 with regex-automata 0.4.19 and regex-syntax 0.8.12, rstest 0.29 (the Cargo.toml requirement; dev-dependency only), and tokio 1.54.1 (tokio-macros stays at 2.7.0). clap_derive 4.6.9 requires proc-macro2 ^1.0.107, quote ^1.0.47 and syn ^3.0.10, so those three move with it.
  2. build(deps): bump rusqlite to 0.43 and libsqlite3-sys to 0.40: the workspace requirement goes from "0.41" to "0.43". rusqlite's wasm32-only dependencies move with it (sqlite-wasm-rs 0.6.3, rsqlite-vfs 0.2.0), and hashbrown 0.16.1 drops out.
  3. build(deps): bump miniz_oxide to 0.9.1: codegraph-resolve's requirement goes from "0.8.9" to "0.9.1". flate2 1.1.9 keeps miniz_oxide 0.8.9, so the binary carries both copies.

The graph, the schema, the extraction version, the public API and the protocols do not change. All 32 goldens are identical.

Lockfile

  • Between 47f3e82 and this head, only the packages listed above change: 19 entries out, 19 in. No tree-sitter*, ignore, globset, io-extras, windows-sys or windows-targets entry moves, and no dependency edge between two unrelated packages changes.
  • For clap, clap_complete, self_update and tokio, cargo update -p <crate> --precise <version> also re-picked windows-sys (0.61.2 → 0.52.0 or 0.60.2) for twelve unrelated crates: anstyle-query, anstyle-wincon, cap-fs-ext, cap-primitives, errno, nu-ansi-term, quinn-udp, rustix, rustls-platform-verifier, socket2, tempfile and winapi-util. Those edges were put back by hand. The result passes cargo metadata --locked and cargo tree --locked -i <crate>.
  • cargo update -p miniz_oxide --precise 0.9.1 also moved flate2 to 1.1.11 and zlib-rs to 0.6.9 so that both could share one copy. The new requirement needs neither move, so the lockfile keeps cargo's minimal resolution: one new miniz_oxide 0.9.1 entry.

regex 1.13.2 (D-4)

regex 1.13.2 fixes the match offsets of alternations whose branches start with the same repetition (#1400), and an off-by-one in the reverse-inner full-DFA search (#1406). Either fix could change a text rule's result without moving a golden, so the patterns were also checked directly:

  • The codegraph-extract and codegraph-resolve suites (3349 tests, all passing) ran against a logging copy of regex 1.13.2. They built 1439 distinct patterns and searched 327,774 distinct inputs (179,177 haystacks, 141 MB).
  • These inputs were replayed under 1.13.1 and 1.13.2, with the regex-automata features the shipped binary has (dfa-build and dfa-search come in through tracing-subscriber). Every result is the same on both versions: is_match, find, captures and shortest_match at the logged start, find_iter and captures_iter over the haystack, and the set matches. Neither version panics.
  • 1435 of the 1439 patterns parse to a byte-identical HIR. Four differ because regex-syntax 0.8.12 no longer lifts a repetition out of an alternation: nextjs.rs:402/expo_router.rs:427, name_matcher.rs:1085, and name_matcher.rs:4774 (with two interpolated names). In each, the lifted repetition (\s+, [ \t]*, \s*) is followed in every branch by something it cannot match. The repetition therefore has only one possible length, and each pattern matches the same on every input.

regex therefore stays in this patch and does not move to B.

rusqlite 0.43 (D-3)

  • libsqlite3-sys 0.39.1 and 0.40.0 bundle byte-identical sqlite3/ sources (SQLite 3.54.1, SQLITE_SOURCE_ID 2026-10-16 14:45:20 555e07ef…) and an identical build.rs. A probe built on each version reports the same sqlite_version() and sqlite_source_id().
  • In the same probe, execute_batch returns Ok on both versions for empty, whitespace-only, comment-only, trailing-comment and ;; batches. The only change is prepare and execute on empty or comment-only SQL, which now return Err(Empty) instead of an empty statement or ApiMisuse. The migrations go through execute_batch (migrations.rs:272). The store's other SQL is either built with format! or a constant, and none of it can be empty.

miniz_oxide 0.9.1 (D-3)

the_output_codec_gives_a_known_answer passes with its constant unchanged, and footprint.rs is not modified, so 0.9.1 deflates that input to the same bytes as 0.8.9. records_another_build_left_are_not_trusted stays green.

tokio 1.54.1 and the A2 harness (D-5)

tokio 1.54 treats ENOTCONN as success in UnixStream::shutdown (#8526) and starts accepted sockets as readable and writable (#8435). A2's post-fix harness was rerun on A2's code (d82e297; crates/codegraph-daemon is identical in the merged 9ff6295), with only the tokio lockfile entry moved to 1.54.1. The test binary and 8 busy loops (timeout --foreground 900) were pinned to CPUs 28–31.

variant tokio 1.54.1 (this PR) tokio 1.53.3 (A2, after the fix)
20 ms pause before the syscall, churn test 0/20 0/20
20 ms pause before the syscall, whole suite 0/200 0/200
20 ms pause after the identity check, churn test 0/20 0/20
20 ms pause after the identity check, whole suite 0/200 0/200
natural, no pause 0/17,142 (20-minute cap) 0/19,379

On the same tree, cargo test -p codegraph-daemon --locked passed 186 tests. No busy loop was left over afterwards.

Verification (head d1cd029, before the rebase)

The branch was then rebased onto main 521ab58 (A2, A8 and #342 had landed) without conflicts; the head is 2726556. On it cargo metadata --locked passes and the lockfile guard against main reports only the packages listed above.

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets --locked -- -D warnings, on each commit and on the head
  • cargo test -p codegraph-store --locked: 318 passed
  • cargo test -p codegraph-rs --locked --test upgrade_from_v054 --test upgrade_from_v055 --test upgrade_from_schema_9 --test batch_m_outdated_migration --test future_schema_cli --test installer_jsonc --test completions: 83 passed
  • cargo test -p codegraph-resolve --locked footprint: 8 passed
  • cargo test -p codegraph-watch --locked records_another_build_left_are_not_trusted: passed
  • cargo test -p codegraph-bench --test equivalence --locked: 71 passed
  • cargo build --release --locked -p codegraph-rs -p codegraph-bench, then scripts/regen-goldens.sh --check with CODEGRAPH_BIN and BENCH_BIN pointing at those binaries (sha256 fa33e299…, 21cb94d0…): all 32 corpora identical

The pre-push make pre-ci passed on 2726556. Still to run: CI. Windows Tests matter most here, because locally only cargo metadata --locked checks the restored windows-sys edges.

Take the patch-level and test-only updates from #345 that touch no
grammar, scanner or watcher crate, one `cargo update -p <crate>
--precise <version>` each:

- anyhow 1.0.104 -> 1.0.105
- clap 4.6.7 -> 4.6.9 with clap_derive 4.6.9 (clap_builder stays at
  4.6.7). clap_derive 4.6.9 requires proc-macro2 ^1.0.107, quote ^1.0.47
  and syn ^3.0.10, so proc-macro2 1.0.107, quote 1.0.47 and syn 3.0.10
  move with it.
- clap_complete 4.6.11 -> 4.6.12
- self_update 1.3.1 -> 1.3.3
- regex 1.13.1 -> 1.13.2 with regex-automata 0.4.19 and regex-syntax
  0.8.12
- rstest 0.28 -> 0.29 (the Cargo.toml requirement and rstest_macros
  0.29.0; dev-dependency only)
- tokio 1.53.3 -> 1.54.1 (tokio-macros stays at 2.7.0). 1.54 treats
  ENOTCONN as success in UnixStream::shutdown and starts accepted
  sockets as readable and writable, which the daemon's sockets use.

On this lockfile every precise update also re-picks windows-sys
(0.61.2 -> 0.52.0 or 0.60.2) for twelve unrelated crates: anstyle-query,
anstyle-wincon, cap-fs-ext, cap-primitives, errno, nu-ansi-term,
quinn-udp, rustix, rustls-platform-verifier, socket2, tempfile and
winapi-util. Those edges were put back by hand, so only the packages
listed above move. No tree-sitter*, ignore, globset, io-extras,
windows-sys or windows-targets entry changes.

regex 1.13.2 fixes the match offsets of alternations whose branches
start with the same repetition (#1400) and an off-by-one in the
reverse-inner full-DFA search (#1406). To show that neither moves the
graph, the codegraph-extract and codegraph-resolve test suites ran
against a logging copy of regex, and the 1439 patterns and 327774
distinct inputs they used were replayed under 1.13.1 and 1.13.2: every
is_match, find, captures, shortest_match and iterator result is the
same. Four patterns get a different HIR (nextjs.rs:402 and
expo_router.rs:427, name_matcher.rs:1085 and :4774). In each, the
repetition that regex-syntax 0.8.11 lifted out of the alternation is
followed in every branch by something it cannot match, so it has one
possible length and the four match the same on every input.

Verification: cargo metadata --locked and cargo tree --locked -i for
every bumped crate; cargo clippy --workspace --all-targets --locked --
-D warnings; cargo test -p codegraph-rs --locked --test installer_jsonc
--test completions --bin codegraph; scripts/regen-goldens.sh --check
with this tree's codegraph and bench binaries: all 32 corpora
identical.
The workspace requirement moves from "0.41" to "0.43" (a ^0.41
requirement cannot select 0.43.0), then `cargo update -p rusqlite
--precise 0.43.0` takes rusqlite 0.41.1 -> 0.43.0 and libsqlite3-sys
0.39.1 -> 0.40.0. The only other moves are rusqlite's wasm32-only
dependencies: sqlite-wasm-rs 0.5.5 -> 0.6.3, rsqlite-vfs 0.1.1 -> 0.2.0,
and hashbrown 0.16.1, which only rsqlite-vfs 0.1.1 used, drops out.

The C side does not change. Both libsqlite3-sys versions bundle SQLite
3.54.1 with the same SQLITE_SOURCE_ID (2026-10-16 14:45:20 555e07ef...),
their sqlite3/ directories and build.rs are byte-identical, and a probe
built on each reports the same sqlite_version() and sqlite_source_id().
The on-disk format, FTS5 and the compile options stay as they were.

The one behavior change on the Rust side is that prepare, execute and
query_row now return Error::Empty for empty or comment-only SQL.
execute_batch still skips empty statements, so the migrations
(migrations.rs:272) are unaffected: the probe gives Ok for empty,
whitespace-only, comment-only, trailing-comment and ';;' batches on both
versions. The store's other SQL is built with format! or comes from
constants, and none of it can be empty.

Verification: cargo metadata --locked; cargo tree --locked -i rusqlite
and -i libsqlite3-sys (only 0.40.0); cargo clippy --workspace
--all-targets --locked -- -D warnings; cargo test -p codegraph-store
--locked; cargo test -p codegraph-rs --locked --test upgrade_from_v054
--test upgrade_from_v055 --test upgrade_from_schema_9 --test
batch_m_outdated_migration --test future_schema_cli.
codegraph-resolve's requirement moves from "0.8.9" to "0.9.1" (a ^0.8.9
requirement cannot select 0.9.1). The lockfile gains miniz_oxide 0.9.1
for codegraph-resolve only; flate2 1.1.9 keeps miniz_oxide 0.8.9, so the
binary carries both copies. `cargo update -p miniz_oxide --precise
0.9.1` also moved flate2 to 1.1.11 and zlib-rs to 0.6.9 so that both
could share one copy. The new requirement does not need either move, so
the lockfile kept is cargo's minimal resolution of it: one new package
entry and two references qualified with their versions.

The synthesis records' output rows (footprint.rs) are raw deflate at
level 6 through compress_to_vec and decompress_to_vec_with_limit, and
0.9.1 keeps both signatures. The known-answer test passes with its
constant unchanged, so 0.9.1 writes the same bytes as 0.8.9 for that
input. Rows that another build wrote are not reused in any case: the
build identity covers Cargo.lock, and
records_another_build_left_are_not_trusted shows that a stage recomputed
under a new build equals a fresh index.

Verification: cargo metadata --locked; cargo tree --locked -i
miniz_oxide@0.9.1 (codegraph-resolve only) and -i miniz_oxide@0.8.9
(flate2 only); cargo clippy --workspace --all-targets --locked -- -D
warnings; cargo test -p codegraph-resolve --locked footprint (8 passed,
the_output_codec_gives_a_known_answer among them); cargo test -p
codegraph-watch --locked records_another_build_left_are_not_trusted.
@codecov

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #357      +/-   ##
==========================================
- Coverage   96.40%   96.40%   -0.01%     
==========================================
  Files         368      368              
  Lines      254628   254628              
==========================================
- Hits       245468   245463       -5     
- Misses       9160     9165       +5     

see 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sunerpy
sunerpy merged commit 4489c30 into main Nov 27, 2026
11 checks passed
@sunerpy
sunerpy deleted the build/deps-compatible-bumps branch November 27, 2026 11:30
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

Successfully merging this pull request may close these issues.

1 participant