chore: bump tree-sitter-highlight from 0.26.13 to 0.27.0 - #4029
chore: bump tree-sitter-highlight from 0.26.13 to 0.27.0#4029dependabot[bot] wants to merge 3 commits into
Conversation
Bumps [tree-sitter-highlight](https://github.com/tree-sitter/tree-sitter) from 0.26.13 to 0.27.0. - [Release notes](https://github.com/tree-sitter/tree-sitter/releases) - [Commits](tree-sitter/tree-sitter@v0.26.13...v0.27.0) --- updated-dependencies: - dependency-name: tree-sitter-highlight dependency-version: 0.27.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
worktrunk-bot
left a comment
There was a problem hiding this comment.
The bump itself is correct, but tree-sitter-highlight 0.27 is a breaking API change and the PR is lock/manifest-only, so the build is red: Highlighter::highlight gained an encoding: Option<u32> parameter before cancellation_flag, and src/styling/format.rs calls it with the old 4-argument form.
error[E0061]: this method takes 5 arguments but 4 arguments were supplied
--> src/styling/format.rs:346:10
|
346 | .highlight(&config, content.as_bytes(), None, |_| None)
| ^^^^^^^^^ -------- argument #4 of type `std::option::Option<&Atomic<usize>>` is missing
That accounts for every red check here (fast-checks, lint, feature-check, test (macos), test (windows)) — they all fail on the same could not compile worktrunk (lib).
I'm pushing the call-site fix to this branch: pass None for encoding (the UTF-8 path — worktrunk always hands highlight the bytes of a &str) at the one production site and the two test sites. Holding APPROVE until the checks come back on the fixed head.
Verification notes
Signature change. 0.26.13:
pub fn highlight<'a>(
&'a mut self,
config: &'a HighlightConfiguration,
source: &'a [u8],
cancellation_flag: Option<&'a AtomicUsize>,
injection_callback: impl FnMut(&str) -> Option<&'a HighlightConfiguration> + 'a,
)0.27.0 inserts encoding: Option<u32> at position 3, so the existing None (which meant cancellation_flag) now binds to encoding and the flag argument goes missing. None is the right value for both: encoding only diverges from the UTF-8 path on Some(ffi::TSInputEncodingUTF16LE)/UTF16BE, and the previous behavior passed no cancellation flag.
Other 0.27 API changes checked, none reached by worktrunk. Error::InvalidLanguage became a tuple variant (#[from] tree_sitter::LanguageError); worktrunk never matches on Error, it only .expect()s the Result. HighlightConfiguration::new, HighlightEvent, and Highlight(idx).0 are unchanged.
tree-sitter-bash 0.25.1 still works against tree-sitter 0.27 — the comment at Cargo.toml:204 pins that claim to 0.26.x, so I refreshed it to 0.27.x. Verified at runtime, not just at compile time: styling::format::tests::test_unified_multiline_highlighting still produces [function:echo] [string:'line1'] [operator:&&], so the parser ABI and the highlight queries both hold. All 85 styling:: tests pass with --features syntax-highlighting, and cargo clippy --features syntax-highlighting --all-targets is clean.
Transitive bumps in the lock are MSRV-safe. The bump drags cc 1.2.54 → 1.4.5, find-msvc-tools 0.1.8 → 0.1.12, tree-sitter-language 0.1.6 → 0.1.8, and dedupes shlex 1.3.0 away. Declared rust-versions: tree-sitter and tree-sitter-language 1.90, cc and find-msvc-tools 1.65, shlex 1.46 — all under this repo's 1.97, so cargo msrv verify and minimal-versions aren't at risk.
tree-sitter-highlight 0.27 inserts `encoding: Option<u32>` into `Highlighter::highlight` ahead of `cancellation_flag`, so the existing four-argument calls no longer compile. Pass `None` for it at all three call sites: worktrunk always highlights the bytes of a `&str`, and `None` is the UTF-8 path. Also refresh the Cargo.toml note pinning tree-sitter-bash 0.25.x compatibility to 0.26.x.
tree-sitter 0.27.0 requires serde_json ^1.0.150, but both worktrunk and wt-perf declared serde_json = "1.0.145". Under `cargo update -Z direct-minimal-versions` cargo picks 1.0.145 for those direct deps and then cannot satisfy tree-sitter, so the minimal-versions job failed to resolve. Cargo.lock already had 1.0.151 and is unchanged.
|
Second breakage from this bump, separate from the Verified locally on the pinned Original resolution errorNote the check history on this PR also shows a batch of |
|
Closing the loop the previous session left open: it ended with "CI for this head is still running — nothing here is confirmed green yet", and every one of its checks was then cancelled before finishing. At 05:01:33–05:01:44 all four in-flight runs on I re-ran the three cancelled runs. All four required contexts now pass at Ten jobs were still running when my poll budget ran out, so they are unverified rather than green, all advisory: I read the |
Bumps tree-sitter-highlight from 0.26.13 to 0.27.0.
Release notes
Sourced from tree-sitter-highlight's releases.
... (truncated)
Commits
6070dbffix(nix): remove Dockerfile reference from flake (#5892)f52e78cbuild(deps): cargo update49dbf70fix(rust): ensure C returned pointers are non-null in9540ea3fix(lib): reject anold_treefrom a different language3e7be91fix(rust): reject out-of-range node kind idsf471709fix(lib): bounds-check symbol and state ids in language lookups5ddf71bfix(rust)!: exposeQueryMatch::capturesas a methodefa0dd9fix(cli): correct zero-based positions for --edits16d5e9dci(checks): add lint-toml step using taplo3ac04a6docs: add taplo instructionsDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)