-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Rework the protobuf ecosystem #28321
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
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
I definitely support this. One of our older tickets has plenty of details regarding the challenges for some of our older ports: https://trac.macports.org/ticket/57117 But as long as we take our time, and work through the details, this would be a nice improvement. I'm going to try and pull these changes down over the next few days, and review how everything fits together. And finally, thank you so much for taking the initiative on this! |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
5cc2a3b
to
9c33cec
Compare
4fd3cf1
to
3142585
Compare
This comment was marked as outdated.
This comment was marked as outdated.
50d3434
to
ecd852f
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
By the way:
It seems I must have forgotten that |
9ab8b63
to
8312aa9
Compare
IRC might work. But this week might be a problem, based on the latest update from the macports-dev mailing list:
|
|
Buildbot was taken down again since my last comment, but apparently it is up now and will stay up without interruption.
|
This port is derived from the `protobuf-cpp` port, and is now segregated.
Co-Authored-By: Sergey Fedorov <vital.had@gmail.com>
9bafa5c
to
fc7c8b7
Compare
Description
Current State of Protobuf in MacPorts
protobuf3-cpp
currently represents the de-facto Protocol Buffers distribution in MacPorts. It underpins a relatively wide array of ports as it is a common build dependency. Protobuf is also commonly used in the development of networking-heavy software.The last release of Protobuf 3, and the release that this port is pinned at, is v21.12, which dates back to December 2022. The
grpc
port cannot be updated to the latest release becauseprotobuf3-cpp
is not a suitable dependency. The same is true ofprotobuf-c
, a port of a project independent of Protobuf. These two ports themselves are dependencies for a relatively large set of other ports. Also, dependencies aside, from the perspective of developers that use Protobuf for the development of their own software, the absence of a convenient port similar toprotobuf3-cpp
that actually tracks the latest release, may be somewhat of a pain point which is avoidable. The core issue that this PR aims to solve is the issue of moving away from this aging Protobuf port, and into a new default Protobuf port that does not need to be pinned at a certain version.There is also
protobuf3-cpp-upstream
, which is meant to track the latest release, but it is installed under${prefix}/local/libexec/protobuf3-cpp-upstream
, and is not used as a dependency for those ports that depend on Protobuf.protobuf5-cpp
was recently introduced, and is meant to be pinned at Protobuf 5 (v26-v29 releases). It too, is installed under${prefix}/local/libexec
.Aside from these, there is
protobuf-cpp
, which is a port of Protobuf 2, which should now be considered legacy.protobuf-cpp
andprotobuf3-cpp
have corresponding ports containing bindings for programming languages other than C++, such aspy-protobuf
/py-protobuf3
,protobuf-java
/protobuf3-java
, and others. I had decided that dealing with these ports falls outside of the scope of this PR, except for the two Python ports, which in many cases are strongly intertwined with the C++ ports. For instance, these ports depend onprotobuf-cpp
/protobuf3-cpp
, and there are a few ports that depend on both the Python and C++ ports together.Proposal
The first issue to tackle is the reworking of the main Protobuf ports themselves. While we are at it, this is an opportunity to rework the naming conventions for these ports; more on that later.
Again, here are the current ports in the tree:
protobuf-cpp
- pinned at v2.x.xprotobuf3-cpp
- pinned at v3.x.x (v3.21.12, equivalent to v21.12 from the releases page)protobuf3-cpp-upstream
- tracks latest release, although out-of-date for a few months (v3.29.2; should have been called v5.29.2 according to the docs; the 3 is just hardcoded in the portfile, and in the name of the port as well)protobuf5-cpp
- pinned at v5.x.x (last 5.x.x release will be 5.29.x, equivalent to v29.x from the releases page, hence it being pinned in this manner)The first two among these are installed in
${prefix}
, while the rest are in${prefix}/libexec/${name}
.Now, here is what will happen with the merging of this PR:
protobuf-cpp
->protobuf2-cpp
- move to libexecprotobuf3-cpp
- no change in name; move to libexecno need for this anymoreprotobuf3-cpp-upstream
protobuf5-cpp
->protobuf29
- switch to vX.x versioning likeprotobuf
protobuf
- new port; tracks latest release, uses vX.x versioning instead of vX.x.x; installed in${prefix}
The primary reason we are treating the naming and versioning of
protobuf
differently from the ports we currently have, is that it brings about a great deal of simplicity. The C++ implementation, for all intents and purposes, is the Protobuf—the non-C++ ports just contain language bindings. Thus, we can drop the “cpp” from the name. This also simplifies things from a maintainer’s perspective, as there is no need to manually prepend the version number of the C++ bindings inprotobuf
’s portfile (e.g. v3 forprotobuf3-cpp
, or v5 forprotobuf5-cpp
).As for the Python bindings,
py-protobuf
will be moved topy-protobuf2
, andpy-protobuf
will track the latest release of the Python bindings from PyPI. The idea is to deletepy-protobuf2
andpy-protobuf3
from the tree, and thus keep only the newpy-protobuf
, as it currently appears that virtually all dependent ports build against this new port without issue. This is currently pending, and will either happen as part of this PR or in the near future after it is merged. On this same note, the same should be done forprotobuf2-cpp
andprotobuf3-cpp
, but an ideal timeline for that is a little less clear at the moment.After doing the above, we can finally swap the
protobuf3-cpp
dependency used in many of its dependent ports forprotobuf
, and updategrpc
andprotobuf-c
to their latest releases.A handful of these dependency swaps were moved to new PRs because of how much time it would have taken this PR’s CI checks to finish, causing them to hit their 6-hour time limit before they could. These PRs are as follows:
In summary,
protobuf
is the way to install Protocol Buffers and theprotoc
compiler with MacPorts, and ports that depend on Protobuf should use this port as a dependency.Type(s)
Tested on
macOS 15.4.1 24E263 arm64
Xcode 16.3 16E140
Verification
Have you
port lint
?sudo port test
?sudo port -vst install
?[skip notification]