-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect place of tsbuildinfo file when rootDir option is specified #30925
Comments
This is correct since the output is relative to rootDir when specified. Since configFile is in parent directory relative to rootDir, the tsbuildinfo file goes in parent folder to outDir. From d53efdf
|
This issue has been marked 'Working as Intended' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
@sheetalkamat this part was very much not obvious, and not mentioned in the original #29813 spec
This has left me needing to specify Is there something other than |
This is definitely not obvious. I spent quite a while to figure out, why after adding a The reason is my project layout is having a Putting the spec mentioned above in the doc would be helpful for sure. Another thing can be done is changing |
At the end of the day needing to add |
Sure. Solving the issue is not hard, finding out why is really time consuming OTOH. |
I hit this situation the other day, and had to add
The tsbuildinfo was emitting one level up, outside of my project's directory. This matches the description here #30925 (comment) but was initially confusing. I guess it's done this way because the .tsbuildinfo is an artifact of my tsconfig file, similar to how .js and .d.ts files are artifacts of the .ts source code. Alternative to specifying |
I've encountered this odd behavior when working under Bazel: rootDir: This results in this behavior: Relative path from rootDir to tsconfig: Computed path to tsBuildInfo: This is outside the outDir and in a bit of a nonsense location! 🤯 (My file system complains about this 😛) I'm not sure what the "ideal" behavior is, but it's certainly at least a little unexpected. Perhaps if the path is relative we could remove any leading |
I was going to report a bug because the actual default of tsbuildinfo does not match the docs for --tsBuildInfoFile. I found [this issue] was already reported and closed as 'working as intended'. So I decided to add @sheetalkamat's response to the docs. [this issue]: microsoft/TypeScript#30925
TypeScript Version:
3.5.0-dev.20190413
,3.4.3
Search Terms:
tsbuildinfo, incremental build, rootDir
Code
For reproduce test project https://github.com/ikokostya/ts-bugs can be used:
The test project has the following file structure:
tsconfig.json
content:Expected behavior:
After compilation
tsbuildinfo
file will be placed inout
directory, i.e../out/tsconfig.tsbuildinfo
.Actual behavior:
tsbuildinfo
file is placed in project root directory, i.e../tsconfig.tsbuildinfo
.Playground Link:
Related Issues:
#29161
#30457
The text was updated successfully, but these errors were encountered: