Skip to content

Conversation

@pmattos
Copy link
Contributor

@pmattos pmattos commented Dec 12, 2025

Motivation:

Improve PIFBuilder testability by exposing all intermediary PackagePIFBuilder objects created during PIF construction.

For instance, this something we need to be able to add the required tests for PR #9436, where a fix was made to how PackagePIFBuilder computes some PIF metadata not directly used by SwiftPM (only by Xcode, and potentially other external clients too).

Modifications:

This PR extracts the following intermediary function from the existing — and very long! — PIFBuilder.constructPIF operation:

package func makePIFBuilders(
    buildParameters: BuildParameters
) async throws -> [(ResolvedPackage, PackagePIFBuilder, any PackagePIFBuilder.BuildDelegate)] 

...allowing it to be unit tested too! No new features are actually added — just plain refactoring :-)

Result:

Improved testability in SwiftBuildSupport.PIFBuilder class.

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