Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftPM : Resolve apparent version incompatibility with swift-snapshot-testing #202

Closed
1 task done
ghost opened this issue Feb 26, 2020 · 4 comments
Closed
1 task done

Comments

@ghost
Copy link

ghost commented Feb 26, 2020

  • I've searched other open/closed issues for duplicates before opening up this new issue.

Report

What did you do?

  1. I cloned the Down repository.
  2. From the root of the directory of this cloned repository, I opened the workspace by issuing this command: xed .
  3. I attempted to build the project.

What did you expect to happen?

For an iOS device target, I expected the library to build (Cmd-B) and/or test (Cmd-U) successfully.

What happened instead?

The Build attempt failed, with the following error:

No such module 'SnapshotTesting'

This impacts both StylerTestSuite.swift & VisitorTests, which include:

import SnapshotTesting

Additional context

  • The preceding steps do work if I execute them against a branch created from the previous tag (i.e., v0.8.6).
  • It appears that the SnapshotTesting dependency was recently introduced.
  • I intended to submit a pull request proposing changes to Package.swift that account for this dependency, but incompatibilities exist between the minimum required deployment targets of each component (see below).
Platform Down SnapshotTesting
iOS 9.0 10.0
macOS 10.11 10.10
tvOS 9.0 10.0

Questions

  1. This was surfaced in [Testing] Adding a snapshot testing framework #165, but the impact to SwiftPM support might not have been considered at that time. Does the value of these snapshot tests justify upgrades to the minimum deployment target for iOS & tvOS?
  2. Is it there a more limited scope with which the package dependency can be imported in Package.swift?
@ghost ghost changed the title SwiftPM : Reconcile apparent version incompatibility with swift-snapshot-testing SwiftPM : Resolve apparent version incompatibility with swift-snapshot-testing Feb 27, 2020
@iwasrobbed
Copy link
Collaborator

@stevebaranski I'd be okay with bumping support to iOS 10+ and will happily accept any PRs against that if you have the time to test and make sure it resolves it for you. Anyone needing support for earlier OS versions can easily do so

@iwasrobbed
Copy link
Collaborator

Thanks for the very detailed issue by the way, it's refreshing 💯

@ghost
Copy link
Author

ghost commented Feb 28, 2020

@iwasrobbed Upon further investigation, I noted that some of the files specified in the testTarget of Package.swift included those that imported SnapshotTesting. Excluding those files appeased SwiftPM, without requiring an update to the minimum deployment targets.

I expressed #203 for your consideration.

Thanks for the very detailed issue by the way

No problem - thanks for your continued stewardship of Down!

@iwasrobbed
Copy link
Collaborator

Closed via #203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant