Skip to content

chore: bump tree-sitter-highlight from 0.26.13 to 0.27.0 - #4029

Open
dependabot[bot] wants to merge 3 commits into
mainfrom
dependabot/cargo/tree-sitter-highlight-0.27.0
Open

chore: bump tree-sitter-highlight from 0.26.13 to 0.27.0#4029
dependabot[bot] wants to merge 3 commits into
mainfrom
dependabot/cargo/tree-sitter-highlight-0.27.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 7, 2026

Copy link
Copy Markdown
Contributor

Bumps tree-sitter-highlight from 0.26.13 to 0.27.0.

Release notes

Sourced from tree-sitter-highlight's releases.

v0.27.0

What's Changed

... (truncated)

Commits
  • 6070dbf fix(nix): remove Dockerfile reference from flake (#5892)
  • f52e78c build(deps): cargo update
  • 49dbf70 fix(rust): ensure C returned pointers are non-null in
  • 9540ea3 fix(lib): reject an old_tree from a different language
  • 3e7be91 fix(rust): reject out-of-range node kind ids
  • f471709 fix(lib): bounds-check symbol and state ids in language lookups
  • 5ddf71b fix(rust)!: expose QueryMatch::captures as a method
  • efa0dd9 fix(cli): correct zero-based positions for --edits
  • 16d5e9d ci(checks): add lint-toml step using taplo
  • 3ac04a6 docs: add taplo instructions
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot 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 rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will 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 version will 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 dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

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>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Sep 7, 2026

@worktrunk-bot worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Second breakage from this bump, separate from the Highlighter::highlight signature change: minimal-versions failed to resolve. tree-sitter 0.27.0 requires serde_json ^1.0.150, but both worktrunk and wt-perf declared serde_json = "1.0.145", so under cargo update -Z direct-minimal-versions cargo pins 1.0.145 for those direct deps and can't then satisfy tree-sitter. Raised both floors to 1.0.150 in 099c721; Cargo.lock already held 1.0.151 and is unchanged.

Verified locally on the pinned nightly-2026-08-01: cargo update -Z direct-minimal-versions now resolves (serde_json lands on exactly 1.0.150) and cargo check --workspace --all-targets on the minimized lock passes, as does cargo check --features syntax-highlighting on the committed lock. CI for this head is still running — I hit my poll budget with every check queued or in progress, so nothing here is confirmed green yet.

Original resolution error
error: failed to select a version for `serde_json`.
    ... required by package `tree-sitter v0.27.0`
    ... which satisfies dependency `tree-sitter = "^0.27.0"` of package `tree-sitter-highlight v0.27.0`
    ... which satisfies dependency `tree-sitter-highlight = "^0.27"` of package `worktrunk v0.76.0`
    ... which satisfies path dependency `worktrunk` of package `wt-perf v0.1.0`
versions that meet the requirements `^1.0.150` are: 1.0.151, 1.0.150

all possible versions conflict with previously selected packages

  previously selected package `serde_json v1.0.145`
    ... which satisfies dependency `serde_json = "^1.0.145"` of package `wt-perf v0.1.0`

Note the check history on this PR also shows a batch of cancelled jobs from around 04:30 UTC that hit several unrelated branches at the same time; those are not results for this head.

@worktrunk-bot

worktrunk-bot commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

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 099c7213 were cancelled within eleven seconds — ci, affected, nightly, and the tend-review session that had posted the comment above eleven minutes earlier. No push, label, or state change landed on this PR in that window, and every one of these workflows scopes cancel-in-progress to its own PR number, so the ordinary supersede path doesn't explain it; attempt-1 logs are discarded on rerun, so the cause isn't recoverable from the API. The earlier batch of cancellations at 04:12 and 04:30, which the comment above flagged as suspicious, is ordinary supersede — those runs sat on d2cb4675 and 01941215, which the two follow-up pushes replaced.

I re-ran the three cancelled runs. All four required contexts now pass at 099c7213fast-checks, test (linux), test (macos), test (windows) — along with lint, feature-check, crate-build, full-tests on macOS and Windows, affected tests (linux), code-coverage, msrv, and both codecov contexts. The one context gh pr checks still reports as fail is review — that is the cancelled 34083946363 above, which gh renders a cancellation as a failure; no check has actually gone red at this head.

Ten jobs were still running when my poll budget ran out, so they are unverified rather than green, all advisory: minimal-versions, feature-powerset, check-unused-dependencies, nix-flake, link-check, full-tests (ubuntu-24.04, linux), full-tests (ubuntu-24.04, git-2.43.0), release-target (x86_64-apple-darwin, x86_64-unknown-linux-musl), and affected tests (macos, advisory). minimal-versions is the one worth watching, since it is what the serde_json floor bump in 099c7213 exists to fix.

I read the d2cb4675...099c7213 increment rather than taking it from the summary: it raises the serde_json floor to 1.0.150 in Cargo.toml and tests/helpers/wt-perf/Cargo.toml, passes the new encoding argument at the three Highlighter::highlight call sites, and refreshes the tree-sitter-bash compatibility comment to 0.27.x. Cargo.lock is untouched between the two heads and already holds serde_json 1.0.151, so the claim that the floor bump needs no lock change checks out. I'm not adding a review on top of this — the substance is in the review at d2cb4675 and the comment above, and both still describe the current head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant