Re: [swift-evolution] [Draft] SwiftPM: Adding development package as a dependency

2016-04-01 Thread Ankit Agarwal via swift-evolution
On Fri, Apr 1, 2016 at 10:45 PM, Max Howell  wrote:

> I’m wondering if the dev package should be inside Packages in some manner,
> perhaps as a symlink.
>
> Otherwise when you looks inside Packages you don't see all your
> dependencies.
>

Since as per current design dev packages will only be included if it is in
the `swift build` command I don't think its ever a concrete dependency to
be inside `Packages/` in any way.


> Also since this is related to the lockfile work, I’d like to wait until
> that is done, probably we could use very similar command line UX.
>
> If you don’t mind?
>

Cool.

-- 
Ankit
___
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution


Re: [swift-evolution] [Draft] SwiftPM: Adding development package as a dependency

2016-04-01 Thread Max Howell via swift-evolution
I’m wondering if the dev package should be inside Packages in some manner, 
perhaps as a symlink.

Otherwise when you looks inside Packages you don't see all your dependencies.

Also since this is related to the lockfile work, I’d like to wait until that is 
done, probably we could use very similar command line UX.

If you don’t mind?

I’ll revise the lockfile proposal today and get it moving.

Thanks for all your great work 👍🏻

> If this looks good can we move ahead for review ?

___
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution


Re: [swift-evolution] [Draft] SwiftPM: Adding development package as a dependency

2016-03-31 Thread Ankit Agarwal via swift-evolution
If this looks good can we move ahead for review ?

-- 
Ankit
___
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution


Re: [swift-evolution] [Draft] SwiftPM: Adding development package as a dependency

2016-03-30 Thread Ankit Agarwal via swift-evolution
On Wed, Mar 30, 2016 at 6:05 AM, James Richard  wrote:

> It's be nice to include a bit about how these interact with generated
> Xcodeproj files. In Cocoapods those end up in a separate grouping, which I
> find to be beneficial.
>

It should do the same as it does for other dependencies ie create a target
and group it under "dependencies". If you're thinking about workspaces and
subprojects that is not in the scope of this proposal.


-- 
Ankit
___
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution


Re: [swift-evolution] [Draft] SwiftPM: Adding development package as a dependency

2016-03-29 Thread James Richard via swift-evolution
It's be nice to include a bit about how these interact with generated Xcodeproj 
files. In Cocoapods those end up in a separate grouping, which I find to be 
beneficial.

Sent from my iPhone

> On Mar 29, 2016, at 11:33 AM, Ankit Agarwal via swift-evolution 
>  wrote:
> 
> SwiftPM: Adding development package as a dependency
> Proposal: SE-
> Author(s): Ankit Aggarwal
> Status: Awaiting review
> Review manager: TBD
> Introduction
> 
> I propose to enable SwiftPM to use a package that is still under development 
> as a dependency for another package during testing and development.
> 
> Motivation
> 
> During development of libraries, developers commonly want to try out their 
> module package as a dependency. This emulates the typical library use-case 
> and is currently not possible in SwiftPM without first checking in and 
> tagging that library. These extra steps, while reasonable for an 
> already-built package, are an unnecessary burden for a package that remains 
> in development. 
> 
> Forcing the user to modify the library package inside Packages to continue 
> development or continuously reclone the package after recommiting and 
> retagging strain the process of building the library in the first place.
> 
> Detail Design
> 
> Under this proposal, the root package will be allowed to specify a DevPackage 
> dependency. This dependency will not clone the package inside Packages/ or 
> require the dependency to be under version control. This will free the 
> developer to continue iterative testing, expansion, and enhancements without 
> being tied to the current dependency system.
> 
> This approach limits DevPackage dependencies to local file systems. Remote 
> repositories cannot be used with this keyword. 
> 
> The following example demonstrates what a manifest file would look like. In 
> this example, the DevPackage is specified using a local path and the 
> majorVersion is used as is for this DevPackage.
> 
> import PackageDescription
> 
> let package = Package(
> name: "MyLibraryTester",
> dependencies: [
> .Package(url: 
> "https://github.com/apple/example-package-fisheryates.git";, majorVersion: 1),
> .DevPackage(localPath: "../MyAwesomeLibrary", majorVersion: 1),
> ]
> )
> Under this design:
> 
> DevPackage is limited strictly to the root package. The manifest of any 
> dependency containing a DevPackage will fail to build.
> A DevPackage is not copied inside Packages/ and does not require version 
> control.
> SwiftPM uses the DevPackage's source directory for building, permitting 
> in-place development on the local file system.
> SwiftPM disallows non-local DevPackage sources. To use a remote package, the 
> developer must first clone a package and then specify the local path.
> Version numbers are specified for DevPackage entries within the manifest 
> file. 
> Should the DevPackage version not be selected after resolving the dependency 
> graph, the build will succeed with a warning.
> Impact on existing code
> 
> This proposal does not impact existing code.
> 
> Alternatives considered
> 
> I propose two possible alternatives to this problem:
> 
> Create a executable target within the library package for development testing.
> Use XCTest to test the library.
> Both alternate approaches permit testing a library module but they will not 
> simulate a full SwiftPM package.
> 
> Acknowledgements
> 
> Thanks to Erica Sadun for inputs.
> 
> 
> 
> 
> Github link: 
> https://github.com/aciidb0mb3r/swift-evolution/blob/swiftpm_dev_package/proposals/-swiftpm-development-package-as-dependency.md
> 
> 
> -- 
> Ankit
> 
> 
> 
> ___
> swift-evolution mailing list
> swift-evolution@swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
___
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution


[swift-evolution] [Draft] SwiftPM: Adding development package as a dependency

2016-03-29 Thread Ankit Agarwal via swift-evolution
SwiftPM: Adding development package as a dependency

   - Proposal: SE-
   
   - Author(s): Ankit Aggarwal 
   - Status: *Awaiting review*
   - Review manager: TBD

Introduction

I propose to enable SwiftPM to use a package that is still under
development as a dependency for another package during testing and
development.
Motivation

During development of libraries, developers commonly want to try out their
module package as a dependency. This emulates the typical library use-case
and is currently not possible in SwiftPM without first checking in and
tagging that library. These extra steps, while reasonable for an
already-built package, are an unnecessary burden for a package that remains
in development.

Forcing the user to modify the library package inside Packages to continue
development or continuously reclone the package after recommiting and
retagging strain the process of building the library in the first place.
Detail Design

Under this proposal, the *root* package will be allowed to specify a
DevPackage dependency. This dependency will *not *clone the package inside
Packages/ or require the dependency to be under version control. This will
free the developer to continue iterative testing, expansion, and
enhancements without being tied to the current dependency system.

This approach limits DevPackage dependencies to local file systems. Remote
repositories cannot be used with this keyword.

The following example demonstrates what a manifest file would look like. In
this example, the DevPackage is specified using a local path and the
majorVersion is used as is for this DevPackage.

import PackageDescription
let package = Package(
name: "MyLibraryTester",
dependencies: [
.Package(url:
"https://github.com/apple/example-package-fisheryates.git";,
majorVersion: 1),
.DevPackage(localPath: "../MyAwesomeLibrary", majorVersion: 1),
]
)

Under this design:

   - DevPackage is limited strictly to the root package. The manifest of
   any dependency containing a DevPackage will fail to build.
   - A DevPackage is not copied inside Packages/ and does not require
   version control.
   - SwiftPM uses the DevPackage's source directory for building,
   permitting in-place development on the local file system.
   - SwiftPM disallows non-local DevPackage sources. To use a remote
   package, the developer must first clone a package and then specify the
   local path.
   - Version numbers are specified for DevPackage entries within the
   manifest file.
   - Should the DevPackage version not be selected after resolving the
   dependency graph, the build will succeed with a warning.

Impact on existing code

This proposal does not impact existing code.
Alternatives considered

I propose two possible alternatives to this problem:

   1. Create a executable target within the library package for development
   testing.
   2. Use XCTest to test the library.

Both alternate approaches permit testing a library module but they will not
simulate a full SwiftPM package.
Acknowledgements

Thanks to Erica Sadun  for inputs.




Github link:
https://github.com/aciidb0mb3r/swift-evolution/blob/swiftpm_dev_package/proposals/-swiftpm-development-package-as-dependency.md


-- 
Ankit
___
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution