Skip to content

Conversation

@andrewheard
Copy link
Contributor

@andrewheard andrewheard commented Aug 14, 2025

Require Sendable conformance for PartsRepresentable types.

Note: CGImage didn't become Sendable until Swift 6.1 (Xcode 16.3) and NSImage / CIImage became Sendable in Swift 6.2 (Xcode 26.0). As a workaround, these types are marked @unchecked @retroactive Sendable to support building on Xcode 16.0 to 16.2.

#no-changelog

@gemini-code-assist
Copy link
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize 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 counter productive. 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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly adds Sendable conformance to the PartsRepresentable protocol and adds the necessary conditional retroactive Sendable conformance for CGImage, NSImage, and CIImage to support older Swift versions. However, the changes introduce compilation errors by removing the public access modifier from the partsValue property in the extensions for these image types. Since PartsRepresentable is a public protocol, its requirements must be implemented with public visibility. My review includes suggestions to fix this.

@andrewheard andrewheard marked this pull request as ready for review November 14, 2025 20:45
@andrewheard andrewheard requested a review from ncooke3 November 14, 2025 20:46
@andrewheard andrewheard marked this pull request as draft November 14, 2025 21:28
@andrewheard andrewheard removed the request for review from ncooke3 November 14, 2025 21:29
Comment on lines +68 to +69
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
extension NSImage: PartsRepresentable {}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This produces the warning Conformance of 'NSImage' to 'Sendable' is only available in macOS 14.0 or newer on Xcode 26.1 (and potentially other versions of 26).

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