Closed bobgilmore closed 4 years ago
5 Warnings | |
---|---|
:warning: | ResultTests.swift#L15 - SwiftWisdomTests/CommonTypes/ResultTests.swift#L15: ‘IPResult’ is deprecated: use Swift.Result instead
private final let successfulResult = IPResult<Int>.success(1)
|
:warning: | ResultTests.swift#L16 - SwiftWisdomTests/CommonTypes/ResultTests.swift#L16: ‘IPResult’ is deprecated: use Swift.Result instead
private final let failureResult = IPResult<Any>.failure(ResultError.error)
|
:warning: | UnsignedInteger+ExtensionsTests.swift#L16 - SwiftWisdomTests/StandardLibrary/Numbers/UnsignedInteger+ExtensionsTests.swift#L16: ‘random(inRange:)’ is deprecated: Use Int.random(in:) instead
XCTAssert(positives.contains(random(inRange: positives)))
|
:warning: | UnsignedInteger+ExtensionsTests.swift#L18 - SwiftWisdomTests/StandardLibrary/Numbers/UnsignedInteger+ExtensionsTests.swift#L18: ‘random(inRange:)’ is deprecated: Use Int.random(in:) instead
XCTAssert(negatives.contains(random(inRange: negatives)))
|
:warning: | UnsignedInteger+ExtensionsTests.swift#L20 - SwiftWisdomTests/StandardLibrary/Numbers/UnsignedInteger+ExtensionsTests.swift#L20: ‘random(inRange:)’ is deprecated: Use Int.random(in:) instead
XCTAssert(mixed.contains(random(inRange: mixed)))
|
1 Message | |
---|---|
:book: | Executed 174 tests, with 0 failures (0 unexpected) in 0.335 (0.398) seconds |
Generated by :no_entry_sign: Danger
I like Paul's suggestion more than making the function call @available -- which would cause anyone depending upon the call to have a silent failure, and have no idea why - suddenly - their ip_openSettingsApp() suddenly does not do anything?
I like Paul's suggestion more than making the function call @available -- which would cause anyone depending upon the call to have a silent failure, and have no idea why - suddenly - their ip_openSettingsApp() suddenly does not do anything?
@wolfe719 That was my initial reaction to @jpmendel 's comment as well, but I think what he means is to do what I'm doing, except that I should replace the iOS
with a *
. Because, even though this pod is basically unusable on Mac, might as well be precise and say that this function is not available anywhere at all.
The pod contains a reference to
UIApplication.open(_:)
, which is not permitted for Extensions (such as "Today Widgets"). For reasons I don't understand, Xcode 10 allowed my app and its extension, both of which rely heavily on this pod, to compile. But now, Xcode 11 is correctly preventing the extension from compiling do to the presence of this call.I see three potential solutions:
unavailable
at compile-time (and provide a good error message). Since the function that is being made unavailable is small (3 or 4 lines of code), well-known, easily searchable, and available in the pod source (#ifdef
'd out), this should be a minimal burden on pod clients.unavailable
version in the core spec and an available version in the subspec.