Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates a broad set of CMake “ports” (third-party dependency recipes) to newer upstream versions, adds/updates version-specific patch files needed for toolchain compatibility, and introduces repo documentation/skills intended to guide an AI-assisted port-upgrade workflow.
Changes:
- Bump multiple port default versions (yaml-cpp, libwebsockets, benchmark, opentelemetry-cpp, OpenSSL, ngtcp2/nghttp3/nghttp2, mimalloc, libuv, libcurl, gRPC, zlib, abseil-cpp).
- Add new patch files for updated upstreams (opentelemetry-cpp v1.26, ngtcp2 v1.22, libuv v1.52, libcurl 8.19, gRPC v1.80, zlib v1.3.2).
- Adjust git patch-application behavior (
core.autocrlf=input) and add project guidelines + port-upgrade workflow documentation under multiple agent frameworks.
Reviewed changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ports/yaml-cpp/yaml-cpp.cmake | Bump yaml-cpp to 0.9.0 and adjust tag-selection logic. |
| ports/web/libwebsockets.cmake | Bump libwebsockets default version to v4.5.8. |
| ports/test/benchmark.cmake | Bump benchmark default version to v1.9.5. |
| ports/telemetry/opentelemetry-cpp.cmake | Bump opentelemetry-cpp to v1.26.0. |
| ports/telemetry/opentelemetry-cpp-v1.26.patch | New compatibility patch for opentelemetry-cpp v1.26. |
| ports/ssl/openssl/openssl.cmake | Bump OpenSSL version default to 3.5.5. |
| ports/ngtcp2/ngtcp2.cmake | Bump ngtcp2 to v1.22.0. |
| ports/ngtcp2/ngtcp2-v1.22.patch | New patch for ngtcp2 v1.22 build behavior. |
| ports/ngtcp2/nghttp3.cmake | Bump nghttp3 to v1.15.0. |
| ports/nghttp2/nghttp2.cmake | Bump nghttp2 to v1.68.1. |
| ports/malloc/mimalloc.cmake | Bump mimalloc default version to v3.1.6. |
| ports/libuv/libuv.cmake | Bump libuv default version to v1.52.1. |
| ports/libuv/libuv-v1.52.patch | New patch for libuv v1.52 (Apple-related adjustments). |
| ports/libcurl/libcurl.cmake | Bump libcurl default version to 8.19.0. |
| ports/libcurl/libcurl-8.19.patch | New patch for curl 8.19 CMake link/check behavior. |
| ports/grpc/grpc.cmake | Bump gRPC default version to v1.80.0 on the “modern” toolchain path. |
| ports/grpc/grpc-v1.80.patch | New patch for gRPC v1.80 (string conversions, etc.). |
| ports/compression/zlib.cmake | Bump zlib to v1.3.2. |
| ports/compression/zlib-v1.3.2.patch | New patch to make zlib respect BUILD_SHARED_LIBS. |
| ports/abseil-cpp/abseil-cpp.cmake | Bump abseil-cpp version to 20250512.2. |
| modules/ProjectBuildTools.cmake | Use core.autocrlf=input for git apply / related git invocations. |
| modules/MaybePopulateSubmodule.cmake | Use core.autocrlf=input when applying submodule patches. |
| CLAUDE.md | New high-level “truth sources” + rules for AI-assisted changes. |
| AGENTS.md | New project guidelines (build/test, structure, conventions). |
| .github/skills/port-upgrade/SKILL.md | New documented port-upgrade workflow (GitHub skill). |
| .github/skills/port-upgrade/references/patch-workflow.md | Patch matching/testing reference docs. |
| .github/skills/port-upgrade/references/deprecated-options.md | Reference for analyzing removed/renamed build options. |
| .github/skills/port-upgrade/references/dependency-chains.md | Reference for dependency pin discovery/conflict resolution. |
| .github/skills/port-upgrade/references/cross-compilation.md | Reference checklist for cross-compiling/host-tool ports. |
| .github/prompts/upgrade-port.prompt.md | New structured prompt for “Upgrade Port” agent runs. |
| .github/instructions/port-patches.instructions.md | New instructions for editing/creating ports/**/*.patch. |
| .github/instructions/cmake-test-integration.instructions.md | New guidance for editing test/CMakeLists.txt. |
| .github/instructions/cmake-ports.instructions.md | New guidance for ports/**/*.cmake structure/conventions. |
| .github/instructions/ci-matrix.instructions.md | New guidance for workflow matrix updates. |
| .github/instructions/ci-entrypoints.instructions.md | New guidance for ci/do_ci.* changes. |
| .clinerules | New rules file pointing to AGENTS/workflow docs. |
| .claude/skills/port-upgrade/SKILL.md | Port-upgrade workflow duplicated for Claude skill path. |
| .claude/skills/port-upgrade/references/patch-workflow.md | Patch workflow reference duplicated for Claude. |
| .claude/skills/port-upgrade/references/deprecated-options.md | Deprecated options reference duplicated for Claude. |
| .claude/skills/port-upgrade/references/dependency-chains.md | Dependency chains reference duplicated for Claude. |
| .claude/skills/port-upgrade/references/cross-compilation.md | Cross-compilation reference duplicated for Claude. |
| .agents/skills/port-upgrade/SKILL.md | Port-upgrade workflow duplicated for .agents path. |
| .agents/skills/port-upgrade/references/patch-workflow.md | Patch workflow reference duplicated for .agents. |
| .agents/skills/port-upgrade/references/deprecated-options.md | Deprecated options reference duplicated for .agents. |
| .agents/skills/port-upgrade/references/dependency-chains.md | Dependency chains reference duplicated for .agents. |
| .agents/skills/port-upgrade/references/cross-compilation.md | Cross-compilation reference duplicated for .agents. |
Comments suppressed due to low confidence (1)
ports/yaml-cpp/yaml-cpp.cmake:41
- For yaml-cpp >= 0.9.0 the tag name is now set to the full upstream tag (e.g.
yaml-cpp-0.9.0), but laterSRC_DIRECTORY_NAMEis built asyaml-cpp-${ATFRAMEWORK_CMAKE_TOOLSET_THIRD_PARTY_YAML_CPP_TAG_NAME}. That results in a doubled prefix likeyaml-cpp-yaml-cpp-0.9.0, which is inconsistent with previous directory naming and can break assumptions about source directory names. Consider keeping*_TAG_NAMEas the git ref only, and deriveSRC_DIRECTORY_NAMEfrom the plain version (or use the tag name directly without adding anotheryaml-cpp-prefix).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| +// ====== Patch for GCC 4.8 ====== | ||
| +#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) | ||
| +#include <memory> | ||
| +namespace std | ||
| +{ | ||
| +template <class T, class... ArgsT> | ||
| +unique_ptr<T> make_unique(ArgsT &&...args) | ||
| +{ | ||
| + return unique_ptr<T>(new T(std::forward<ArgsT>(args)...)); | ||
| +} | ||
| +} // namespace std |
There was a problem hiding this comment.
This patch injects make_unique into namespace std for GCC 4.8. Adding new functions to std is undefined behavior per the C++ standard and can also create ODR/ambiguity issues if the libstdc++ toolchain provides std::make_unique via backports. A safer approach is to provide the fallback in an internal namespace/header (e.g. opentelemetry::nostd) and update call sites (or provide a project-local shim header) rather than modifying std.
- Fix zlib v1.3.2 zlibConfig.cmake.in: add OPTIONAL to include() calls to prevent FATAL_ERROR when only shared or static library is built. Add ZLIB::ZLIB compatibility target mapping to ZLIB::ZLIBSTATIC. - Fix ci/do_ci.sh clang.test: add fallback without -lc++abi for macOS where Apple bundles libc++abi into libc++ (no standalone library).
- zlib-v1.3.2.patch: Change zlib_static_suffix to 'libstatic' on Windows, producing zlibstatic.lib/zlibstaticd.lib instead of zs.lib/zsd.lib. CMake's FindZLIB MODULE mode recognizes 'zlibstatic' but not 'zs'. Also add OPTIONAL to includes and ZLIB::ZLIB compatibility target. - zlib.cmake: Fix import macro for zlib v1.3.2+ CONFIG mode. ZLIB::ZLIB is now INTERFACE IMPORTED wrapping ZLIB::ZLIBSTATIC, so IMPORTED_LOCATION doesn't exist on it. Fall back to ZLIBSTATIC for both ZLIB_LIBRARIES and ZLIB_INCLUDE_DIRS. - libcurl.cmake: Add *_USE_STATIC_LIBS flags for curl 8.19+. Curl 8.19 uses NGHTTP2_USE_STATIC_LIBS, ZSTD_USE_STATIC_LIBS etc. in its bundled Find modules instead of honoring *_CFLAGS. Set these both as build options and in parent scope (needed by CURLConfig.cmake's find_dependency calls). - Update ci-fix-port skill documentation.
- prometheus-cpp and opentelemetry-cpp child cmake builds now receive ZSTD_USE_STATIC_LIBS, CARES_USE_STATIC_LIBS, NGHTTP2_USE_STATIC_LIBS, NGHTTP3_USE_STATIC_LIBS, NGTCP2_USE_STATIC_LIBS from the parent scope. This fixes CURLConfig.cmake's find_dependency(Zstd MODULE) failing on MSVC where the static library is named zstd_static.lib (not zstd.lib). - Fix opentelemetry-cpp WITH_OTLP_HTTP_COMPRESSION always set to ON in both if/else branches; the else branch now correctly sets OFF. - Remove redundant hardcoded -DWITH_OTLP_HTTP_COMPRESSION=ON from the OTLP_HTTP block; the dedicated compression block handles this. - Apply cmake-format to libcurl.cmake comment wrapping. - Update documentation (AGENTS.md, instructions, SKILL.md).
…enchmarks - do_ci.ps1: Split combined "-DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=..." into separate arguments in msvc.shared.test section. The combined string caused cmake to set BUILD_SHARED_LIBS to "ON -DCMAKE_BUILD_TYPE=Release" instead of "ON", and CMAKE_BUILD_TYPE was never set as a separate variable. - opentelemetry-cpp.cmake: Add -DWITH_BENCHMARK=OFF to build options. opentelemetry-cpp v1.26.0 enables benchmarks by default, which fails when Google Benchmark is not available.
…uilds) On MSVC, zstd is always built as static due to linking issues. When BUILD_SHARED_LIBS=ON (msvc.shared.test, msvc.no-rtti.test), the ZSTD_USE_STATIC_LIBS flag was not set, causing curl 8.19+ FindZstd to look for a shared zstd that doesn't exist. Add a fallback that sets ZSTD_USE_STATIC_LIBS=ON whenever the zstd::libzstd_shared target is not available, regardless of the BUILD_SHARED_LIBS setting. This applies to both the parent-scope variable (for find_package) and the BUILD_OPTIONS (for the child cmake process).
Force OpenSSL 3.x API detection results (LWS_HAVE_HMAC_CTX_new, LWS_HAVE_RSA_SET0_KEY, LWS_HAVE_ECDSA_SIG_set0, LWS_HAVE_BN_bn2binpad, LWS_HAVE_EVP_MD_CTX_free, etc.) when OpenSSL >= 3.0.0 is detected. libwebsockets' CHECK_FUNCTION_EXISTS and CHECK_C_SOURCE_COMPILES for OpenSSL functions fail on MSVC with shared OpenSSL, causing fallback to OpenSSL 1.0 code paths that directly access opaque structs (HMAC_CTX, RSA, ECDSA_SIG, BIGNUM), resulting in error C2079/C2037.
No description provided.