Test only dependencies

Hello all,

I'd like to start an earnest conversation about test only dependencies for
Swift Package Manager. This was, at one point, part of the original release
plan but at some point it stopped working and was subsequently dropped from
the API[1]. Additionally, some thought seems to have been given to this as a
part of the test naming convention proposal[2].

I'd like to understand more about why this was dropped/stopped working, and
what it would take to get it implemented. I see test-only dependencies as a
_massive_ hole in the current swift package manager functionality, and it's
actively preventing me from adopting `swift test` in most of the libraries I'm
involved in.

[1]: Remove testDependencies from PackageDescription · apple/swift-package-manager@34b7826 · GitHub
[2]: swift-evolution/0129-package-manager-test-naming-conventions.md at master · apple/swift-evolution · GitHub

- Gordon Fontenot

Hi,

It was removed because it stopped working at some point of time during a
refactor (I think?) and then never got fixed. It made sense to remove it
and then bring it back with some discussion/proposal on the list.
I think it should be called "localDependencies" i.e. dependencies that are
local to your package and will not be available to dependent of your
package. Other than naming I think it makes sense to allow pinning and
editing for local dependencies.

···

On Sat, Nov 5, 2016 at 1:04 AM, Gordon Fontenot via swift-build-dev < swift-build-dev@swift.org> wrote:

Hello all,

I'd like to start an earnest conversation about test only dependencies for
Swift Package Manager. This was, at one point, part of the original release
plan but at some point it stopped working and was subsequently dropped from
the API[1]. Additionally, some thought seems to have been given to this as
a
part of the test naming convention proposal[2].

I'd like to understand more about why this was dropped/stopped working, and
what it would take to get it implemented. I see test-only dependencies as a
_massive_ hole in the current swift package manager functionality, and it's
actively preventing me from adopting `swift test` in most of the libraries
I'm
involved in.

[1]: https://github.com/apple/swift-package-manager/commit/
34b7826cb586b0769ea5f60a7718d7de599ce27f
[2]: GitHub - apple/swift-evolution: This maintains proposals for changes and user-visible enhancements to the Swift Programming Language.
proposals/0129-package-manager-test-naming-conventions.md

- Gordon Fontenot

_______________________________________________
swift-build-dev mailing list
swift-build-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-build-dev

--
Ankit

There was an extensive discussion about a more general solution that seems to be dead in the water:

https://lists.swift.org/pipermail/swift-build-dev/Week-of-Mon-20160905/000628.htmlhttps://lists.swift.org/pipermail/swift-build-dev/Week-of-Mon-20160905/000631.html

I’d love to resurrect that thread.

···

On Nov 7, 2016, at 11:03 AM, Ankit Agarwal via swift-build-dev <swift-build-dev@swift.org> wrote:

Hi,

It was removed because it stopped working at some point of time during a refactor (I think?) and then never got fixed. It made sense to remove it and then bring it back with some discussion/proposal on the list.
I think it should be called "localDependencies" i.e. dependencies that are local to your package and will not be available to dependent of your package. Other than naming I think it makes sense to allow pinning and editing for local dependencies.

On Sat, Nov 5, 2016 at 1:04 AM, Gordon Fontenot via swift-build-dev <swift-build-dev@swift.org <mailto:swift-build-dev@swift.org>> wrote:
Hello all,

I'd like to start an earnest conversation about test only dependencies for
Swift Package Manager. This was, at one point, part of the original release
plan but at some point it stopped working and was subsequently dropped from
the API[1]. Additionally, some thought seems to have been given to this as a
part of the test naming convention proposal[2].

I'd like to understand more about why this was dropped/stopped working, and
what it would take to get it implemented. I see test-only dependencies as a
_massive_ hole in the current swift package manager functionality, and it's
actively preventing me from adopting `swift test` in most of the libraries I'm
involved in.

[1]: Remove testDependencies from PackageDescription · apple/swift-package-manager@34b7826 · GitHub
[2]: https://github.com/apple/swift-evolution/blob/master/proposals/0129-package-manager-test-naming-conventions.md

- Gordon Fontenot

_______________________________________________
swift-build-dev mailing list
swift-build-dev@swift.org <mailto:swift-build-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-build-dev

--
Ankit

_______________________________________________
swift-build-dev mailing list
swift-build-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-build-dev

Hello Paul & Gordon,

Yesterday I sent out a draft of a proposal (“Package Manager Product Definitions”) that should help to address this issue, although perhaps in a slightly different way from how it was discussed before.

The basic idea is to add an explicit notion of package products, which, besides more clearly stating the package author’s intent, will also allow subsets of the package’s targets to be vended to clients as products. Individual targets will also be able to declare dependencies on products from other packages. While this does not have a specific testing aspect, it would let product targets and test targets depend on potentially different subsets of a remote packages.

I’d be very interested in hearing your feedback about whether you think this would address your use cases, and if not, if there is a way to improve the proposal.

The proposal can be seen here: https://github.com/abertelrud/swift-evolution/blob/package-manager-product-types/proposals/NNNN-package-manager-product-definitions.md

Kind regards,

Anders

···

On 2016-11-07, at 11.27, Paul Cantrell via swift-build-dev <swift-build-dev@swift.org> wrote:

There was an extensive discussion about a more general solution that seems to be dead in the water:

https://lists.swift.org/pipermail/swift-build-dev/Week-of-Mon-20160905/000628.htmlhttps://lists.swift.org/pipermail/swift-build-dev/Week-of-Mon-20160905/000631.html

I’d love to resurrect that thread.

On Nov 7, 2016, at 11:03 AM, Ankit Agarwal via swift-build-dev <swift-build-dev@swift.org <mailto:swift-build-dev@swift.org>> wrote:

Hi,

It was removed because it stopped working at some point of time during a refactor (I think?) and then never got fixed. It made sense to remove it and then bring it back with some discussion/proposal on the list.
I think it should be called "localDependencies" i.e. dependencies that are local to your package and will not be available to dependent of your package. Other than naming I think it makes sense to allow pinning and editing for local dependencies.

On Sat, Nov 5, 2016 at 1:04 AM, Gordon Fontenot via swift-build-dev <swift-build-dev@swift.org <mailto:swift-build-dev@swift.org>> wrote:
Hello all,

I'd like to start an earnest conversation about test only dependencies for
Swift Package Manager. This was, at one point, part of the original release
plan but at some point it stopped working and was subsequently dropped from
the API[1]. Additionally, some thought seems to have been given to this as a
part of the test naming convention proposal[2].

I'd like to understand more about why this was dropped/stopped working, and
what it would take to get it implemented. I see test-only dependencies as a
_massive_ hole in the current swift package manager functionality, and it's
actively preventing me from adopting `swift test` in most of the libraries I'm
involved in.

[1]: Remove testDependencies from PackageDescription · apple/swift-package-manager@34b7826 · GitHub
[2]: https://github.com/apple/swift-evolution/blob/master/proposals/0129-package-manager-test-naming-conventions.md

- Gordon Fontenot

_______________________________________________
swift-build-dev mailing list
swift-build-dev@swift.org <mailto:swift-build-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-build-dev

--
Ankit

_______________________________________________
swift-build-dev mailing list
swift-build-dev@swift.org <mailto:swift-build-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-build-dev

_______________________________________________
swift-build-dev mailing list
swift-build-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-build-dev