Skip to content

fix(tsoptions): remove the config extension after the build info name is joined - #1040

Merged
camc314 merged 2 commits into
oxc-project:mainfrom
magurotuna:fix/buildinfo-name-extension-order
Nov 19, 2026
Merged

camc314 merged 2 commits into
oxc-project:mainfrom
magurotuna:fix/buildinfo-name-extension-order

Conversation

@magurotuna

Copy link
Copy Markdown
Member

A config named c:.json with incremental and "outDir": "out" panicked: vfs: path "c:.tsbuildinfo" is not absolute. tsgo writes out/c:.tsbuildinfo.

get_build_info_file_name removed the extension before it joined the name to outDir. The stem c: is a drive root, so the join dropped outDir. Go GetBuildInfoFileName joins first and removes the extension last, and this PR uses the same order. This also fixes b.json with "rootDir": "b", where tsgo writes b.tsbuildinfo and tsrs wrote out.tsbuildinfo.

Tests: buildinfo_name_config_drive_stem (-p, -p with rootDir, and -b). They fail without the fix. They do not run on Windows, where c:.json is not a valid file name.

AI assistance: written with Claude Code.

… is joined

A config file named `c:.json` with `incremental` and `outDir` made tsrs
panic (`vfs: path "c:.tsbuildinfo" is not absolute`), with or without
`rootDir`. tsgo writes `out/c:.tsbuildinfo`.

Go `GetBuildInfoFileName` (`outputpaths.go:253`) resolves the config file
name with its extension in `outDir` (or relative to `rootDir`), and removes
the extension last. `get_build_info_file_name` removed the extension first,
so the base name was `c:`, a drive root, and the join dropped `outDir`. Port
the Go order. This also fixes a config `b.json` with `"rootDir": "b"`: the
relative path of `b.json` from `b` is `../b.json`, so tsgo writes
`b.tsbuildinfo`, where tsrs wrote `out.tsbuildinfo`.

Tests: `buildinfo_name_config_drive_stem` in the tsrs_cli integration tests
(`-p` with `outDir`, `-p` with `outDir` and `rootDir`, and `-b`). They do not
run on Windows, where `c:.json` is not a valid file name.

AI assistance: written with Claude Code.
@codspeed

codspeed Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 4 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

βœ… 8 untouched benchmarks
⏩ 8 skipped benchmarks1


Comparing magurotuna:fix/buildinfo-name-extension-order (09d3084) with main (eba9b2b)2

Open in CodSpeed

Footnotes

  1. 8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (b84ddb4) during the generation of this report, so eba9b2b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@camc314
camc314 enabled auto-merge November 19, 2026 11:34
@camc314
camc314 added this pull request to the merge queue Nov 19, 2026
Merged via the queue into oxc-project:main with commit 7973e21 Nov 19, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants