swiftlang / swift-package-manager

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

[6.0] Improvements to prebuilt/provided library handling #7713

Closed MaxDesiatov closed 5 days ago

MaxDesiatov commented 6 days ago

Cherry-pick of https://github.com/swiftlang/swift-package-manager/pull/7496 and https://github.com/swiftlang/swift-package-manager/pull/7433, excluding 16b4142.

Explanation: The idea is to enable provided libraries to be a part of a toolchain, which means that instead of completely eliding them from a package graph, they need to be handled post-resolution in a special way and reflected in a build plan for Swift targets (as compiler and linker arguments). Unified handling of config.json and provided-libraries.json resources and dropped use of Bundle type (config should always be a part of SDK or a toolchain). Scope: Localized, touches modules graph resolution and build planning only in certain configurations. Risk: Low. While the change has a somewhat broad scope, it's NFC for most builds and has been incubated on main for 2 months with no known issues. Testing: New test cases added and existing ones updated. Issue: rdar://125531670 Reviewer: @MaxDesiatov and @bnbarham

MaxDesiatov commented 6 days ago

@swift-ci test

MaxDesiatov commented 5 days ago

@swift-ci test

MaxDesiatov commented 5 days ago

@swift-ci test windows