Closed paulrolfe closed 7 years ago
Tested on Xcode 9 as well?
@tzm41 No, this is an update using swift 3. Swift 4 conversion can happen later -- this particular change is needed in a swift 3 project.
@paulrolfe We have already updated Swift Wisdom to support Swift 3.2 / Xcode 9: https://github.com/IntrepidPursuits/swift-wisdom/pull/140. And for example BMAP Swift 3.2 will be dependent on Swift Wisdom being Xcode 9 compatible. Just want to make sure that this PR doesn't break Xcode 9 compatibility.
@tzm41 Ah, understood. Didn't realize we were in 3.2 already.
@tzm41 Confirmed that it works in Xcode9. ✅
@paulrolfe awesome! Thanks for checking!
4 Warnings | |
---|---|
:warning: | Array+UtilitiesTests.swift#L100 - SwiftWisdomTests/StandardLibrary/Array/Array+UtilitiesTests.swift#L100: ‘subscript(ip_safe:)’ is deprecated: Use ip_safely instead.
XCTAssert(testArray[ip_safe: 3] == 4)
|
:warning: | Array+UtilitiesTests.swift#L101 - SwiftWisdomTests/StandardLibrary/Array/Array+UtilitiesTests.swift#L101: ‘subscript(ip_safe:)’ is deprecated: Use ip_safely instead.
XCTAssert(testArray[ip_safe: 8] == 9)
|
:warning: | Array+UtilitiesTests.swift#L102 - SwiftWisdomTests/StandardLibrary/Array/Array+UtilitiesTests.swift#L102: ‘subscript(ip_safe:)’ is deprecated: Use ip_safely instead.
XCTAssertNil(testArray[ip_safe: -1])
|
:warning: | Array+UtilitiesTests.swift#L103 - SwiftWisdomTests/StandardLibrary/Array/Array+UtilitiesTests.swift#L103: ‘subscript(ip_safe:)’ is deprecated: Use ip_safely instead.
XCTAssertNil(testArray[ip_safe: 9])
|
1 Message | |
---|---|
:book: | Executed 167 tests, with 0 failures (0 unexpected) in 0.605 (0.688) seconds |
Generated by :no_entry_sign: Danger
Summary Making the Version type act more like semver.org recommends. While leaving some wiggle room for some common mistakes when it comes to versioning. The typical errors you might see which we would allow here are:
1.2.04
should be permitted but translated to it's more correct format:1.2.4
preRelease
andmetaData
1.2.3.4
would still intialize, but it would become1.2.3
See http://semver.org for reference.
Why this is needed With the old implementation the following issues arose:
1.2.3-beta+abcdef
would have returned a nil version.What other changes were made
ip_suffix(from: String)
andip_prefix(upTo: String)
methods addedmetaData
should not factor into precedence (butpreRelease
should) and the fact that4.0.0
>4.0.0-beta2
>4.0.0-beta