How to depend on a specified Pre-release version of package with the Swift Package Manager


#1

Hi, I'm JPMartha.

I had filed an issue of the Swift Package Manager first.
But, I should have heard your feedback on my opinion beforehand.

Please see the following:
https://bugs.swift.org/browse/SR-965

I think it's unexpected behavior.
I'm curious to hear your feedback!

Best regards,
JPMartha


(Kostiantyn Koval) #2

Hi JPMartha,

I think it should be possible to specify a dependency package with a specific pre-release identifier in Manifest and swiftpm should fetch that exact version.
Example:
Package(url: ""https://github.com/ikesyo/Himotoki.git",
  versions: Version(1, 0, 0, prereleaseIdentifiers: “beta.1”)

The swiftPM should fetch a package with v-1.0.0-beta-1 tag

···

On 21 Mar 2016, at 06:43, Martha JP via swift-build-dev <swift-build-dev@swift.org> wrote:

Hi, I'm JPMartha.

I had filed an issue of the Swift Package Manager first.
But, I should have heard your feedback on my opinion beforehand.

Please see the following:
https://bugs.swift.org/browse/SR-965

I think it's unexpected behavior.
I'm curious to hear your feedback!

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


(Max Howell) #3

Strictly, we don’t really want people specifying such exact version requirements in Package.swift, since it would be easy to forget and then be trapped on a single version forever despite updates being available.

The lockfile proposal is more for this kind of restriction, but this is not yet implemented (or approved).

However Kostiantyn’s suggestion should work, though you’ll need to specify it as an inclusive range of the provided Version() twice.

···

On Mar 21, 2016, at 2:36 AM, Kostiantyn Koval via swift-build-dev <swift-build-dev@swift.org> wrote:

Hi JPMartha,

I think it should be possible to specify a dependency package with a specific pre-release identifier in Manifest and swiftpm should fetch that exact version.
Example:
Package(url: ""https://github.com/ikesyo/Himotoki.git <http://github.com/ikesyo/Himotoki.git>",
  versions: Version(1, 0, 0, prereleaseIdentifiers: “beta.1”)

The swiftPM should fetch a package with v-1.0.0-beta-1 tag

On 21 Mar 2016, at 06:43, Martha JP via swift-build-dev <swift-build-dev@swift.org <mailto:swift-build-dev@swift.org>> wrote:

Hi, I'm JPMartha.

I had filed an issue of the Swift Package Manager first.
But, I should have heard your feedback on my opinion beforehand.

Please see the following:
https://bugs.swift.org/browse/SR-965

I think it's unexpected behavior.
I'm curious to hear your feedback!

Best regards,
JPMartha
_______________________________________________
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