Our iOS project uses combine-schedulers and this doesn’t cause issue on XCode 26 as OpenCombine is just ignored and doesn’t appear in package.resolved
However the problem occurs on our CI where the flag disableAutomaticPackageResolution is set. Apparently SPM gets confused, somehow thinks OpenCombine is necessary and complains about its absence in the package.resolved. The error :
Could not resolve package dependencies: an out-of-date resolved file was detected at
/Volumes/workspace/repository/App.xcworkspace/xcshareddata/swiftpm/Package.resolved,
which is not allowed when automatic dependency resolution is disabled;
please make sure to update the file to reflect the changes in dependencies.
Running resolver because the following dependencies were added: 'opencombine' (https://github.com/OpenCombine/OpenCombine.git)
As a workaround we can add OpenCombine directly in our iOS project dependencies but this is a shame as we don’t use it.
Had similar problem with Swift 6.2.0 and traits, after installing Swift 6.2.3 and running swift package resolve, it added the dependency to the resolved file for me. After the resolved file is fixed, the project should build fine with other Swift versions.
Having the trait is totally useless in this project. swift build --disable-default-traits fails on Linux, the trait doesn't affect anything else on other platforms. So my advice would be to just remove the trait from the project.
I’m not the one maintaining the combine-schedulers lib and I’m not familiar with how traits work. But this remark may be interesting to @stephencelis or @mbrandonw ^^
Sadly it does not appear to be "totally useless." In practice the trait gates the OpenCombine dependency from being downloaded and shown in Xcode's sidebar. Eliminating the trait and simply depending on the .when platforms list does not appear to be enough.
We may be exploiting an Xcode/SPM bug/quirk, but the iOS community is generally averse to too many dependencies, and so we're trying to minimize the footprint on Apple platforms.