Skip to content

[clang][Dependency Scanning] Cherry-picking Negative Stat Caching Diagnostics in Dependency Scanning Service #10681

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

Open
wants to merge 3 commits into
base: swift/release/6.2
Choose a base branch
from

Conversation

qiongsiwu
Copy link

@qiongsiwu qiongsiwu commented May 14, 2025

This PR cherry-picks

llvm#135703
#10524
llvm#138955

These PRs implement clang's C-API to report invalid negatively stat cached paths.

rdar://149147920

qiongsiwu added 3 commits May 14, 2025 09:31
…ve Stat Cache Entries (llvm#135703)

We have had numerous situations where the negatively stat cached paths
are invalidated during the build, and such invalidations lead to build
errors.

This PR adds an API to diagnose such cases.
`DependencyScanningFilesystemSharedCache::diagnoseNegativeStatCachedPaths`
allows users of the cache to ask the cache to examine all negatively
stat cached paths, and re-stat the paths using the passed-in file
system. If any re-stat succeeds, the API emits diagnostics.

rdar://149147920
(cherry picked from commit 9ef9167)

 Conflicts:
	clang/unittests/Tooling/DependencyScanning/DependencyScanningFilesystemTest.cpp
…lvm#10524)

llvm#135703 added a C++ API to the shared cached to diagnose invalid negatively stat cached paths. This PR adds a C API so an external system can take advantage of the diagnostics.

rdar://149147920
(cherry picked from commit b7aa45c)
llvm#138955)

This PR makes a minor modification to make it more stable. The only
change is adding a suffix to the path under test.

rdar://149147920
(cherry picked from commit 2017831)
@qiongsiwu qiongsiwu requested a review from a team as a code owner May 14, 2025 16:42
@qiongsiwu
Copy link
Author

@swift-ci please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants