Part of kcenon/common_system#454
What
The project vcpkg.json defines a grpc feature (gRPC + protobuf), but the overlay port vcpkg-ports/kcenon-monitoring-system/vcpkg.json does not expose it. Consumers installing via the overlay port cannot enable gRPC-based metrics export.
- Current: Port has
logging and network features only
- Expected: Port also exposes a
grpc feature matching the project manifest
- Scope:
vcpkg-ports/kcenon-monitoring-system/vcpkg.json and portfile.cmake
Feature Comparison
| Feature |
Project vcpkg.json |
Port vcpkg.json |
Status |
logging |
kcenon-logger-system |
kcenon-logger-system |
Aligned |
network |
— |
kcenon-network-system |
Port-only (OK) |
grpc |
grpc >= 1.51.1, protobuf >= 3.21.0 |
— |
Missing from port |
testing |
gtest[gmock] |
— |
Intentionally excluded (build-time only) |
Why
- The project CMakeLists.txt supports gRPC monitoring via
find_package(gRPC CONFIG QUIET) at line 343
- The portfile already passes CMake options based on features but has no
grpc feature to trigger them
- Consumers wanting gRPC-based OTLP/Prometheus monitoring cannot enable it through the vcpkg overlay port
- Feature parity between the project manifest and the port ensures consistent behavior
Where
vcpkg-ports/kcenon-monitoring-system/vcpkg.json — features section
vcpkg-ports/kcenon-monitoring-system/portfile.cmake — feature check and CMake option passthrough
How
Technical Approach
-
Add grpc feature to vcpkg-ports/kcenon-monitoring-system/vcpkg.json:
"grpc": {
"description": "Enable gRPC-based metrics export (OTLP, Prometheus)",
"dependencies": [
{ "name": "grpc", "version>=": "1.51.1" },
{ "name": "protobuf", "version>=": "3.21.0" }
]
}
-
Add feature passthrough in portfile.cmake:
vcpkg_check_features(OUT_PREFIX MONITORING
FEATURES
logging WITH_LOGGER
network WITH_NETWORK
grpc WITH_GRPC
)
# ... in vcpkg_cmake_configure OPTIONS:
-DMONITORING_WITH_GRPC=${MONITORING_WITH_GRPC}
Acceptance Criteria
Part of kcenon/common_system#454
What
The project
vcpkg.jsondefines agrpcfeature (gRPC + protobuf), but the overlay portvcpkg-ports/kcenon-monitoring-system/vcpkg.jsondoes not expose it. Consumers installing via the overlay port cannot enable gRPC-based metrics export.loggingandnetworkfeatures onlygrpcfeature matching the project manifestvcpkg-ports/kcenon-monitoring-system/vcpkg.jsonandportfile.cmakeFeature Comparison
loggingnetworkgrpctestingWhy
find_package(gRPC CONFIG QUIET)at line 343grpcfeature to trigger themWhere
vcpkg-ports/kcenon-monitoring-system/vcpkg.json— features sectionvcpkg-ports/kcenon-monitoring-system/portfile.cmake— feature check and CMake option passthroughHow
Technical Approach
Add
grpcfeature tovcpkg-ports/kcenon-monitoring-system/vcpkg.json:Add feature passthrough in
portfile.cmake:Acceptance Criteria
vcpkg.jsonincludesgrpcfeature with correct dependenciesportfile.cmakepassesMONITORING_WITH_GRPCflag based on featurevcpkg install kcenon-monitoring-system[grpc]builds with gRPC supportlogging,network) are unaffected