-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Instead of storing timestamp of when last d.ts file was modified, store its name so buildinfo becomes portable again #49717
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
Conversation
How does this impact performance? Isn’t it more expensive to query those files? |
…dated to get modified time stamp from
dfb0ed2
to
882fb8c
Compare
We are querying only single file output file stamp only once and cache. (ABuildinfo stores the file name which should be latest so we dont have to query multiple files).. And during updates we update the timestamp to current time just like for buildInfo.. so watch updates should not incur this cost... |
@andrewbranch i would like to get this in for 4.8 |
@sheetalkamat In this context, "portable" means that you can share a tsbuildinfo across machines? |
@amcasey Yes. |
I'm not sure I understand why another box would have the same "most recent" file. Is the assumption that it emitted the same files in the same order? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a naming suggestion
#32023 talks about caching tsbuildinfo and outDir across directories.. Given everything is copied, the file name of latestChangedDtsFile shoudnt change so checking its timestamp should be ok. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't look at the logic change, but the concept and the baseline changes make sense.
As part of #31985, buildinfo was made portable but with latest change of store dts timestamp it looses that functionality.
With this change instead of storing timestamp of when the d.ts file was modified, we are storing name of that file so we can query its timestamp.
This also means, if d.ts files are same we wont rewrite them so the timestamp on disk can be trusted.