Closed
Description
Is it possible to make the tsbuildinfo
-file portable so it can be shared between different machine environments?
Search Terms
tsbuildinfo, portable, cache
Suggestion
Looking at a tsbuildinfo
-file, it contains absolute paths, both in fileInfos
and options
. I don't know how the hashes in version
and signature
are created, and if they contain elements of the absolute path in some way. If not, then maybe it's enough to make the paths relative?
Use Cases
We want to cache outDir
on the CI and on local dev machines to enable instant incremental builds. But we can't currently bring back a tsbuildinfo
-file from a different environment since it will be discarded as it contains absolute paths. In this case, the project will have to be rebuilt.
Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.