-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Caching] Don't rely on FileSystem when replaying diagnostics #73822
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
[Caching] Don't rely on FileSystem when replaying diagnostics #73822
Conversation
@swift-ci please smoke test |
@swift-ci please smoke test linux platform |
ping |
if (Input.getFileName() != "-") | ||
SrcMgr.getExternalSourceBufferID(remapFilePath(Input.getFileName())); | ||
auto Path = remapFilePath(Input.getFileName()); | ||
SrcMgr.getExternalSourceBufferID(Path); |
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.
Duplicated with next line
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.
Those are two different SourceMgr. The first one is the one used to replay, and the second one is the actual SourceMgr from the instance.
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.
This deserves a comment or else rename SM
so it's clear the difference
1335162
to
0ccb256
Compare
@swift-ci please smoke test |
if (Input.getFileName() != "-") | ||
SrcMgr.getExternalSourceBufferID(remapFilePath(Input.getFileName())); | ||
auto Path = remapFilePath(Input.getFileName()); | ||
SrcMgr.getExternalSourceBufferID(Path); |
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.
This deserves a comment or else rename SM
so it's clear the difference
Stop relying on file system to provide source buffer for diagnostics when replying. This avoids initializing CASFS which is quite expensive. Now cached diagnostics contains CASID for the file buffer so it can initialize its own source manager without relying on the underlying file system. rdar://128423393
0ccb256
to
c132f74
Compare
@swift-ci please smoke test |
@swift-ci please smoke test linux platform |
Stop relying on file system to provide source buffer for diagnostics when replying. This avoids initializing CASFS which is quite expensive. Now cached diagnostics contains CASID for the file buffer so it can initialize its own source manager without relying on the underlying file system.
rdar://128423393