Skip to content

Swift package add-dependency command doesn't update all Package.swift files #9248

@cmcgee1024

Description

@cmcgee1024

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.

Description

There can be multiple Package.swift files targeting different toolchain version ranges. For example, a file named [email protected] will be used with a 5.8 or newer toolchain.

When running swift package add-dependency <url> --from <x.y.z> SwiftPM only updates the Package.swift file, and not any of the other ones. Try this with the swift-argument-parser package as an example.

Expected behavior

This command should update all available Package.swift files, or produce errors/warnings on the ones that it could not update.

Actual behavior

No response

Steps to reproduce

No response

Swift Package Manager version/commit hash

No response

Swift & OS version (output of swift --version ; uname -a)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions