Skip to content

[6.2][Preview] Fix preview support for swift caching build (#562) #580

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

Add support for swift caching build when swift compiler supports the new option that allows swift compiler performs an uncached build but loading module dependencies from CAS.

It also does few adjustment to make sure preview build shares the same dependencies with regular build as caching build has a stricter rule for invalidation:

  • The VFS overlay used by preview is applied after swift driver invocation and onto the frontend invocation directly. This makes sure the VFS overlay doesn't invalidate all the module dependencies.
  • BridgingHeader PCH was disabled as a workaround when swift driver doesn't produce deterministic output path when planning for PCH jobs. Properly fix this issue by requesting the same path when planning both build and don't use this workaround in certain configurations.

This should allow preview to build thunk correctly when swift caching is enabled for the regular build.

rdar://152107465
(cherry picked from commit 6c6309e)

Add support for swift caching build when swift compiler supports the new
option that allows swift compiler performs an uncached build but loading
module dependencies from CAS.

It also does few adjustment to make sure preview build shares the same
dependencies with regular build as caching build has a stricter rule for
invalidation:

* The VFS overlay used by preview is applied after swift driver
  invocation and onto the frontend invocation directly. This makes sure
  the VFS overlay doesn't invalidate all the module dependencies.
* BridgingHeader PCH was disabled as a workaround when swift driver
  doesn't produce deterministic output path when planning for PCH jobs.
  Properly fix this issue by requesting the same path when planning both
  build and don't use this workaround in certain configurations.

This should allow preview to build thunk correctly when swift caching is
enabled for the regular build.

rdar://152107465
(cherry picked from commit 6c6309e)
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci test

@cachemeifyoucan cachemeifyoucan merged commit 22ccb4e into swiftlang:release/6.2 Jun 12, 2025
24 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