Skip to content

chore: bump oxlint-tsgolint to 0.25 to fix flaky TS2307 on macOS - #18

Merged
rqbazan merged 1 commit into
mainfrom
chore/bump-tsgolint
Oct 17, 2026
Merged

rqbazan merged 1 commit into
mainfrom
chore/bump-tsgolint

Conversation

@rqbazan

@rqbazan rqbazan commented Oct 17, 2026

Copy link
Copy Markdown
Member

Summary

pnpm rr check fails now and then on macOS with TS2307 on a module that is installed:

vitest.config.ts:1:28: error typescript(TS2307): Cannot find module '@vitest/browser-playwright' or its corresponding type declarations.
test/functional/index.test.ts:2:28: error typescript(TS2307): Cannot find module 'vitest-browser-react' ...
run-run.config.mts:5:20: error typescript(TS2307): Cannot find module '@rrlab/vitest-plugin' ...
test/functional/setup.ts:1:43: error typescript(TS2307): Cannot find module 'vitest' ...

The bug is not in rr, the build or the order of steps. It is in the typescript-go build that oxlint-tsgolint@0.23.0 bundles:

rr check
  tsc (oxlint plugin) → oxlint --type-aware --type-check
    tsgolint 0.23.0 (bundles typescript-go c282336)
      fileLoader parses files on many goroutines
        module resolver → realpath(pnpm symlink)
          realpath_darwin.go: fcntl(fd, F_GETPATH, int(uintptr(&buf)))
            the buffer pointer passes through an int, so Go may move or
            reuse the buffer before the kernel writes into it
          → bad real path → resolution fails → TS2307
-    "oxlint-tsgolint": "^0.23.0",
+    "oxlint-tsgolint": "^0.25.0",

0.25.0 is the last 0.x release. It still fits the installed oxlint@1.71.0 (peer >=0.22.1). Going to 7.x would also need oxlint ≥1.75 and new lint rules, so it is left out of this PR.

The typescript-go submodule pinned by each tsgolint tag, compared on GitHub:

tsgolint typescript-go has a8b2a52 (bug) has 704847d (#4178 fix)
v0.23.0 c282336 yes no
v0.24.0 c080da6 yes yes
v0.25.0 2bd066d yes yes

Evidence

Local, macOS arm64, clean worktree:

  • Before (oxlint-tsgolint@0.23.0):

    Command Failed
    pnpm rr check 4 / 40
    oxlint --type-aware --type-check (no rr) 8 / 60
    same, --threads=1 (oxlint threads only) 6 / 80
    same, GOMAXPROCS=1 (one Go thread in tsgolint) 0 / 100
    tsc --noEmit 0 (passes)

    It still fails without rr and with plain tsc passing, so rr and the project are not the cause. With GOMAXPROCS=1 it never fails, which points to a concurrency bug inside tsgolint's typescript-go.

  • After (oxlint-tsgolint@0.25.0):

    Command Failed
    oxlint --type-aware --type-check 0 / 150
    pnpm rr check 0 / 50

    The typecheck still catches real errors: a probe file with a missing import and a bad assignment reports TS2307 and TS2322.

CI can't show this bug. CI runs on ubuntu-latest and the broken code is darwin-only. None of the CI runs on record failed with TS2307 (the red runs were zizmor and a missing gh-actions repo). So CI is green both before and after this change, and a green CI run proves nothing here. The proof is the local loop above. It still matters on macOS, where the lefthook pre-commit rr tsc and local rr check run.

Merge Danger

Door: two-way

Only a devDependency changes. Reverting package.json and the lockfile undoes it.

Blast Radius: tooling

Nothing in dist or the published package changes, so this PR has no changeset. The one effect is newer tsgolint lint rules in rr check, and with this repo's config they report nothing today.

🤖 Generated with Claude Code

https://claude.ai/code/session_01V4iz3teZoyUZW9nXnX9RQr

oxlint-tsgolint 0.23.0 bundles a typescript-go build whose macOS
realpath (fcntl F_GETPATH) can lose its buffer under concurrent
module resolution. A pnpm symlink then resolves to garbage and
`rr check` fails at random with TS2307. Fixed upstream in
microsoft/typescript-go#4178, first shipped in oxlint-tsgolint 0.24.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V4iz3teZoyUZW9nXnX9RQr
@changeset-bot

changeset-bot Bot commented Oct 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cda69ca

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@rqbazan
rqbazan merged commit 6bd98b9 into main Oct 17, 2026
5 checks passed
@rqbazan
rqbazan deleted the chore/bump-tsgolint branch October 17, 2026 23:12
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