refactor(misc): remove obsolete OS availability checks#16313
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
There was a problem hiding this comment.
Style script did not pass as well.
From https://github.com/firebase/firebase-ios-sdk/actions/runs/28110560424/job/83236512040?pr=16313
Run eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
START_REVISION=origin/main
START_SHA=a6be91893f76084b84971510411e4afeb018263c
Clang-format Path: /home/linuxbrew/.linuxbrew/opt/clang-format/bin/clang-format
Clang-format Version: clang-format version 22.1.8
+ python --version
Python 3.11.15
+ /home/runner/work/firebase-ios-sdk/firebase-ios-sdk/scripts/check_whitespace.sh
FirebaseSharedSwift/Tests/third_party/DataEncoderTests.swift:194://
ERROR: Trailing whitespace found in the files above. Please fix.
Error: Process completed with exit code 1.
| return kFIRAppReadyToConfigureSDKNotification; | ||
| } | ||
| return WKApplicationDidBecomeActiveNotification; | ||
|
|
| /// This can be used as the generic `Response` parameter to ``Callable`` to receive both the | ||
| /// yielded messages and final return value of the streaming callable function. | ||
| @available(macOS 12.0, watchOS 8.0, *) | ||
| public enum StreamResponse<Message: Decodable & Sendable, Result: Decodable & Sendable>: Decodable, |
There was a problem hiding this comment.
Shouldn't this remain?
| public enum StreamResponse<Message: Decodable & Sendable, Result: Decodable & Sendable>: Decodable, | |
| @available(macOS 12.0, watchOS 8.0, *) | |
| public enum StreamResponse<Message: Decodable & Sendable, Result: Decodable & Sendable>: Decodable, |
| } | ||
|
|
||
| @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) | ||
| public extension Callable where Request: Sendable, Response: Sendable { |
There was a problem hiding this comment.
Shouldn't this remain, minus the iOS and tvOS bits?
| public extension Callable where Request: Sendable, Response: Sendable { | |
| @available(macOS 12.0, watchOS 8.0, *) | |
| public extension Callable where Request: Sendable, Response: Sendable { |
| } | ||
|
|
||
| @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) | ||
| func stream(at url: URL, |
There was a problem hiding this comment.
Shouldn't this remain, minus the iOS and tvOS bits?
| func stream(at url: URL, | |
| @available(macOS 12.0, watchOS 8.0, *) | |
| func stream(at url: URL, |
| } | ||
|
|
||
| @available(macOS 12.0, watchOS 8.0, *) | ||
| private func callableStreamResult(fromResponseData data: Data, |
There was a problem hiding this comment.
Shouldn't this remain?
| private func callableStreamResult(fromResponseData data: Data, | |
| @available(macOS 12.0, watchOS 8.0, *) | |
| private func callableStreamResult(fromResponseData data: Data, |
| } | ||
|
|
||
| @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) | ||
| func stream(_ data: SendableWrapper? = nil) -> AsyncThrowingStream<JSONStreamResponse, Error> { |
There was a problem hiding this comment.
Shouldn't this remain, minus the iOS and tvOS bits?
| func stream(_ data: SendableWrapper? = nil) -> AsyncThrowingStream<JSONStreamResponse, Error> { | |
| @available(macOS 12.0, watchOS 8.0, *) | |
| func stream(_ data: SendableWrapper? = nil) -> AsyncThrowingStream<JSONStreamResponse, Error> { |
| private struct EmptyRequest: Encodable, Sendable {} | ||
|
|
||
| @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) | ||
| extension IntegrationTests { |
There was a problem hiding this comment.
Shouldn't this remain, minus the iOS and tvOS bits?
| extension IntegrationTests { | |
| @available(macOS 12.0, watchOS 8.0, *) | |
| extension IntegrationTests { |
| if (@available(macOS 10.13, iOS 11.0, tvOS 11.0, *)) { | ||
| return [plistContent writeToURL:[NSURL fileURLWithPath:path] error:outError]; | ||
| } | ||
| return [plistContent writeToURL:[NSURL fileURLWithPath:path] error:outError]; | ||
|
|
||
| return [plistContent writeToFile:path atomically:YES]; |
There was a problem hiding this comment.
Aren't left with a double return?
| // } else { | ||
| // _testEncodeFailure(of: model) | ||
| // } | ||
| //// _testEncodeFailure(of: model) |
There was a problem hiding this comment.
Shouldn't this be?
| //// _testEncodeFailure(of: model) | |
| // _testEncodeFailure(of: model) |
#no-changelog