Skip to content

[6.0] Add swift package add-target-dependency command to edit the manifest #7628

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

Conversation

DougGregor
Copy link
Member

Explanation: Building on SE-0301, add a new command swift package add-target-dependency to edit the package manifest and add a new dependency to a given target.
Original PR: #7594
Risk: Low. New, very simple code path to edit the package manifest in a narrow way.
Reviewed by: @MaxDesiatov

swiftlang#7594)

Introduce a command to add a new dependency to a target in the manifest
file, exposing the newly-added API to the command line. Here's the help
output:

    OVERVIEW: Add a new target dependency to the manifest

USAGE: swift package add-target-dependency <dependency-name>
<target-name> [--package <package>]

    ARGUMENTS:
      <dependency-name>       The name of the new dependency
      <target-name>           The name of the target to update

    OPTIONS:
--package <package> The package in which the dependency resides
      --version               Show the version.
      -h, -help, --help       Show help information.

(cherry picked from commit 15ac439)
@DougGregor
Copy link
Member Author

@swift-ci please test

@MaxDesiatov MaxDesiatov changed the title Add swift package add-target-dependency command to edit the manifest [6.0] Add swift package add-target-dependency command to edit the manifest Jun 4, 2024
@MaxDesiatov MaxDesiatov added swift 6.0 Related to Swift 6.0 release branch package manifests changes to package manifest APIs enhancement command-line interface labels Jun 4, 2024
@bnbarham bnbarham self-requested a review June 4, 2024 18:50
@DougGregor DougGregor merged commit b48dd91 into swiftlang:release/6.0 Jun 4, 2024
5 checks passed
@DougGregor DougGregor deleted the package-add-target-dependency-6.0 branch June 4, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command-line interface enhancement package manifests changes to package manifest APIs swift 6.0 Related to Swift 6.0 release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants