Hive
fix(cli): Implicit imports with SPM binary deps
GitHub issue · Closed
What changed
- Updated
tuist inspect dependenciesso implicit dependency detection includes importable modules exposed by precompiled graph dependencies, especially SPM binary targets backed by.xcframeworkartifacts. - Added regression tests for:
- reporting an implicit import of an XCFramework module from an SPM-style external package graph
- treating a directly declared XCFramework dependency as explicit and reachable for
canImport
Why
tuist inspect dependencies --only implicit only compared source imports against target product names. SwiftPM binary targets backed by XCFrameworks are represented as precompiled graph dependencies, not Target nodes, so their module names were absent from the known module set. As a result, imports from those binaries could be missed.
Solution
The inspect linter now derives module names from non-target graph dependencies, including XCFramework Info.plist library binary names, and uses that module set for both implicit dependency detection and canImport reachability.
Impact
Projects using Swift Package dependencies with XCFramework binary targets now get accurate implicit dependency reports when source imports those binary modules without declaring the required dependency path.
The fix for implicit imports with SPM binary dependencies is now available in 4.201.0-canary.12. The inspect linter now derives module names from non-target graph dependencies, including XCFramework Info.plist library binary names, so implicit dependency detection now works correctly for imports from SwiftPM binary targets. Update to this version to get the fix.
The fix for implicit imports with SPM binary dependencies is now available in 4.201.0-canary.11. The inspect linter now derives module names from non-target graph dependencies, including XCFramework Info.plist library binary names, providing accurate implicit dependency reports when source imports those binary modules.
Update to 4.201.0-canary.11 to use this fix.
The fix for implicit imports with SPM binary dependencies is now available in 4.201.0-canary.15. The inspect linter now derives module names from non-target graph dependencies, including XCFramework Info.plist library binary names, for accurate implicit dependency detection. Update to this version to use the fix.