Repository navigation
fix(tsoptions): remove the config extension after the build info name is joined - #1040
Conversation
β¦ 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.
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
A config named
c:.jsonwithincrementaland"outDir": "out"panicked:vfs: path "c:.tsbuildinfo" is not absolute. tsgo writesout/c:.tsbuildinfo.get_build_info_file_nameremoved the extension before it joined the name tooutDir. The stemc:is a drive root, so the join droppedoutDir. GoGetBuildInfoFileNamejoins first and removes the extension last, and this PR uses the same order. This also fixesb.jsonwith"rootDir": "b", where tsgo writesb.tsbuildinfoand tsrs wroteout.tsbuildinfo.Tests:
buildinfo_name_config_drive_stem(-p,-pwithrootDir, and-b). They fail without the fix. They do not run on Windows, wherec:.jsonis not a valid file name.AI assistance: written with Claude Code.