Skip to content

[Caching] Put caching diagnostics into its own DiagnosticGroups #82507

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

Merged
merged 2 commits into from
Jun 27, 2025

Conversation

cachemeifyoucan
Copy link
Contributor

Add explanation and documentation for swift caching diagnostics.

rdar://154335823

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli
Copy link
Contributor

This documentation explains what caching is but doesn't help the developer address the diagnostics, which I think is the primary role of documentation under userdocs/diagnostics/. I'm not necessarily saying that should be blocking, but what is the impetus for adding general documentation of caching this way?

@cachemeifyoucan
Copy link
Contributor Author

cachemeifyoucan commented Jun 25, 2025

This documentation explains what caching is but doesn't help the developer address the diagnostics, which I think is the primary role of documentation under userdocs/diagnostics/. I'm not necessarily saying that should be blocking, but what is the impetus for adding general documentation of caching this way?

It kind of says how to address the issue in a subtle way. The thought behind this is that actually the diagnostics in swift caching are mostly safe guards when something go wrong, like:

  • A broken CAS/CAS Service
  • User tries to modify/run the swift-frontend command-line by hand and did something unsupported
  • A compiler bug

There are generally no actionable item, other than:

  • Always use swift-driver to run caching build
  • Delete CAS and try again

On the other hand, if hit those errors, it can be quite confusing what to do. The diagnostics are trying to provide some path forward for debugging and workaround the issue when possible. Happy to work on the wording so that it can be better for this context.

@tshortli
Copy link
Contributor

It kind of says how to address the issue in a subtle way. The thought behind this is that actually the diagnostics in swift caching are mostly safe guards when something go wrong, like:

  • A broken CAS/CAS Service
  • User tries to modify/run the swift-frontend command-line by hand and did something unsupported
  • A compiler bug

There are generally no actionable item, other than:

  • Always use swift-driver to run caching build
  • Delete CAS and try again

On the other hand, if hit those errors, it can be quite confusing what to do. The diagnostics are trying to provide some path forward for debugging and workaround the issue when possible. Happy to work on the wording so that it can be better for this context.

Maybe what you wrote above should be summarized in a section of the doc that is specifically about the diagnostics. For example, split it into two sections: the first being a high-level, brief overview of what caching is and the second being an explanation of potential sources of errors and what to do about them.

Add explanation and documentation for swift caching diagnostics.

rdar://154335823
@cachemeifyoucan
Copy link
Contributor Author

Document updated to be more error centric.

Copy link
Contributor

@tshortli tshortli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think the revised version will be clearer for users!

Co-authored-by: Allan Shortlidge <[email protected]>
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan cachemeifyoucan enabled auto-merge (squash) June 26, 2025 20:31
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test macOS platform

@cachemeifyoucan cachemeifyoucan merged commit a298c75 into swiftlang:main Jun 27, 2025
3 checks passed
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