Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.x branch Better Plugin Support #1485

Merged
merged 8 commits into from
Oct 26, 2023

Conversation

thomasvl
Copy link
Collaborator

This is #1483, but for the 1.x release branch

There are two minor changes:

  1. It leaves out the move to @main
  2. Small code edit around serializeBytes vs. serializedData.

Add the concept of a `CodeGenerator` and some building blocks to go with it so
some of the boilerplate around writing plugins is provided.

This is the start of the building blocks to make supporting Editions easier for
any plugin (grpc) when that support lands as it will make a lot of the setup
details hidden rather than having to be implemented by each plugin.
Before it would silently ignore the attempt, which might confuse users.
@thomasvl thomasvl requested review from allevato and tbkka October 26, 2023 14:24
@thomasvl
Copy link
Collaborator Author

The build failures on upstream protobuf are known and I think they are working to resolve.

Extend `CodeGenerator` to allow easy customization and generally provide what's
needed for a `main()` so plugins don't have to reimplement everything.
If there are a lot files generated, this linear check could have become an
issue.
@thomasvl thomasvl force-pushed the 1_x_better_plugin_support branch from 589f501 to ef34a25 Compare October 26, 2023 14:29
@thomasvl
Copy link
Collaborator Author

The 5.0.3 and 4.2.4 breaks confuse me, I didn't even change those files. I wonder is something just happened to the swift docker images?

@thomasvl
Copy link
Collaborator Author

The 5.0.3 and 4.2.4 breaks confuse me, I didn't even change those files. I wonder is something just happened to the swift docker images?

Oh, those are just notes, they must always be there. But I am using another api that I guess is an issue.

Looks like `#available` isn't enough for some api usage in the really old Swift
versions, so add a fallback for that case also.
@thomasvl thomasvl force-pushed the 1_x_better_plugin_support branch from bd80516 to 32183da Compare October 26, 2023 15:09
@thomasvl
Copy link
Collaborator Author

CI passes now with the fix for FileHandle on Swift <5.1 (and upstream protobuf having been fixed)

@thomasvl thomasvl merged commit 0040dc8 into apple:1_x_release_branch Oct 26, 2023
17 checks passed
@thomasvl thomasvl deleted the 1_x_better_plugin_support branch October 26, 2023 15:25
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.

2 participants