Guidance: acceptable vcpkg model for upstream Protobuf lite-only runtime builds? #51765
Replies: 2 comments
|
Billy O'Neal (@BillyONeal) sorry for the direct ping, but you reviewed the related protobuf vcpkg change in #51545, so I think you may be the right person to sanity-check this. Upstream Protobuf has now accepted and landed the narrowly constrained lite-only CMake mode: Before I open any vcpkg PR, I would like to avoid proposing a model that conflicts with vcpkg's feature policy. Is this expected to remain overlay/custom-registry-only, or is there an acceptable curated-registry model once this lands in a Protobuf release? |
|
Small update: Protobuf v36.0-rc1 now includes the upstream lite-only CMake support: I am not planning to open a vcpkg PR against an RC. My current plan is to wait for the stable v36.0 release, then submit a normal protobuf version update first. If maintainers have a preferred model for exposing the lite-only runtime in vcpkg, I can align the follow-up PR with that guidance. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Context
There is an upstream Protobuf discussion about supporting a narrowly constrained CMake lite-only runtime mode:
Based on that discussion, I opened a draft upstream PR implementing the narrow variant requested by the Protobuf maintainer:
The upstream maintainer agreed that the use case makes enough sense to review a PR, while also noting concern about expanding the CMake option matrix. The PR is intentionally strict and does not try to support every possible CMake combination.
The intended upstream shape is:
protobuf_BUILD_LIBPROTOBUF=OFFprotobuf_BUILD_PROTOC_BINARIES=OFFprotobuf_BUILD_LIBPROTOC=OFFprotobuf_BUILD_LIBUPB=OFFlibprotobuf-literemains built/exported;libprotobuf,libprotoc,protoc, andlibupbare not built/exported in lite-only mode;The use case is package-manager/cross-build oriented:
protocis supplied by a separate host build;.protofiles use:protobuf::libprotobuf-lite;libprotobuf,libprotoc,protoc, andlibupbare not needed.The local upstream PoC measured:
The draft upstream PR was validated locally with:
protobuf::libprotobuf-lite;There is also a separate vcpkg PR related to reducing target-side
libprotoc/libupbinstalls:That PR is independent from the full-vs-lite runtime question. It only addresses target
libprotoc/libupb.Question
If upstream Protobuf accepts this narrowly constrained lite-only runtime mode, what packaging model would be considered acceptable for vcpkg's curated registry?
I see a few possible directions, but I am unsure which one best aligns with vcpkg policy and maintainer expectations.
Option A — overlay/custom registry only
Projects that need target-side lite-only Protobuf keep using overlays/custom registries and pass the upstream CMake option there.
This is the safest policy-wise, but downstream projects continue maintaining custom ports.
Option B — default-on
full-runtimefeatureKeep current behavior as the default feature set:
Then:
protobufkeeps current behavior;protobuf[core]could become target-side lite-only.However, I am not sure whether using a default feature for the full runtime/API surface would be considered acceptable.
Option C —
lite-runtimefeatureA feature such as:
would effectively disable
libprotobuf, so I assume this may conflict with vcpkg's additive feature model.Option D — separate
protobuf-liteportThis seems problematic because it would likely conflict with
protobufon:protobuf::targets.So I assume this is not desirable for the curated registry, but I would appreciate confirmation.
What I am asking
Before I spend time preparing a vcpkg-side implementation, I would like maintainer guidance on:
full-runtimefeature acceptable in this case, or would that violate default-feature guidance because it controls public API/binary surface?protobuf-liteport categorically unacceptable because of file/target conflicts?All reactions