-
Notifications
You must be signed in to change notification settings - Fork 46
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
Skip plugin should report error when the target has no transitive skip dependencies #154
Comments
I'm not 100% sure, but I suspect that you need to have at least one Skip dependency for Model. Typically, you will depend at least on So try changing: .target(name: "Model", dependencies: [], resources: [.process("Resources")], plugins: skipstone), to: .target(name: "Model", dependencies: [.product(name: "SkipFoundation", package: "skip-foundation")], resources: [.process("Resources")], plugins: skipstone), And then re-build the project. If that doesn't help, let us know and we will keep digging. |
Thanks for reply, yes adding the dependency on The |
Running:
gives me: import PackageDescription
let package = Package(
name: "sample-module",
defaultLocalization: "en",
platforms: [.iOS(.v16), .macOS(.v13), .tvOS(.v16), .watchOS(.v9), .macCatalyst(.v16)],
products: [
.library(name: "DataStore", targets: ["DataStore"]),
.library(name: "Model", targets: ["Model"]),
.library(name: "API", targets: ["API"]),
],
dependencies: [
.package(url: "https://source.skip.tools/skip.git", from: "0.8.55"),
.package(url: "https://source.skip.tools/skip-foundation.git", from: "0.0.0")
],
targets: [
.target(name: "DataStore", dependencies: ["Model"], plugins: [.plugin(name: "skipstone", package: "skip")]),
.target(name: "Model", dependencies: ["API"], plugins: [.plugin(name: "skipstone", package: "skip")]),
.target(name: "API", dependencies: [.product(name: "SkipFoundation", package: "skip-foundation")], plugins: [.plugin(name: "skipstone", package: "skip")]),
]
)
Did you perchance remove the dependency of |
So only the last module of the three has a dependency on |
In the example above, the first two modules have a transitive dependency on If your |
The original generated code was buildable, it broke when I changed the dependencies such that not all had a transitive dependency on SkipFoundation. So not a bug 👍. |
Thanks for the info. This is something that we should be able to detect and report a nicer error message like: "Skipstone plugin requires at least one transitive dependency on a Skip module". I'll update the issue report title to that effect. |
I have been trying out skip on a small a modular project that's started giving a gradle error. It started when I added a dependency on Model to the API and DataStore modules. The Package.swift parses and the iOS build phase completes successfully I don't think there's anything wrong with the Package.swift (below). I've tried clean and rebuild, reset packages etc.
Any ideas or pointers? Thanks!
The error transcript is:
Package.swift
The text was updated successfully, but these errors were encountered: