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

Bring most of the protos shuffle/update over to the 1.x branch #1432

Merged
merged 13 commits into from
Jul 26, 2023

Conversation

thomasvl
Copy link
Collaborator

This should bring everything over from main except for final commit in those changes that renamed the proto packages to be project specific. That's not an easy cherry-pick because of the other differences between the branch and main; so might have to be done from scratch if desired to have it on the branch.

Using upstream 1c23a17f091a0dd7ad44ddc4b0509d39773578e8.
Using commit 6e9357372ba5a183b1b2ad214f09f294781b708d
"upstream/" is now a copy of the files protocolbuffers/protobuf, this is
basically moving the "google/protobuf" and "conformance" directories just down a
level, but it will hopefully make things a little more clear.

All the _local_ .proto files for other purposes are now moved into sub
directories that match the name of their directories in "Sources/" or "Tests/".

The places were SwiftProtobuf was using upstream files for tests, those files
have now been forked. So they exist within "Protos/SwiftProtobufTests/" but they
will *no* longer be updated to match upstream. This is a *good* thing as in the
past there have been build breaks with upstream changed and it broke the test.
Now the files are specific to this project and any edits desired can be made.
NOTE: At some point the files should get updated/reduced down to only what is
needed because they have always had some extra message/enums/fields that the
local tests didn't need, and so the simplification would likely be good.

Lastly, a few upstream .proto files are now mirrored from "Protos/upstream/" in
to the specific project level directory needed (SwiftProtobuf, Conformance,
etc.). This gets the files clearly in a target directory where they are used,
but does mean they have to be updated in this second location. Symlinks might
have worked for this, but to avoid issues building the package on any platform
(Windows?), the copies were used instead.

The "Reference/" directory was then update to mirror this new layout.
NOTE: This does *not* yet update the .proto files that use editions features;
that can't be done until the plugin support all the new constructs.

Using upstream commit 7e9d0c1630a51b2964ff1f359bc9a0e0bd4dfe78
Now that the files are specific to SwiftProtobuf, go ahead and trim files down
to the things actually being used.

Since the reference tests still include a lot of upstream things, they still
generate there.
Swap to merging in another set of extensions in the cases we were do that.
There was one tiny message used, so recreate it in unittest_proto3.proto.
@thomasvl thomasvl requested a review from allevato July 26, 2023 15:57
@thomasvl thomasvl merged commit 55c4008 into apple:1_x_release_branch Jul 26, 2023
16 checks passed
@thomasvl thomasvl deleted the update_n_shuffle_protos branch July 26, 2023 16:08
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