Skip to content

Conversation

cachemeifyoucan
Copy link
Contributor

Teach dependency scanner to canonicalize the path for better cache hit and also teach swift-frontend to restore the path to the actual on disk path after canonicalization.

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@xedin xedin removed their request for review September 22, 2023 17:07
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

Rebase after merge conflict.

@swift-ci please smoke test

Allow DependencyScanner to canonicalize path using a prefix map. When option `-scanner-prefix-map` option is used, dependency scanner will remap all the input paths in following: * all the paths in the CAS file system or clang include tree * all the paths related to input on the command-line returned by scanner This allows all the input paths to be canonicalized so cache key can be computed reguardless of the exact on disk path. The sourceFile field is not remapped so build system can track the exact file as on the local file system.
Teach CachedDiagnosticsProcessor to replay diagnostics for all consumers with a different path using a path prefix map. This allows diagnostics to be replayed for the actual path on disk after the scanner canonicalized the path for compilation.
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan cachemeifyoucan merged commit c8bc081 into swiftlang:main Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants