Skip to content

Adopt new PIF builder in SwiftBuildSupport #8454

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 17 commits into from
Apr 17, 2025

Conversation

pmattos
Copy link
Contributor

@pmattos pmattos commented Apr 7, 2025

Motivation:

Switch from the legacy PIF builder in SwiftBuildSupport to the new one, introduced by PR #8405.

The new PIF builder (i.e., SwiftBuildSupport/PackagePIFBuilder*.swift) is the exact same we use in Xcode.

Modifications:

Replaces the old PIF builder (i.e., SwiftBuildSupport/PIF.swift and SwiftBuildSupport/PIFBuilder.swift ) with the new one (i.e., SwiftBuildSupport/PackagePIFBuilder*.swift).

Result:

The new PIF builder now fully replaces the legacy PIF builder.

In particular, all these Swift Build tests are passing (i.e., same as before this PR):

  • BuildPlanSwiftBuildTests
  • APIDiffSwiftBuildTests
  • BuildCommandSwiftBuildTests
  • PackageCommandSwiftBuildTests
  • RunCommandSwiftBuildTests
  • TestCommandSwiftBuildTests

I also improved the PIF logging too. Try the --very-verbose option. For instance:

    $ swift run swift-build --build-system swiftbuild --very-verbose --package-path path/to/package 2>&1 | grep 'PIF[:]'
    
    info: PIF: Building PIF project for package 'basiclibrarypackage' (2 products, 2 modules)
    debug: PIF: Processing 2 products:
    debug: PIF: Created target 'PACKAGE-PRODUCT:BasicLibraryPackageTests' of type 'unitTest' with name 'BasicLibraryPackageTests-product' and product name 'BasicLibraryPackageTests'
    debug: PIF:   Added source file group '/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage/Tests/BasicLibraryPackageTests'
    debug: PIF:     Added source file 'Tests.swift'
    debug: PIF:   Added linked dependency on target 'PACKAGE-TARGET:BasicLibraryPackage'
    debug: PIF: Created target 'PACKAGE-PRODUCT:BasicLibraryPackage' of type 'packageProduct' with name 'BasicLibraryPackage-product' and product name 'libBasicLibraryPackage.a'
    debug: PIF:   Added linked dependency on target 'PACKAGE-TARGET:BasicLibraryPackage'
    debug: PIF: Created target 'PACKAGE-PRODUCT:BasicLibraryPackage--5ED171FB86F448A-dynamic' of type 'dynamicLibrary' with name 'BasicLibraryPackagedynamic-product' and product name 'libBasicLibraryPackage.dylib'
    debug: PIF:   Added linked dependency on target 'PACKAGE-TARGET:BasicLibraryPackage'
    debug: PIF: Processing 2 modules:
    debug: PIF: Created target 'PACKAGE-TARGET:BasicLibraryPackage' of type 'objectFile' with name 'BasicLibraryPackage' and product name 'BasicLibraryPackage.o'
    debug: PIF:   Added '["-Wl,-no_warn_duplicate_libraries", "$(inherited)"]' to imparted OTHER_LDFLAGS
    debug: PIF:   Added '["$(BUILT_PRODUCTS_DIR)/PackageFrameworks", "$(inherited)"]' to imparted FRAMEWORK_SEARCH_PATHS
    debug: PIF:   Added source file group '/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage/Sources/BasicLibraryPackage'
    debug: PIF:     Added source file 'Bar.swift'
    debug: PIF:     Added source file 'Foo.swift'
    debug: PIF: Created target 'PACKAGE-TARGET:BasicLibraryPackage--5ED171FB86F448A-dynamic' of type 'dynamicLibrary' with name 'BasicLibraryPackage' and product name 'libBasicLibraryPackage.dylib'
    debug: PIF:   Added '["-Wl", "-no_warn_duplicate_libraries", "$(inherited)"]' to imparted OTHER_LDFLAGS
    debug: PIF:   Added '["$(BUILT_PRODUCTS_DIR)/PackageFrameworks", "$(inherited)"]' to imparted FRAMEWORK_SEARCH_PATHS
    debug: PIF:   Added source file group '/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage/Sources/BasicLibraryPackage'
    debug: PIF:     Added source file 'Bar.swift'
    debug: PIF:     Added source file 'Foo.swift'
    debug: PIF: Created project 'AGGREGATE' with name 'Aggregate'
    debug: PIF:   Created target 'ALL-INCLUDING-TESTS' with name 'AllIncludingTests' and 3 (unlinked) dependencies
    debug: PIF:   Created target 'ALL-EXCLUDING-TESTS' with name 'AllExcludingTests' and 2 (unlinked) dependencies

Tracked by rdar://147527170.

@pmattos pmattos marked this pull request as draft April 7, 2025 17:18
@pmattos pmattos force-pushed the pmattos/new-pif-builder-in-SwiftBuildSupport branch from 60ad0bb to 8bee0fc Compare April 7, 2025 17:19
@pmattos pmattos force-pushed the pmattos/new-pif-builder-in-SwiftBuildSupport branch 2 times, most recently from 424aade to 9e64b1f Compare April 11, 2025 00:51
// as the build artifacts from "PACKAGE-TARGET:Foo"
// conflicts with those from "PACKAGE-TARGET:Foo-dynamic".
continue
}
Copy link
Contributor Author

@pmattos pmattos Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I excluded these dynamic variant PIF targets from the "AGGREGATE" project to bypass the following build errors:

error: unknown Multiple commands produce '<Linked Binary /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/libBasicLibraryPackage.dylib>' []
error: unknown Multiple commands produce '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage_lto.o' []
error: unknown Multiple commands produce '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage_dependency_info.dat' []
error: unknown Multiple commands produce '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage Swift Compilation Requirements Finished' []
error: unknown Multiple commands produce '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.swiftmodule' []
error: unknown Multiple commands produce '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.swiftsourceinfo' []
error: unknown Multiple commands produce '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.abi.json' []
error: unknown Multiple commands produce '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage-Swift.h' []
error: unknown Multiple commands produce '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.swiftdoc' []
error: unknown Multiple commands produce '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.LinkFileList' []

warning: unknown duplicate output file '' on task: RegisterExecutionPolicyException /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/libBasicLibraryPackage.dylib []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/libBasicLibraryPackage.dylib' on task: Ld /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/libBasicLibraryPackage.dylib normal []

warning: unknown duplicate output file '' on task: Ld /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/libBasicLibraryPackage.dylib normal []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage Swift Compilation Finished' on task: SwiftDriver Compilation BasicLibraryPackage normal arm64 com.apple.xcode.tools.swift.compiler []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/Bar.o' on task: SwiftDriver Compilation BasicLibraryPackage normal arm64 com.apple.xcode.tools.swift.compiler []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/Foo.o' on task: SwiftDriver Compilation BasicLibraryPackage normal arm64 com.apple.xcode.tools.swift.compiler []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/Bar.swiftconstvalues' on task: SwiftDriver Compilation BasicLibraryPackage normal arm64 com.apple.xcode.tools.swift.compiler []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/Foo.swiftconstvalues' on task: SwiftDriver Compilation BasicLibraryPackage normal arm64 com.apple.xcode.tools.swift.compiler []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/GeneratedModuleMaps/BasicLibraryPackage.modulemap' on task: Copy /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/GeneratedModuleMaps/BasicLibraryPackage.modulemap /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/BasicLibraryPackage.modulemap []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/BasicLibraryPackage.swiftmodule/Project/arm64-apple-macos.swiftsourceinfo' on task: Copy /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/BasicLibraryPackage.swiftmodule/Project/arm64-apple-macos.swiftsourceinfo /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.swiftsourceinfo []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/BasicLibraryPackage.swiftmodule/arm64-apple-macos.abi.json' on task: Copy /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/BasicLibraryPackage.swiftmodule/arm64-apple-macos.abi.json /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.abi.json []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/BasicLibraryPackage.swiftmodule/arm64-apple-macos.swiftdoc' on task: Copy /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/BasicLibraryPackage.swiftmodule/arm64-apple-macos.swiftdoc /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.swiftdoc []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/BasicLibraryPackage.swiftmodule/arm64-apple-macos.swiftmodule' on task: Copy /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/BasicLibraryPackage.swiftmodule/arm64-apple-macos.swiftmodule /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.swiftmodule []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage_lto.o' on task: Ld /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/BasicLibraryPackage.o normal []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage_dependency_info.dat' on task: Ld /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Products/Debug/BasicLibraryPackage.o normal []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage Swift Compilation Requirements Finished' on task: SwiftDriver Compilation Requirements BasicLibraryPackage normal arm64 com.apple.xcode.tools.swift.compiler []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.swiftmodule' on task: SwiftDriver Compilation Requirements BasicLibraryPackage normal arm64 com.apple.xcode.tools.swift.compiler []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.swiftsourceinfo' on task: SwiftDriver Compilation Requirements BasicLibraryPackage normal arm64 com.apple.xcode.tools.swift.compiler []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.abi.json' on task: SwiftDriver Compilation Requirements BasicLibraryPackage normal arm64 com.apple.xcode.tools.swift.compiler []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage-Swift.h' on task: SwiftDriver Compilation Requirements BasicLibraryPackage normal arm64 com.apple.xcode.tools.swift.compiler []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.swiftdoc' on task: SwiftDriver Compilation Requirements BasicLibraryPackage normal arm64 com.apple.xcode.tools.swift.compiler []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/GeneratedModuleMaps/BasicLibraryPackage-Swift.h' on task: SwiftMergeGeneratedHeaders /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/GeneratedModuleMaps/BasicLibraryPackage-Swift.h /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage-Swift.h []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/BasicLibraryPackage.modulemap' on task: WriteAuxiliaryFile /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/BasicLibraryPackage.modulemap []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage-OutputFileMap.json' on task: WriteAuxiliaryFile /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage-OutputFileMap.json []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.LinkFileList' on task: WriteAuxiliaryFile /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.LinkFileList []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.SwiftFileList' on task: WriteAuxiliaryFile /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage.SwiftFileList []
warning: unknown duplicate output file '/SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage_const_extract_protocols.json' on task: WriteAuxiliaryFile /SamplePackages/BasicLibraryPackage/.build/arm64-apple-macosx/Intermediates.noindex/BasicLibraryPackage.build/Debug/BasicLibraryPackage.build/Objects-normal/arm64/BasicLibraryPackage_const_extract_protocols.json []

My understanding is that we use such dynamic variants for development-time features such as Previews and Swift Playgrounds.

@jakepetroules also mentioned this was a workaround for the so called "diamond" linking issue:

  1. A links B and C.
  2. B and C links static lib D.
  3. D symbols will end up duplicated in A.

The solution is then to promote D to a dynamic lib instead.

I did try setting a custom TARGET_BUILD_DIR on those targets but didn't help out.

I attached to corresponding PIF file, if that helps:
NEW_PIF.json

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the old SwiftPM PIF look like for this project?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old PIF (ie, --build-system xcode) doesn't include these 2 "dynamic variant" targets. As such, it looks like this:

  • workspace
    • project "BasicLibraryPackage" (3 targets)
    • project "Aggregate" (2 targets)

...and the new PIF (ie, --build-system swiftbuild) is:

  • workspace
    • project "BasicLibraryPackage" (5 targets)
    • project "Aggregate" (2 targets)

I attached the old PIF JSON file if that helps.

OLD_PIF.json

Copy link
Contributor Author

@pmattos pmattos Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...if I remove these 2 "dynamic variant" targets from the new PIF (and put things in the exact same order), then:

diff OLD.pif NEW.pif

looks like this:

4c4
<       "guid" : "Workspace:/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage@11",
---
>       "guid" : "Workspace:/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage",
8,9c8,9
<         "df181a52ee5f546892cb27383bdfbda2b0cc8d2c6994965b2e9c5cde8f98744f",
<         "d9afb6c4d224c848c41a0b8d9750e40ac733b2422acfef81ddc9a16e97f709f9"
---
>         "8d021553d05a74c5ccfc3ab224ae8ac514f7c7f1da50db2e7955bba7218d3577",
>         "5adb64ced355876f8352c4fbb2c9a0d89210ef6f4aa639c962a26062e07e4ad2"
12c12
<     "signature" : "904e0ba77b0e775e8c58cd3e514c18b0c74953a6e8126f3ccf5f38d987d433b5",
---
>     "signature" : "557e44dfe54f60c31bf4f260b5bf764316d542395cb6dbe28d0b56a0b9b39dd5",
22a23
>             "COMPILER_WORKING_DIRECTORY" : "$(WORKSPACE_DIR)",
31,42d31
<             "FRAMEWORK_SEARCH_PATHS[__platform_filter=ios;ios-simulator]" : [
<               "$(inherited)",
<               "$(PLATFORM_DIR)/Developer/Library/Frameworks"
<             ],
<             "FRAMEWORK_SEARCH_PATHS[__platform_filter=macos]" : [
<               "$(inherited)",
<               "$(PLATFORM_DIR)/Developer/Library/Frameworks"
<             ],
<             "FRAMEWORK_SEARCH_PATHS[__platform_filter=tvos;tvos-simulator]" : [
<               "$(inherited)",
<               "$(PLATFORM_DIR)/Developer/Library/Frameworks"
<             ],
50c39,41
<             "IPHONEOS_DEPLOYMENT_TARGET[__platform_filter=ios-maccatalyst]" : "13.0",
---
>             "IPHONEOS_DEPLOYMENT_TARGET[__platform_filter=ios-maccatalyst]" : [
>               "13.0"
>             ],
53a45,48
>             "OTHER_CFLAGS" : [
>               "$(inherited)",
>               "-DXcode"
>             ],
56a52,55
>             "OTHER_SWIFT_FLAGS" : [
>               "$(inherited)",
>               "-DXcode"
>             ],
58,59d56
<             "SDKROOT" : "auto",
<             "SDK_VARIANT" : "auto",
71a69
>             "TARGETED_DEVICE_FAMILY" : "",
77c75
<           "guid" : "PACKAGE:/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage::BUILDCONFIG_Debug",
---
>           "guid" : "PACKAGE:basiclibrarypackage::BUILDCONFIG_0",
89a88
>             "COMPILER_WORKING_DIRECTORY" : "$(WORKSPACE_DIR)",
94d92
<             "ENABLE_TESTABILITY" : "YES",
97,108d94
<             "FRAMEWORK_SEARCH_PATHS[__platform_filter=ios;ios-simulator]" : [
<               "$(inherited)",
<               "$(PLATFORM_DIR)/Developer/Library/Frameworks"
<             ],
<             "FRAMEWORK_SEARCH_PATHS[__platform_filter=macos]" : [
<               "$(inherited)",
<               "$(PLATFORM_DIR)/Developer/Library/Frameworks"
<             ],
<             "FRAMEWORK_SEARCH_PATHS[__platform_filter=tvos;tvos-simulator]" : [
<               "$(inherited)",
<               "$(PLATFORM_DIR)/Developer/Library/Frameworks"
<             ],
115c101,103
<             "IPHONEOS_DEPLOYMENT_TARGET[__platform_filter=ios-maccatalyst]" : "13.0",
---
>             "IPHONEOS_DEPLOYMENT_TARGET[__platform_filter=ios-maccatalyst]" : [
>               "13.0"
>             ],
117a106,109
>             "OTHER_CFLAGS" : [
>               "$(inherited)",
>               "-DXcode"
>             ],
120a113,116
>             "OTHER_SWIFT_FLAGS" : [
>               "$(inherited)",
>               "-DXcode"
>             ],
122,123d117
<             "SDKROOT" : "auto",
<             "SDK_VARIANT" : "auto",
134a129
>             "TARGETED_DEVICE_FAMILY" : "",
140c135
<           "guid" : "PACKAGE:/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage::BUILDCONFIG_Release",
---
>           "guid" : "PACKAGE:basiclibrarypackage::BUILDCONFIG_1",
150d144
<       "developmentRegion" : "en",
154a149,168
> 
>             ],
>             "guid" : "PACKAGE:basiclibrarypackage::MAINGROUP::REF_0",
>             "name" : "AdditionalFiles",
>             "path" : "/",
>             "sourceTree" : "<absolute>",
>             "type" : "group"
>           },
>           {
>             "children" : [
> 
>             ],
>             "guid" : "PACKAGE:basiclibrarypackage::MAINGROUP::REF_1",
>             "name" : "Binaries",
>             "path" : "/",
>             "sourceTree" : "<absolute>",
>             "type" : "group"
>           },
>           {
>             "children" : [
157c171
<                 "guid" : "PACKAGE:/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage::MAINGROUP::REF_0::REF_0",
---
>                 "guid" : "PACKAGE:basiclibrarypackage::MAINGROUP::REF_2::REF_0",
164,167c178,181
<             "guid" : "PACKAGE:/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage::MAINGROUP::REF_0",
<             "name" : "Tests/BasicLibraryPackageTests",
<             "path" : "Tests/BasicLibraryPackageTests",
<             "sourceTree" : "<group>",
---
>             "guid" : "PACKAGE:basiclibrarypackage::MAINGROUP::REF_2",
>             "name" : "/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage/Tests/BasicLibraryPackageTests",
>             "path" : "/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage/Tests/BasicLibraryPackageTests",
>             "sourceTree" : "<absolute>",
174c188
<                 "guid" : "PACKAGE:/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage::MAINGROUP::REF_1::REF_0",
---
>                 "guid" : "PACKAGE:basiclibrarypackage::MAINGROUP::REF_3::REF_0",
182c196
<                 "guid" : "PACKAGE:/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage::MAINGROUP::REF_1::REF_1",
---
>                 "guid" : "PACKAGE:basiclibrarypackage::MAINGROUP::REF_3::REF_1",
189,192c203,231
<             "guid" : "PACKAGE:/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage::MAINGROUP::REF_1",
<             "name" : "Sources/BasicLibraryPackage",
<             "path" : "Sources/BasicLibraryPackage",
<             "sourceTree" : "<group>",
---
>             "guid" : "PACKAGE:basiclibrarypackage::MAINGROUP::REF_3",
>             "name" : "/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage/Sources/BasicLibraryPackage",
>             "path" : "/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage/Sources/BasicLibraryPackage",
>             "sourceTree" : "<absolute>",
>             "type" : "group"
>           },
>           {
>             "children" : [
>               {
>                 "fileType" : "sourcecode.swift",
>                 "guid" : "PACKAGE:basiclibrarypackage::MAINGROUP::REF_4::REF_0",
>                 "name" : "Bar.swift",
>                 "path" : "Bar.swift",
>                 "sourceTree" : "<group>",
>                 "type" : "file"
>               },
>               {
>                 "fileType" : "sourcecode.swift",
>                 "guid" : "PACKAGE:basiclibrarypackage::MAINGROUP::REF_4::REF_1",
>                 "name" : "Foo.swift",
>                 "path" : "Foo.swift",
>                 "sourceTree" : "<group>",
>                 "type" : "file"
>               }
>             ],
>             "guid" : "PACKAGE:basiclibrarypackage::MAINGROUP::REF_4",
>             "name" : "/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage/Sources/BasicLibraryPackage",
>             "path" : "/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage/Sources/BasicLibraryPackage",
>             "sourceTree" : "<absolute>",
196c235
<         "guid" : "PACKAGE:/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage::MAINGROUP",
---
>         "guid" : "PACKAGE:basiclibrarypackage::MAINGROUP",
202,203c241,242
<       "guid" : "PACKAGE:/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage@11",
<       "path" : "/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage",
---
>       "guid" : "PACKAGE:basiclibrarypackage",
>       "path" : "/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage/Package.swift",
208,210c247,251
<         "14078926eb8163a6888e8187f5c6abae6cbb76cc00fdee6763641a895c8808d4",
<         "c6d43ac7aa1a9119403d59c7990ad5b0da42e8d372bc167393c800272ecd50ac",
<         "4858799caedd0dc4c9843fa82baec7d3b64771bb96ad211a01e25b2b7b9ae579"
---
>         "1af2f35db7c762fa4b661ba6a1e670aa9b00f9675bbb6e5166815d3dbf30f102",
>         "75514b86aeaf1cda69a842cb439a70c80105d2a3ea5363b694fc7391acfcd7fc",
>         "09dd81b47a88649087237b3c95f2c6b4879e9e3bb23819c6f0fbef06e52d893a",
>         "bbe2c78fb059cdfcd4979df0b07aa0ba99c25d869a64e7d69d0d880f05d9fafd",
>         "1e16336130fc20cde6e4b9a8b7d19657873654cc1dbbc679e8db9c0f84b3b408"
213c254
<     "signature" : "df181a52ee5f546892cb27383bdfbda2b0cc8d2c6994965b2e9c5cde8f98744f",
---
>     "signature" : "8d021553d05a74c5ccfc3ab224ae8ac514f7c7f1da50db2e7955bba7218d3577",
217a259
>       "approvedByUser" : "true",
221c263,264
<             "APPLICATION_EXTENSION_API_ONLY" : "YES",
---
>             "SDKROOT" : "auto",
>             "SDK_VARIANT" : "auto",
224c267
<           "guid" : "PACKAGE-PRODUCT:BasicLibraryPackage::BUILDCONFIG_Debug",
---
>           "guid" : "PACKAGE-PRODUCT:BasicLibraryPackage::BUILDCONFIG_0",
234c277,278
<             "APPLICATION_EXTENSION_API_ONLY" : "YES",
---
>             "SDKROOT" : "auto",
>             "SDK_VARIANT" : "auto",
237c281
<           "guid" : "PACKAGE-PRODUCT:BasicLibraryPackage::BUILDCONFIG_Release",
---
>           "guid" : "PACKAGE-PRODUCT:BasicLibraryPackage::BUILDCONFIG_1",
245a290,292
>       "customTasks" : [
> 
>       ],
248c295,298
<           "guid" : "PACKAGE-TARGET:BasicLibraryPackage@11"
---
>           "guid" : "PACKAGE-TARGET:BasicLibraryPackage",
>           "platformFilters" : [
> 
>           ]
250a301
>       "dynamicTargetVariantGuid" : "PACKAGE-PRODUCT:BasicLibraryPackage--5ED171FB86F448A-dynamic",
258c309
<             "targetReference" : "PACKAGE-TARGET:BasicLibraryPackage@11"
---
>             "targetReference" : "PACKAGE-TARGET:BasicLibraryPackage"
264,265c315,316
<       "guid" : "PACKAGE-PRODUCT:BasicLibraryPackage@11",
<       "name" : "BasicLibraryPackage_-5ED171FB86F448A_PackageProduct",
---
>       "guid" : "PACKAGE-PRODUCT:BasicLibraryPackage",
>       "name" : "BasicLibraryPackage-product",
268c319
<     "signature" : "14078926eb8163a6888e8187f5c6abae6cbb76cc00fdee6763641a895c8808d4",
---
>     "signature" : "75514b86aeaf1cda69a842cb439a70c80105d2a3ea5363b694fc7391acfcd7fc",
272a324
>       "approvedByUser" : "true",
277c329,331
<             "DEFINES_MODULE" : "YES",
---
>             "DRIVERKIT_DEPLOYMENT_TARGET" : "19.0",
>             "EXECUTABLE_NAME" : "BasicLibraryPackageTests",
>             "GENERATE_EMBED_IN_CODE_ACCESSORS" : "NO",
278a333
>             "GENERATE_RESOURCE_ACCESSORS" : "YES",
279a335,337
>             "IPHONEOS_DEPLOYMENT_TARGET[__platform_filter=ios-maccatalyst]" : [
>               "17.0"
>             ],
281d338
<               "$(inherited)",
283c340,341
<               "@loader_path/../Frameworks"
---
>               "@loader_path/../Frameworks",
>               "$(inherited)"
285,288d342
<             "LIBRARY_SEARCH_PATHS" : [
<               "$(inherited)",
<               "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx"
<             ],
290,293d343
<             "OTHER_SWIFT_FLAGS" : [
<               "-package-name",
<               "basiclibrarypackage"
<             ],
295c345
<             "PRODUCT_BUNDLE_IDENTIFIER" : "BasicLibraryPackageTests",
---
>             "PRODUCT_BUNDLE_IDENTIFIER" : "basiclibrarypackage.BasicLibraryPackageTests",
297a348,355
>             "SDKROOT" : "auto",
>             "SDK_VARIANT" : "auto",
>             "SKIP_INSTALL" : "NO",
>             "SWIFT_ACTIVE_COMPILATION_CONDITIONS" : [
>               "$(inherited)"
>             ],
>             "SWIFT_ENABLE_BARE_SLASH_REGEX" : "NO",
>             "SWIFT_PACKAGE_NAME" : "basiclibrarypackage",
304c362
<           "guid" : "PACKAGE-PRODUCT:BasicLibraryPackageTests::BUILDCONFIG_Debug",
---
>           "guid" : "PACKAGE-PRODUCT:BasicLibraryPackageTests::BUILDCONFIG_0",
315c373,375
<             "DEFINES_MODULE" : "YES",
---
>             "DRIVERKIT_DEPLOYMENT_TARGET" : "19.0",
>             "EXECUTABLE_NAME" : "BasicLibraryPackageTests",
>             "GENERATE_EMBED_IN_CODE_ACCESSORS" : "NO",
316a377
>             "GENERATE_RESOURCE_ACCESSORS" : "YES",
317a379,381
>             "IPHONEOS_DEPLOYMENT_TARGET[__platform_filter=ios-maccatalyst]" : [
>               "17.0"
>             ],
319d382
<               "$(inherited)",
321c384,385
<               "@loader_path/../Frameworks"
---
>               "@loader_path/../Frameworks",
>               "$(inherited)"
323,326d386
<             "LIBRARY_SEARCH_PATHS" : [
<               "$(inherited)",
<               "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx"
<             ],
328,331d387
<             "OTHER_SWIFT_FLAGS" : [
<               "-package-name",
<               "basiclibrarypackage"
<             ],
333c389
<             "PRODUCT_BUNDLE_IDENTIFIER" : "BasicLibraryPackageTests",
---
>             "PRODUCT_BUNDLE_IDENTIFIER" : "basiclibrarypackage.BasicLibraryPackageTests",
335a392,399
>             "SDKROOT" : "auto",
>             "SDK_VARIANT" : "auto",
>             "SKIP_INSTALL" : "NO",
>             "SWIFT_ACTIVE_COMPILATION_CONDITIONS" : [
>               "$(inherited)"
>             ],
>             "SWIFT_ENABLE_BARE_SLASH_REGEX" : "NO",
>             "SWIFT_PACKAGE_NAME" : "basiclibrarypackage",
342c406
<           "guid" : "PACKAGE-PRODUCT:BasicLibraryPackageTests::BUILDCONFIG_Release",
---
>           "guid" : "PACKAGE-PRODUCT:BasicLibraryPackageTests::BUILDCONFIG_1",
355c419,420
<               "fileReference" : "PACKAGE:/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage::MAINGROUP::REF_0::REF_0",
---
>               "codeSignOnCopy" : "false",
>               "fileReference" : "PACKAGE:basiclibrarypackage::MAINGROUP::REF_2::REF_0",
359c424,425
<               ]
---
>               ],
>               "removeHeadersOnCopy" : "false"
372c438
<               "targetReference" : "PACKAGE-TARGET:BasicLibraryPackage@11"
---
>               "targetReference" : "PACKAGE-TARGET:BasicLibraryPackage"
381a448,450
>       "customTasks" : [
> 
>       ],
384,389c453,454
<           "guid" : "PACKAGE-TARGET:BasicLibraryPackage@11"
<         }
<       ],
<       "guid" : "PACKAGE-PRODUCT:BasicLibraryPackageTests@11",
<       "impartedBuildProperties" : {
<         "buildSettings" : {
---
>           "guid" : "PACKAGE-TARGET:BasicLibraryPackage",
>           "platformFilters" : [
390a456
>           ]
392,393c458,460
<       },
<       "name" : "BasicLibraryPackageTests_3EF3A79092285C8E_PackageProduct",
---
>       ],
>       "guid" : "PACKAGE-PRODUCT:BasicLibraryPackageTests",
>       "name" : "BasicLibraryPackageTests-product",
402c469
<     "signature" : "c6d43ac7aa1a9119403d59c7990ad5b0da42e8d372bc167393c800272ecd50ac",
---
>     "signature" : "1af2f35db7c762fa4b661ba6a1e670aa9b00f9675bbb6e5166815d3dbf30f102",
406a474
>       "approvedByUser" : "true",
412a481
>             "EXECUTABLE_NAME" : "BasicLibraryPackage.o",
415,420c484,485
<             "MODULEMAP_FILE_CONTENTS" : "module BasicLibraryPackage {\n    header \"BasicLibraryPackage-Swift.h\"\n    export *\n}",
<             "MODULEMAP_PATH" : "$(OBJROOT)/GeneratedModuleMaps/$(PLATFORM_NAME)/BasicLibraryPackage.modulemap",
<             "OTHER_SWIFT_FLAGS" : [
<               "-package-name",
<               "basiclibrarypackage"
<             ],
---
>             "MODULEMAP_FILE_CONTENTS" : "module BasicLibraryPackage {\nheader \"BasicLibraryPackage-Swift.h\"\nexport *\n}",
>             "MODULEMAP_PATH" : "$(GENERATED_MODULEMAP_DIR)/BasicLibraryPackage.modulemap",
422c487
<             "PRODUCT_BUNDLE_IDENTIFIER" : "BasicLibraryPackage",
---
>             "PRODUCT_BUNDLE_IDENTIFIER" : "basiclibrarypackage.BasicLibraryPackage",
425c490,495
<             "SWIFT_OBJC_INTERFACE_HEADER_DIR" : "$(OBJROOT)/GeneratedModuleMaps/$(PLATFORM_NAME)",
---
>             "SDKROOT" : "auto",
>             "SDK_VARIANT" : "auto",
>             "STRIP_INSTALLED_PRODUCT" : "NO",
>             "SUPPORTS_TEXT_BASED_API" : "NO",
>             "SWIFT_ENABLE_BARE_SLASH_REGEX" : "NO",
>             "SWIFT_OBJC_INTERFACE_HEADER_DIR" : "$(GENERATED_MODULEMAP_DIR)",
426a497
>             "SWIFT_PACKAGE_NAME" : "basiclibrarypackage",
428c499,500
<             "TARGET_NAME" : "BasicLibraryPackage_Module"
---
>             "TAPI_DYLIB_INSTALL_NAME" : "BasicLibraryPackage",
>             "TARGET_NAME" : "BasicLibraryPackage"
430c502
<           "guid" : "PACKAGE-TARGET:BasicLibraryPackage::BUILDCONFIG_Debug",
---
>           "guid" : "PACKAGE-TARGET:BasicLibraryPackage::BUILDCONFIG_0",
432a505,512
>               "FRAMEWORK_SEARCH_PATHS" : [
>                 "$(BUILT_PRODUCTS_DIR)/PackageFrameworks",
>                 "$(inherited)"
>               ],
>               "LD_RUNPATH_SEARCH_PATHS" : [
>                 "$(BUILT_PRODUCTS_DIR)/PackageFrameworks",
>                 "$(inherited)"
>               ],
434,435c514,515
<                 "$(inherited)",
<                 "-fmodule-map-file=$(OBJROOT)/GeneratedModuleMaps/$(PLATFORM_NAME)/BasicLibraryPackage.modulemap"
---
>                 "-fmodule-map-file=$(GENERATED_MODULEMAP_DIR)/BasicLibraryPackage.modulemap",
>                 "$(inherited)"
438,439c518,519
<                 "$(inherited)",
<                 "-Wl,-no_warn_duplicate_libraries"
---
>                 "-Wl,-no_warn_duplicate_libraries",
>                 "$(inherited)"
452a533
>             "EXECUTABLE_NAME" : "BasicLibraryPackage.o",
455,460c536,537
<             "MODULEMAP_FILE_CONTENTS" : "module BasicLibraryPackage {\n    header \"BasicLibraryPackage-Swift.h\"\n    export *\n}",
<             "MODULEMAP_PATH" : "$(OBJROOT)/GeneratedModuleMaps/$(PLATFORM_NAME)/BasicLibraryPackage.modulemap",
<             "OTHER_SWIFT_FLAGS" : [
<               "-package-name",
<               "basiclibrarypackage"
<             ],
---
>             "MODULEMAP_FILE_CONTENTS" : "module BasicLibraryPackage {\nheader \"BasicLibraryPackage-Swift.h\"\nexport *\n}",
>             "MODULEMAP_PATH" : "$(GENERATED_MODULEMAP_DIR)/BasicLibraryPackage.modulemap",
462c539
<             "PRODUCT_BUNDLE_IDENTIFIER" : "BasicLibraryPackage",
---
>             "PRODUCT_BUNDLE_IDENTIFIER" : "basiclibrarypackage.BasicLibraryPackage",
465c542,547
<             "SWIFT_OBJC_INTERFACE_HEADER_DIR" : "$(OBJROOT)/GeneratedModuleMaps/$(PLATFORM_NAME)",
---
>             "SDKROOT" : "auto",
>             "SDK_VARIANT" : "auto",
>             "STRIP_INSTALLED_PRODUCT" : "NO",
>             "SUPPORTS_TEXT_BASED_API" : "NO",
>             "SWIFT_ENABLE_BARE_SLASH_REGEX" : "NO",
>             "SWIFT_OBJC_INTERFACE_HEADER_DIR" : "$(GENERATED_MODULEMAP_DIR)",
466a549
>             "SWIFT_PACKAGE_NAME" : "basiclibrarypackage",
468c551,552
<             "TARGET_NAME" : "BasicLibraryPackage_Module"
---
>             "TAPI_DYLIB_INSTALL_NAME" : "BasicLibraryPackage",
>             "TARGET_NAME" : "BasicLibraryPackage"
470c554
<           "guid" : "PACKAGE-TARGET:BasicLibraryPackage::BUILDCONFIG_Release",
---
>           "guid" : "PACKAGE-TARGET:BasicLibraryPackage::BUILDCONFIG_1",
472a557,560
>               "FRAMEWORK_SEARCH_PATHS" : [
>                 "$(BUILT_PRODUCTS_DIR)/PackageFrameworks",
>                 "$(inherited)"
>               ],
474,475c562,563
<                 "$(inherited)",
<                 "-fmodule-map-file=$(OBJROOT)/GeneratedModuleMaps/$(PLATFORM_NAME)/BasicLibraryPackage.modulemap"
---
>                 "-fmodule-map-file=$(GENERATED_MODULEMAP_DIR)/BasicLibraryPackage.modulemap",
>                 "$(inherited)"
478,479c566,567
<                 "$(inherited)",
<                 "-Wl,-no_warn_duplicate_libraries"
---
>                 "-Wl,-no_warn_duplicate_libraries",
>                 "$(inherited)"
493c581,582
<               "fileReference" : "PACKAGE:/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage::MAINGROUP::REF_1::REF_0",
---
>               "codeSignOnCopy" : "false",
>               "fileReference" : "PACKAGE:basiclibrarypackage::MAINGROUP::REF_3::REF_0",
497c586,587
<               ]
---
>               ],
>               "removeHeadersOnCopy" : "false"
500c590,591
<               "fileReference" : "PACKAGE:/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage::MAINGROUP::REF_1::REF_1",
---
>               "codeSignOnCopy" : "false",
>               "fileReference" : "PACKAGE:basiclibrarypackage::MAINGROUP::REF_3::REF_1",
504c595,596
<               ]
---
>               ],
>               "removeHeadersOnCopy" : "false"
514c606
<       "dependencies" : [
---
>       "customTasks" : [
517,528c609
<       "guid" : "PACKAGE-TARGET:BasicLibraryPackage@11",
<       "impartedBuildProperties" : {
<         "buildSettings" : {
<           "OTHER_CFLAGS" : [
<             "$(inherited)",
<             "-fmodule-map-file=$(OBJROOT)/GeneratedModuleMaps/$(PLATFORM_NAME)/BasicLibraryPackage.modulemap"
<           ],
<           "OTHER_LDFLAGS" : [
<             "$(inherited)",
<             "-Wl,-no_warn_duplicate_libraries"
<           ],
<           "OTHER_LDRFLAGS" : [
---
>       "dependencies" : [
530,532c611,613
<           ]
<         }
<       },
---
>       ],
>       "dynamicTargetVariantGuid" : "PACKAGE-TARGET:BasicLibraryPackage--5ED171FB86F448A-dynamic",
>       "guid" : "PACKAGE-TARGET:BasicLibraryPackage",
536c617
<         "name" : "BasicLibraryPackage_Module.o",
---
>         "name" : "BasicLibraryPackage.o",
542c623
<     "signature" : "4858799caedd0dc4c9843fa82baec7d3b64771bb96ad211a01e25b2b7b9ae579",
---
>     "signature" : "bbe2c78fb059cdfcd4979df0b07aa0ba99c25d869a64e7d69d0d880f05d9fafd",
558c639
<           "guid" : "AGGREGATE::BUILDCONFIG_Debug",
---
>           "guid" : "AGGREGATE::BUILDCONFIG_0",
576c657
<           "guid" : "AGGREGATE::BUILDCONFIG_Release",
---
>           "guid" : "AGGREGATE::BUILDCONFIG_1",
597,598c678,679
<       "guid" : "AGGREGATE@11",
<       "path" : "/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage",
---
>       "guid" : "AGGREGATE",
>       "path" : "/Users/pmattos/Development/SampleProjects/SamplePackages/BasicLibraryPackage/Package.swift",
603,604c684,685
<         "346256297bc55f582c868d1287c57b99d30c037fe76261c84c6e13be56f7a076",
<         "29bba24978016a6273de5ccfc23b8279603425666c0706995438ac8a66da8bcb"
---
>         "60a06dabdde92d0f440e9e4bf701d57a793b4e5714c6f3a0df29f1c679fce584",
>         "7f4e5db8aaa5d3dcb7b2d7c59f16ecd02e4397eb24838e0b8f9ef9720b6006f3"
607c688
<     "signature" : "d9afb6c4d224c848c41a0b8d9750e40ac733b2422acfef81ddc9a16e97f709f9",
---
>     "signature" : "5adb64ced355876f8352c4fbb2c9a0d89210ef6f4aa639c962a26062e07e4ad2",
617c698
<           "guid" : "ALL-EXCLUDING-TESTS::BUILDCONFIG_Debug",
---
>           "guid" : "ALL-EXCLUDING-TESTS::BUILDCONFIG_0",
629c710
<           "guid" : "ALL-EXCLUDING-TESTS::BUILDCONFIG_Release",
---
>           "guid" : "ALL-EXCLUDING-TESTS::BUILDCONFIG_1",
640a722,727
>       "buildRules" : [
> 
>       ],
>       "customTasks" : [
> 
>       ],
643c730,733
<           "guid" : "PACKAGE-PRODUCT:BasicLibraryPackage@11"
---
>           "guid" : "PACKAGE-PRODUCT:BasicLibraryPackage",
>           "platformFilters" : [
> 
>           ]
646,651c736,737
<           "guid" : "PACKAGE-TARGET:BasicLibraryPackage@11"
<         }
<       ],
<       "guid" : "ALL-EXCLUDING-TESTS@11",
<       "impartedBuildProperties" : {
<         "buildSettings" : {
---
>           "guid" : "PACKAGE-TARGET:BasicLibraryPackage",
>           "platformFilters" : [
652a739
>           ]
654c741,742
<       },
---
>       ],
>       "guid" : "ALL-EXCLUDING-TESTS",
658c746
<     "signature" : "346256297bc55f582c868d1287c57b99d30c037fe76261c84c6e13be56f7a076",
---
>     "signature" : "7f4e5db8aaa5d3dcb7b2d7c59f16ecd02e4397eb24838e0b8f9ef9720b6006f3",
668c756
<           "guid" : "ALL-INCLUDING-TESTS::BUILDCONFIG_Debug",
---
>           "guid" : "ALL-INCLUDING-TESTS::BUILDCONFIG_0",
680c768
<           "guid" : "ALL-INCLUDING-TESTS::BUILDCONFIG_Release",
---
>           "guid" : "ALL-INCLUDING-TESTS::BUILDCONFIG_1",
691a780,785
>       "buildRules" : [
> 
>       ],
>       "customTasks" : [
> 
>       ],
694c788,791
<           "guid" : "PACKAGE-PRODUCT:BasicLibraryPackage@11"
---
>           "guid" : "PACKAGE-PRODUCT:BasicLibraryPackageTests",
>           "platformFilters" : [
> 
>           ]
697c794,797
<           "guid" : "PACKAGE-PRODUCT:BasicLibraryPackageTests@11"
---
>           "guid" : "PACKAGE-PRODUCT:BasicLibraryPackage",
>           "platformFilters" : [
> 
>           ]
700,705c800,801
<           "guid" : "PACKAGE-TARGET:BasicLibraryPackage@11"
<         }
<       ],
<       "guid" : "ALL-INCLUDING-TESTS@11",
<       "impartedBuildProperties" : {
<         "buildSettings" : {
---
>           "guid" : "PACKAGE-TARGET:BasicLibraryPackage",
>           "platformFilters" : [
706a803
>           ]
708c805,806
<       },
---
>       ],
>       "guid" : "ALL-INCLUDING-TESTS",
712c810
<     "signature" : "29bba24978016a6273de5ccfc23b8279603425666c0706995438ac8a66da8bcb",
---
>     "signature" : "60a06dabdde92d0f440e9e4bf701d57a793b4e5714c6f3a0df29f1c679fce584",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided to circle back to this in a future PR, as is not breaking any existing tests.

Created issue #8497 to track this. CC @cmcgee1024

@pmattos pmattos marked this pull request as ready for review April 11, 2025 01:05
/// This is used as part of the signature for the high-level PIF objects, to ensure that changes to the PIF schema
/// are represented by the objects which do not use a content-based signature scheme (workspaces and projects,
/// currently).
static let schemaVersion = 11
Copy link
Contributor Author

@pmattos pmattos Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both workspaces and projects use a content-based signature now. See this comment.

}
project.signature = try signature(of: project)
}
workspace.signature = try signature(of: workspace)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Computes signature of high-level PIF objects.

return String(decoding: pifData, as: UTF8.self)
let pifString = String(decoding: pifData, as: UTF8.self)

return pifString
}

/// Constructs a `PIF.TopLevelObject` representing the package graph.
public func construct() throws -> PIF.TopLevelObject {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This the entry point for the PIF generation.

@pmattos
Copy link
Contributor Author

pmattos commented Apr 11, 2025

@swift-ci test

Copy link
Member

@cmcgee1024 cmcgee1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: It's really good to see a large amount of the duplicated PIF builder logic go away in favour of this new one. Also, the detailed logging in the PIF building will no doubt help with problem diagnosis in the future.

I've posted some questions and a blocking issue.

@pmattos
Copy link
Contributor Author

pmattos commented Apr 12, 2025

@swift-ci test

@cmcgee1024 cmcgee1024 self-requested a review April 14, 2025 17:08
@pmattos pmattos force-pushed the pmattos/new-pif-builder-in-SwiftBuildSupport branch from 04e20e5 to db5124f Compare April 16, 2025 23:06
@pmattos
Copy link
Contributor Author

pmattos commented Apr 16, 2025

@swift-ci test

@pmattos
Copy link
Contributor Author

pmattos commented Apr 16, 2025

@swift-ci test self hosted windows

@pmattos
Copy link
Contributor Author

pmattos commented Apr 16, 2025

@swift-ci test windows

1 similar comment
@pmattos
Copy link
Contributor Author

pmattos commented Apr 17, 2025

@swift-ci test windows

@pmattos
Copy link
Contributor Author

pmattos commented Apr 17, 2025

@swift-ci test Linux

@pmattos
Copy link
Contributor Author

pmattos commented Apr 17, 2025

@swift-ci test linux

1 similar comment
@pmattos
Copy link
Contributor Author

pmattos commented Apr 17, 2025

@swift-ci test linux

@pmattos
Copy link
Contributor Author

pmattos commented Apr 17, 2025

@swift-ci test self hosted linux

@pmattos
Copy link
Contributor Author

pmattos commented Apr 17, 2025

@swift-ci test linux

1 similar comment
@pmattos
Copy link
Contributor Author

pmattos commented Apr 17, 2025

@swift-ci test linux

@pmattos pmattos merged commit 393a8f3 into main Apr 17, 2025
7 checks passed
@pmattos pmattos deleted the pmattos/new-pif-builder-in-SwiftBuildSupport branch April 17, 2025 08:03
johnbute pushed a commit to johnbute/fork-swift-package-manager that referenced this pull request Apr 17, 2025
### Motivation:

Switch from the legacy PIF builder in `SwiftBuildSupport` to 
the new one, introduced by PR swiftlang#8405.

The new PIF builder (i.e., `SwiftBuildSupport/PackagePIFBuilder*.swift`)
is the exact same we use in Xcode.

### Modifications:

Replaces the old PIF builder (i.e., `SwiftBuildSupport/PIF.swift` 
and `SwiftBuildSupport/PIFBuilder.swift` ) with the new one 
(i.e., `SwiftBuildSupport/PackagePIFBuilder*.swift`).

### Result:

The new PIF builder now fully replaces the legacy PIF builder.

In particular, all these Swift Build tests are passing (i.e., same as before this PR):

* BuildPlanSwiftBuildTests
* APIDiffSwiftBuildTests
* BuildCommandSwiftBuildTests
* PackageCommandSwiftBuildTests
* RunCommandSwiftBuildTests
* TestCommandSwiftBuildTests

I also improved the PIF logging too. Try the `--very-verbose` option to see what I mean :-)

Tracked by rdar://147527170.
pmattos added a commit that referenced this pull request Apr 23, 2025
…ld system (#8527)

### Motivation:

Increase code coverage for our integration tests.

This is an issue I introduced in #8454 while ignoring 
`--build-system swiftbuild` issues on Windows (i.e., actually this 
specific issue #8514). I accidentally skipped the packageInitExecutable
test for `--build-system native` as well (which should be green).
This PR fixes that.

### Modifications:

Swift Testing currently doesn't support combining *conditional traits*
(e.g.,`skipHostOS(.windows)`) with *parametric tests*. So the 2nd 
best approach is to split the tests as I just did.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants