Skip to content

Conversation

jansvoboda11
Copy link
Contributor

This PR enables compilation caching for Swift package targets whenever normal targets have it enabled.

I originally wanted to hook into the SuperimposedProperties machinery and propagate it from normal targets similar to the setting for mergeable libraries. However, some aspects of TargetDependencyResolver made that very hard:

  • treating package targets differently from normal targets (see DiscoveredTargetInfo.immediateDependencies and DiscoveredTargetInfo.packageProductDependencies),
  • not propagating superimposed properties transitively,
  • only visiting nodes in the build graph once (even when the specializations differ).

@jansvoboda11
Copy link
Contributor Author

@swift-ci test

@jansvoboda11
Copy link
Contributor Author

The build log says the only test failure that's not known is coming from FileHandleTests.asyncReadFileDescriptor(). Let's try again.

@swift-ci test macOS platform

@jansvoboda11 jansvoboda11 merged commit 6988bf1 into main Jun 27, 2025
24 checks passed
@jansvoboda11 jansvoboda11 deleted the jan_svoboda/swift-package-compilation-caching branch June 27, 2025 16:37
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