swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.65k stars 1.31k forks source link

[Build/PackageGraph] Switch `BuildSubset.{product, target}` and `Modu… #7650

Closed xedin closed 3 weeks ago

xedin commented 3 weeks ago

…lesGraph.{product, target}(...)` to use optional destination

This is mostly an NFC change. It makes more sense to default destination to "undefined" when applicable because it's not always possible to know intended destination based on user input.

Motivation:

This kind of design makes more sense for internal APIs, instead of having users to pass .destination even though it might not be always correct.

Modifications:

Result:

Easier to understand and use APIs to request a build subset and product and module references from the modules graph.

xedin commented 3 weeks ago

@swift-ci please test

xedin commented 3 weeks ago

@swift-ci please test

xedin commented 3 weeks ago

@swift-ci please test Windows platform