Skip to content

[Caching] Teach libSwiftScan to replay all diagnostics kinds #74128

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 26, 2024

Conversation

cachemeifyoucan
Copy link
Contributor

This PR contains two commits:

  • Refactor out the logics in FrontendTool that handles Diagnostics
  • Use the common logic to setup replayInstance in libSwiftScan to handle output kinds that are related to diagnostics

This allows supporting in-process replay from build system for all the diagnostics kind without diverging with the handling in swift-frontend.

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

Extract the logics for emitting diagnostics, especially the parseable
output message, from FrontendTools so it is easier to reason.
Add support for serialized diagnostics, parseable output, and other
kinds of output from diagnostics engine to the libSwiftScan
replayCompilation API.

rdar://129015959
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

ping for review.

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test macOS platform

@cachemeifyoucan
Copy link
Contributor Author

ping

@cachemeifyoucan
Copy link
Contributor Author

Another ping

Copy link
Contributor

@artemcm artemcm left a comment

Choose a reason for hiding this comment

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

Very tidy refactor, too. Thank you.

// StaticLinkJob, DynamicLinkJob
}

// TODO: Apply elsewhere in the compiler
Copy link
Contributor

Choose a reason for hiding this comment

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

👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is directly transported from original code. Do I own the TODO now that git blame will trace to me?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I think that's the law. 🤷🏼

@cachemeifyoucan cachemeifyoucan merged commit 5056e79 into swiftlang:main Jun 26, 2024
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