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

[SPM] Fail to compile using SnapshotPreviews-iOS package #6162

Open
NachoSoto opened this issue Apr 9, 2024 · 2 comments
Open

[SPM] Fail to compile using SnapshotPreviews-iOS package #6162

NachoSoto opened this issue Apr 9, 2024 · 2 comments
Labels
type:bug Something isn't working

Comments

@NachoSoto
Copy link

What happened?

Something about the setup with assets inside of https://github.com/EmergeTools/SnapshotPreviews-iOS makes Tuist break when using this dependency.

How do we reproduce it?

Create a project with this dependency:

Package.swift

let package = Package(
  name: "Package",
  platforms: [
    .iOS(.v16)
  ],
  products: [
   ...
  ],
  dependencies: [
    .package(
      url: "https://github.com/EmergeTools/SnapshotPreviews-iOS.git",
      from: "0.4.3")
  ],
  targets: [
    .target(
      name: "Target",
      dependencies: [
        .product(
              name: "SnapshotPreferences",
              package: "SnapshotPreviews-iOS",
              condition: .when(platforms: [.macOS, .iOS])),
      ]
    )
  ]
)

Run tuist install && tuist generate

Error log

CpResource /.../SnapshotPreviewsCore/AccessibilitySnapshot_AccessibilitySnapshotCore.bundle (in target 'SnapshotPreviewsCore' from project 'SnapshotPreviews')
    cd ~/dev/other/tuist-test-2/Tuist/.build/tuist-derived/SnapshotPreviews
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks ~/Library/Developer/Xcode/DerivedData/TuistTest2-flktmizkeotxqhclejqianiwswwq/Build/Products/Debug-iphonesimulator/SnapshotPreviewsCore/AccessibilitySnapshot_AccessibilitySnapshotCore.bundle ~/Library/Developer/Xcode/DerivedData/TuistTest2-flktmizkeotxqhclejqianiwswwq/Build/Products/Debug-iphonesimulator/SnapshotPreviewsCore/SnapshotPreviewsCore.framework

error: ~/Library/Developer/Xcode/DerivedData/TuistTest2-flktmizkeotxqhclejqianiwswwq/Build/Products/Debug-iphonesimulator/SnapshotPreviewsCore/AccessibilitySnapshot_AccessibilitySnapshotCore.bundle: No such file or directory (in target 'SnapshotPreviewsCore' from project 'SnapshotPreviews')

macOS version

14.4.1

Tuist version

4.9.0

Xcode version

15.2.0

@NachoSoto NachoSoto added the type:bug Something isn't working label Apr 9, 2024
@NachoSoto
Copy link
Author

Looks like this is because of #5808.

@fortmarek
Copy link
Member

Looks like this is because of #5808.

Are you using enforceExplicitDependencies? As that option is only opt-in. Again, an actual reproducible sample would be helpful, I'm not able to reproduce based on your steps 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants