You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't get the Mobius package from https://github.com/spotify/Mobius.swift to work correctly as a dependency. I have attached an example SPM package that has it as a dependency. The repo name is "Mobius.swift" but the Package.swift has name "Mobius".
letpackage = Package(
name: "Test",
products: [
.executable(name: "test", targets: ["TestApp"])
],
dependencies: [
.package(url: "https://github.com/spotify/Mobius.swift.git", .branch("master"))
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "Test",
dependencies: [
.product(name: "MobiusCore", package: "Mobius"),
.product(name: "MobiusExtras", package: "Mobius")
]
),
.target(
name: "TestApp", dependencies: ["Test"]
)
]
)
It seems like SPM is correctly using `Mobius` as the name of the dependency in the `update` step but in `generate-xcodeproj` it gets a different name. Is it possible due to the fact that the repo name has a dot in it but the module name is different? This used to work before introducing the new syntax `.product(name: "MobiusExtras", package: "Mobius")` for specifying dependencies.
Attachment: Download
Additional Detail from JIRA
md5: 0228638d59c746fbca2ae4455d878519
Issue Description:
I can't get the Mobius package from https://github.com/spotify/Mobius.swift to work correctly as a dependency. I have attached an example SPM package that has it as a dependency. The repo name is "Mobius.swift" but the Package.swift has name "Mobius".
Running `swift package update` fails with:
So I tried changing the name to be "Mobius.swift".
Running `swift package update` succeeds but `swift package generate-xcodeproj` fails with:
It seems like SPM is correctly using `Mobius` as the name of the dependency in the `update` step but in `generate-xcodeproj` it gets a different name. Is it possible due to the fact that the repo name has a dot in it but the module name is different? This used to work before introducing the new syntax `.product(name: "MobiusExtras", package: "Mobius")` for specifying dependencies.
Changing the Package name to be `Mobius.swift` fixes the issue, but this is a breaking change for us and not something we want to do (https://github.com/spotify/Mobius.swift/compare/swift-5.2).
The text was updated successfully, but these errors were encountered: