Skip to content

Conversation

brentleyjones
Copy link
Collaborator

(cherry picked from commit 8a4310e)

brentleyjones referenced this pull request Oct 7, 2025
PiperOrigin-RevId: 750219409
brentleyjones referenced this pull request Oct 7, 2025
PiperOrigin-RevId: 750306755
brentleyjones referenced this pull request Oct 7, 2025
PiperOrigin-RevId: 750985667
(cherry picked from commit 8a4310e)
Signed-off-by: Brentley Jones <github@brentleyjones.com>
@brentleyjones brentleyjones changed the title Enable AEGs Enable support for AEGs Oct 7, 2025
@brentleyjones
Copy link
Collaborator Author

brentleyjones commented Oct 7, 2025

We will need to apply bazelbuild/rules_apple@3da7b31 in rules_apple before landing this. as well as some other toolchains/AEG stuff in general.

@brentleyjones
Copy link
Collaborator Author

Current failures are unrelated to PR, but I don't feel safe merging this while they are there.

@brentleyjones
Copy link
Collaborator Author

Also looks like we need to set toolchains for the proto stuff. Upstream defines swift_proto_toolchain, and I think we have to do something similar. cc: @AttilaTheFun.

@AttilaTheFun
Copy link
Contributor

@brentleyjones I'm not familiar with Automatic Extension Groups but you're welcome to modify the swift_proto_library rule to support them.

However, longer term I was thinking it would be more maintainable to refactor them into a macro with a source-generating rule which passes the generated sources into a regular swift_library.

This is the approach I took at Snap for our new Swift dependency injection system and it has been working well for us so far.

There are a couple of tradeoffs to this approach, though, and it would be a source-breaking change so we would have to retain the old behavior with some kind of legacy_mode flag.

@brentleyjones
Copy link
Collaborator Author

Ignore the AEGs portion, I was more calling out the toolchain-ification of the proto rules in upstream and how that probably applies to us as well (and in general using toolchains is required for AEGs to work).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants