Bun Graph::facts Cache Key Omits Linter Settings Causing Incorrect Parse Results
- Investigating(current)
- Trending(upcoming)
- Workaround available(upcoming)
- 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 fixThe 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]GitHub First reportlint: 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
- First report on GitHub issue
lint: include parse-error inputs in Graph::facts cache key
Source