Re-running the full test suite on every CI run is wasteful and time-consuming. Wouldn’t it be great if you could run tests impacted by your changes? That’s exactly what Tuist’s selective testing aims to solve. However, until now, this feature was reserved only to project generated with Tuist.
Apart from tests, tuist graph now supports non-generated Xcode projects as well We will continue bringing improvements traditionally reserved to generated projects to the whole Swift ecosystem. We couldn’t be more excited about this.
Looks quite cool. I tried this for my main job. I got this unhelpful error:
We received an error that we couldn't handle:
- Localized description: Missing or invalid file path for `PBXBuildFile`: Unknown.
- Error: missingFilePath(name: nil)
With tuist graph I got better logs:
2025-02-20T12:11:13+0800 error dev.tuist.cli : We received an error that we couldn't handle:
- Localized description: The operation couldn’t be completed. (Path.PathValidationError error 1.)
- Error: invalid absolute path '${PODS_ROOT}/Target Support Files/Pods-SomeTestTargetUITests/Pods-SomeTestTargetUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist'
So for our project this doesn’t work as we still have CocoaPods and there’s these variables for PODS_ROOT and CONFIGURATION. I guess this isn’t supported yet. But I wanted to share this as feedback.
Ahh yeah, good shout! xcodebuild will resolve these, but anything running outside of it (like tuist graph) won’t, which is fine since tuist graph doesn’t actually need fully qualified paths.
I think any other commands that don’t go through xcodebuild would need to resolve them themselves first (from build settings / Process.env) if an actual path is required.
I think any other commands that don’t go through xcodebuild would need to resolve them themselves first (from build settings / Process.env) if an actual path is required.
Yes, that’s true. We do try to resolve them when hashing the graph to make the hashes more accurate – on the best effort basis. We could try to resolve paths where possible when mapping as well – but some, like those containing the CONFIGURATION, are by design not statically resolvable as they do depend on the build time configuration.
The root cause was a messy Xcode pbx project file. But as written also on the Tuist website this is quite common for big old projects.
6E3957882C2A72AD00A4B537 /* (null) in Frameworks */,
It would have been helpful to get some message to search in the pbxproj for 6E3957882C2A72AD00A4B537. Then i could have fixed it without debugging Tuist.
Now I’m on to the next error:
We received an error that we couldn't handle:
- Localized description: No platform could be inferred from target 'AdjustSignature'.
- Error: noPlatformInferred("AdjustSignature")
This is a target from pod 'Adjust', '~> 5.0'. The target just contains a xcframework.
The error is because, pbxTarget.productType is nil in let productType = pbxTarget.productType?.mapProductType()
I naively assume this is due to it being a PBXAggregateTarget and not a PBXNativeTarget. So productType doesn’t exist as a key. But I’m not really so deep into pbx.
@kaioelfke the latest Tuist release should include a fix for selective testing of projects with aggregate targets. It’d be great if you could take it for a spin!
Good morning, @marekfort it turns out that this bug only happens when having two targets with Alamofire dependencies and each target having a different platform.
Maybe there’s a more minimal reproduction.
The attached sample is an iOS and tvOS app (and some test targets that Xcode added automatically, but I think they shouldn’t matter).
The podfile is this:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'AlamoSampleTwo' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
platform :tvos, '18.0'
# Pods for AlamoSampleTwo
pod 'Alamofire', '~> 5.3'
target 'AlamoSampleTwoTests' do
inherit! :search_paths
# Pods for testing
end
target 'AlamoSampleTwoUITests' do
# Pods for testing
end
end
target 'AlamoSampleTwoMobile' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
platform :ios, '18.0'
# Pods for AlamoSampleTwo
pod 'Alamofire', '~> 5.3'
target 'AlamoSampleTwoMobileTests' do
inherit! :search_paths
# Pods for testing
end
target 'AlamoSampleTwoMobileUITests' do
# Pods for testing
end
end