Skip to content

refactor(misc): remove obsolete OS availability checks#16313

Draft
ncooke3 wants to merge 4 commits into
mainfrom
nc.avail.misc
Draft

refactor(misc): remove obsolete OS availability checks#16313
ncooke3 wants to merge 4 commits into
mainfrom
nc.avail.misc

Conversation

@ncooke3

@ncooke3 ncooke3 commented Jun 23, 2026

Copy link
Copy Markdown
Member

#no-changelog

@gemini-code-assist

Copy link
Copy Markdown
Contributor
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

@ncooke3 ncooke3 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread FirebaseCore/Tests/Unit/FIRAppTest.m Outdated
return kFIRAppReadyToConfigureSDKNotification;
}
return WKApplicationDidBecomeActiveNotification;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

/// 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,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this remain?

Suggested change
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 {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this remain, minus the iOS and tvOS bits?

Suggested change
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,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this remain, minus the iOS and tvOS bits?

Suggested change
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,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this remain?

Suggested change
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> {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this remain, minus the iOS and tvOS bits?

Suggested change
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 {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this remain, minus the iOS and tvOS bits?

Suggested change
extension IntegrationTests {
@available(macOS 12.0, watchOS 8.0, *)
extension IntegrationTests {

Comment on lines 206 to 208
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];

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't left with a double return?

// } else {
// _testEncodeFailure(of: model)
// }
//// _testEncodeFailure(of: model)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be?

Suggested change
//// _testEncodeFailure(of: model)
// _testEncodeFailure(of: model)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant