Skip to content

Conversation

@DougGregor
Copy link
Member

Introduce support for adding a new product to the package manifest,
both programmatically (via PackageModelSyntax) and via the
swift package add-product command. Help for this command is:

OVERVIEW: Add a new product to the manifest

USAGE: swift package add-product <name> [--type <type>] [--targets <targets> ...] [--url <url>] [--path <path>] [--checksum <checksum>]

ARGUMENTS:
  <name>                  The name of the new product

OPTIONS:
  --type <type>           The type of target to add, which can be one of
                          'executable', 'library', 'static-library',
                          'dynamic-library', or 'plugin' (default: library)
  --targets <targets>     A list of targets that are part of this product
  --url <url>             The URL for a remote binary target
  --path <path>           The path to a local binary target
  --checksum <checksum>   The checksum for a remote binary target
  --version               Show the version.
  -h, -help, --help       Show help information.

@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor force-pushed the se-0301-package-add-product branch from 77fa066 to cf9142f Compare April 22, 2024 19:27
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test Windows

Introduce support for adding a new product to the package manifest,
both programmatically (via PackageModelSyntax) and via the
`swift package add-product` command. Help for this command is:

    OVERVIEW: Add a new product to the manifest

    USAGE: swift package add-product <name> [--type <type>] [--targets <targets> ...] [--url <url>] [--path <path>] [--checksum <checksum>]

    ARGUMENTS:
      <name>                  The name of the new product

    OPTIONS:
      --type <type>           The type of target to add, which can be one of
                              'executable', 'library', 'static-library',
                              'dynamic-library', or 'plugin' (default: library)
      --targets <targets>     A list of targets that are part of this product
      --url <url>             The URL for a remote binary target
      --path <path>           The path to a local binary target
      --checksum <checksum>   The checksum for a remote binary target
      --version               Show the version.
      -h, -help, --help       Show help information.
@DougGregor DougGregor force-pushed the se-0301-package-add-product branch from cf9142f to 7a9ba7a Compare April 23, 2024 04:11
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor enabled auto-merge (squash) April 23, 2024 04:11
@DougGregor
Copy link
Member Author

@swift-ci please test Windows

@DougGregor DougGregor merged commit a408054 into swiftlang:main Apr 23, 2024
@DougGregor DougGregor deleted the se-0301-package-add-product branch April 23, 2024 14:37
DougGregor added a commit to DougGregor/swift-package-manager that referenced this pull request Apr 24, 2024
swiftlang#7477)

Introduce support for adding a new product to the package manifest,
both programmatically (via PackageModelSyntax) and via the
`swift package add-product` command. Help for this command is:

    OVERVIEW: Add a new product to the manifest

USAGE: swift package add-product <name> [--type <type>] [--targets
<targets> ...] [--url <url>] [--path <path>] [--checksum <checksum>]

    ARGUMENTS:
      <name>                  The name of the new product

    OPTIONS:
--type <type> The type of target to add, which can be one of
                              'executable', 'library', 'static-library',
'dynamic-library', or 'plugin' (default: library)
--targets <targets> A list of targets that are part of this product
      --url <url>             The URL for a remote binary target
      --path <path>           The path to a local binary target
      --checksum <checksum>   The checksum for a remote binary target
      --version               Show the version.
      -h, -help, --help       Show help information.

(cherry picked from commit a408054)
DougGregor added a commit that referenced this pull request Apr 25, 2024
#7494)

* **Explanation**: Implement package manifest editing commands (`swift
package add-dependency`, `swift package add-target`, `swift package
add-product`) described in
[SE-0301](https://github.com/apple/swift-evolution/blob/main/proposals/0301-package-editing-commands.md),
using swift-syntax under the hood to perform the edits.
* **Original PR**:
#7467,
#7476,
#7477
* **Risk**: Very low. All new code for new commands.
* **Reviewed by**: @ahoppen , @bnbarham , @owenv , @MaxDesiatov 
* **Testing**: New tests.

---------

Co-authored-by: Rintaro Ishizaki <[email protected]>
Co-authored-by: Saleem Abdulrasool <[email protected]>
furby-tm pushed a commit to wabiverse/swift-package-manager that referenced this pull request May 15, 2024
swiftlang#7477)

Introduce support for adding a new product to the package manifest,
both programmatically (via PackageModelSyntax) and via the
`swift package add-product` command. Help for this command is:

    OVERVIEW: Add a new product to the manifest

USAGE: swift package add-product <name> [--type <type>] [--targets
<targets> ...] [--url <url>] [--path <path>] [--checksum <checksum>]

    ARGUMENTS:
      <name>                  The name of the new product

    OPTIONS:
--type <type> The type of target to add, which can be one of
                              'executable', 'library', 'static-library',
'dynamic-library', or 'plugin' (default: library)
--targets <targets> A list of targets that are part of this product
      --url <url>             The URL for a remote binary target
      --path <path>           The path to a local binary target
      --checksum <checksum>   The checksum for a remote binary target
      --version               Show the version.
      -h, -help, --help       Show help information.
furby-tm pushed a commit to wabiverse/swift-package-manager that referenced this pull request May 15, 2024
swiftlang#7477)

Introduce support for adding a new product to the package manifest,
both programmatically (via PackageModelSyntax) and via the
`swift package add-product` command. Help for this command is:

    OVERVIEW: Add a new product to the manifest

USAGE: swift package add-product <name> [--type <type>] [--targets
<targets> ...] [--url <url>] [--path <path>] [--checksum <checksum>]

    ARGUMENTS:
      <name>                  The name of the new product

    OPTIONS:
--type <type> The type of target to add, which can be one of
                              'executable', 'library', 'static-library',
'dynamic-library', or 'plugin' (default: library)
--targets <targets> A list of targets that are part of this product
      --url <url>             The URL for a remote binary target
      --path <path>           The path to a local binary target
      --checksum <checksum>   The checksum for a remote binary target
      --version               Show the version.
      -h, -help, --help       Show help information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants