Repository navigation
chore: bump oxlint-tsgolint to 0.25 to fix flaky TS2307 on macOS - #18
Merged
Merged
Conversation
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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pnpm rr checkfails now and then on macOS with TS2307 on a module that is installed: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.0bundles:realpathcame in with microsoft/typescript-go@a8b2a52 ("Speed up realpath on Linux and macOS"). Fix fnctl F_GETPATH call on macOS microsoft/typescript-go#4178 fixed it (issue Data race in module resolver — SIGSEGV inloadModuleFromTargetExportOrImport/OrderedMap.Keysunder concurrent goroutines microsoft/typescript-go#4060), and the fix only touchesrealpath_darwin.go.vitestin a pnpm repo, and the reporter confirmedoxlint-tsgolint@0.24.0fixes it.^0.23.0is a 0.x caret range, so it never moves past 0.23.x. The range has to change by hand.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:
c282336c080da62bd066dEvidence
Local, macOS arm64, clean worktree:
Before (
oxlint-tsgolint@0.23.0):pnpm rr checkoxlint --type-aware --type-check(no rr)--threads=1(oxlint threads only)GOMAXPROCS=1(one Go thread in tsgolint)tsc --noEmitIt still fails without rr and with plain
tscpassing, so rr and the project are not the cause. WithGOMAXPROCS=1it never fails, which points to a concurrency bug inside tsgolint's typescript-go.After (
oxlint-tsgolint@0.25.0):oxlint --type-aware --type-checkpnpm rr checkThe typecheck still catches real errors: a probe file with a missing import and a bad assignment reports
TS2307andTS2322.CI can't show this bug. CI runs on
ubuntu-latestand the broken code is darwin-only. None of the CI runs on record failed with TS2307 (the red runs were zizmor and a missinggh-actionsrepo). 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-commitrr tscand localrr checkrun.Merge Danger
Door: two-way
Only a devDependency changes. Reverting
package.jsonand the lockfile undoes it.Blast Radius: tooling
Nothing in
distor the published package changes, so this PR has no changeset. The one effect is newer tsgolint lint rules inrr check, and with this repo's config they report nothing today.🤖 Generated with Claude Code
https://claude.ai/code/session_01V4iz3teZoyUZW9nXnX9RQr