Skip to content

[6.1][CAS] Allow empty filename for diagnostics location #78407

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

cachemeifyoucan
Copy link
Contributor

@cachemeifyoucan cachemeifyoucan commented Jan 2, 2025

  • Explanation: Fix a bug that an empty filename for diagnostics can trigger an error in the cached diagnostics. The empty filename can be a virtual file synthesized, for example, to hold an implicit attribute from clang importer.
  • Scope: The cached diagnostics can correctly handle such filename now and cached/replay those diagnostics.
  • Issues: rdar://141961161
  • Original PRs: [CAS] Allow empty filename for diagnostics location #78406
  • Risk: Low. Swift caching only and a very safe fix to handle empty file names.
  • Testing: Added unit test.
  • Reviewers: @benlangmuir

@cachemeifyoucan cachemeifyoucan requested a review from a team as a code owner January 2, 2025 18:17
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

Fix a bug that an empty filename for diagnostics can trigger an error
in the cached diagnostics. The empty filename can be a virtual file
synthesized, for example, to hold an implicit attribute from clang
importer.

The cached diagnostics can correctly handle such filename now and
cached/replay those diagnostics.

rdar://141961161
@cachemeifyoucan cachemeifyoucan force-pushed the eng/PR-141961161-release branch from 637e8bd to 8070d43 Compare January 2, 2025 21:19
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

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

This should be a very safe fix.

@cachemeifyoucan cachemeifyoucan merged commit fdc00c4 into swiftlang:release/6.1 Jan 6, 2025
5 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