Skip to content

Accio isn't compatible with certain Package.swift formats #79

@fredpi

Description

@fredpi

Just recently, Nimble released a new version that references a framework with the following Package.swift: https://github.com/mattgallagher/CwlPreconditionTesting/blob/master/Package.swift

It contains the following: (Note the use of .target(name: "CwlMachBadInstructionHandler") instead of just "CwlMachBadInstructionHandler")

.target(
    name: "CwlPreconditionTesting",
    dependencies: [
	.target(name: "CwlMachBadInstructionHandler"),
	.product(name: "CwlCatchException")
    ]
),

that results in the following json: (when using swift package dump-package)

"dependencies" : [
    {
      "target" : [
        "CwlMachBadInstructionHandler"
      ]
    },
    {
      "product" : [
        "CwlCatchException",
        null
      ]
    }
],

where Accio expects: (Note the difference: byName instead of target / product)

"dependencies" : [
    {
      "byName" : [
        "CwlMachBadInstructionHandler"
      ]
    },
    {
      "byName" : [
        "CwlCatchException",
        null
      ]
    }
],

Accio should be able to also handle such Package.swift configurations. As Nimble is widely used, also as a sub-dependency of popular frameworks like Moya, this should be fixed as soon as possible.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions