Resolves N/A
Adds support for SwiftPM prebuilts entries in workspace-state.json, which SwiftPM now uses for precompiled SwiftSyntax macro support libraries. Macro and plugin dependency paths can now consume SwiftPM’s prebuilt MacroSupport library, while regular runtime dependencies on SwiftSyntax continue to use source or cached framework targets.
- Decode SwiftPM prebuilt metadata and forward it into external package mapping.
- Replace eligible macro/plugin product dependencies with the prebuilt include, library search, and linker settings SwiftPM expects.
- Keep non-host dependencies on source targets so runtime SwiftSyntax products are not accidentally substituted by macro-only prebuilts.
- Add focused mapper and graph-loader tests for prebuilt forwarding, macro substitution, and runtime dependency preservation.
How to test locally
swiftformat cli/Sources/TuistLoader/SwiftPackageManager/PackageInfoMapper.swift cli/Sources/TuistLoader/Loaders/SwiftPackageManagerGraphLoader.swift cli/Sources/TuistLoader/Models/SwiftPackageManagerWorkspaceState.swift cli/Sources/TuistLoader/Models/SwiftPackageManagerPrebuilt.swift cli/Tests/TuistLoaderTests/Loaders/SwiftPackageManagerGraphLoaderTests.swift cli/Tests/TuistLoaderTests/SwiftPackageManager/PackageInfoMapperTests.swift
xcodebuild test -workspace Tuist.xcworkspace -scheme TuistUnitTests -only-testing TuistLoaderTests/PackageInfoMapperTests/map_whenMacroTargetDependsOnPrebuiltProduct_usesPrebuiltSettings -only-testing TuistLoaderTests/PackageInfoMapperTests/map_whenRegularTargetDependsOnPrebuiltProduct_keepsSourceDependency -only-testing TuistLoaderTests/SwiftPackageManagerGraphLoaderTests/load_whenWorkspaceStateContainsPrebuilts_passesPackagePrebuiltsToMapper CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
TUIST_EE=1 .build/arm64-apple-macosx/debug/tuist generate tuist ProjectDescription --no-open
TUIST_EE=1 xcodebuild build -workspace Tuist.xcworkspace -scheme tuist -configuration Debug SYMROOT=/tmp/tuist-ee-products CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
- In
~/Downloads/precompiled/MacroApp: /tmp/tuist-ee-products/Debug/tuist install, /tmp/tuist-ee-products/Debug/tuist cache warm --cache-profile all-possible, /tmp/tuist-ee-products/Debug/tuist generate --cache-profile all-possible --no-open, and xcodebuild build -workspace MacroApp.xcworkspace -scheme App -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
- In
~/Downloads/precompiled/RuntimeSwiftSyntax: /tmp/tuist-ee-products/Debug/tuist install, /tmp/tuist-ee-products/Debug/tuist cache warm --cache-profile all-possible, /tmp/tuist-ee-products/Debug/tuist generate --cache-profile only-external --no-open, and xcodebuild build -workspace RuntimeSwiftSyntax.xcworkspace -scheme RuntimeSwiftSyntax -destination 'generic/platform=macOS' CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
git diff --check