XcodeSelectiveTesting icon indicating copy to clipboard operation
XcodeSelectiveTesting copied to clipboard

Take into account changes in Package.resolved

Open Ernest0-Production opened this issue 7 months ago • 2 comments

We use Tuist and Package.swift to install external dependencies. When we update a dependency, the Package.resolved file is updated.

It seems reasonable to consider changing this file so that selective caching works correctly.

The Tuist/.build directory is usually in .gitignore, so git diff will not be able to detect it.

Ernest0-Production avatar May 05 '25 13:05 Ernest0-Production

Hey @Ernest0-Production ,

thanks for the issue.

Let me check if I understand it correctly. You have a repository that contains a package:

  • This package has external dependencies.
  • This package has Pacakge.resolved checked into the repository

Then, when the test job is executed, Package.resolved might change due to a new version of an external package being used.

Your expectation is that the tool would mark all targets in the given package as changed.

Does it accurately reflect the idea/issue you have?

mikeger avatar May 05 '25 14:05 mikeger

Yes, that's right.

I will also add notes that this problem occur with a dependency that was supplied as xcframework. (binaryTarget)

Ernest0-Production avatar May 05 '25 14:05 Ernest0-Production

@Ernest0-Production can you check the version from this branch, if it matches the expectation? https://github.com/mikeger/XcodeSelectiveTesting/compare/50-package-resolved-to-affect-targets?expand=1

mikeger avatar May 06 '25 08:05 mikeger

@mikeger Hi! Thanks, this seems to be what we need. We are waiting for this to be merged)

Ernest0-Production avatar May 12 '25 08:05 Ernest0-Production

Please check the next release: https://github.com/mikeger/XcodeSelectiveTesting/releases/tag/0.12.3

mikeger avatar May 12 '25 08:05 mikeger