WhatBrokeToday
FAQ
Today's Trends
mediumInvestigatingBun

Bun Graph::facts Cache Key Omits Linter Settings Causing Incorrect Parse Results

  1. Investigating(current)
  2. Trending(upcoming)
  3. Workaround available(upcoming)
  4. Resolved(upcoming)

Executive summary

Bun's Graph::facts implementation caches lint facts while omitting settings like rejects_what_parser_rejects, global_return, and implied_strict from the cache key. As a result, importers with different configurations can incorrectly reuse cached parse results from other importers.

No verified workaround yet

None of the linked reports describe a mitigation. Follow this incident to hear when one appears.

Official fix
Technical root cause

The cache key for Graph::facts in src/lint/graph/lib.rs omits rejects_what_parser_rejects, global_return, and implied_strict, allowing importers with differing configurations to reuse the wrong parse result.

Evidence

1 report · 1 GitHubShow
  1. [1]
    GitHub First report
    lint: include parse-error inputs in Graph::facts cache key(opens GitHub issue in a new tab)

    Summary Graph::facts in src/lint/graph/lib.rs caches facts that include the parse error for an imported file. Its cache key omits rejects_what_parser_rejects, global_return, and implied_strict. parse_errors_and_stage and the espree checks read these settings. Importers with different settings can therefore reuse the wrong parse result. This gap predates the JSX-spread changes in the linked PR. Reported reproductions An importer without a config and an importer with an oxlint config import the…

    by coderabbitai[bot] 0upvotes 1comments

Timeline

  1. First report on GitHub issue

    lint: include parse-error inputs in Graph::facts cache key

    Source