Skip to content

Modernization Phase 1.3: vcpkg baseline 2026.06.24 + dependency wave [iosbuild] - #24

Merged
ptesavol merged 4 commits into
mainfrom
modernize/1.3-deps
Jul 3, 2026
Merged

ptesavol merged 4 commits into
mainfrom
modernize/1.3-deps

Conversation

@ptesavol

@ptesavol ptesavol commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Phase 1.3 of the modernization: the dependency update wave — the phase the plan flagged as highest-risk. Three commits: baseline bump + overlay reset, SDK adaptation, iOS restoration + docs.

The baseline

vcpkg submodule: 2024-09 pin → tag 2026.06.24, with builtin-baseline now pinned in vcpkg.json (enables per-port overrides; the merge script preserves the key; and since CI cache keys hash vcpkg.json, baseline bumps bust caches automatically — the planned cache-key/submodule-SHA work became unnecessary).

Resulting versions: protobuf 6.33.4 (from 25.1!), folly 2026.02.23, boost 1.91, openssl 3.6.3, libdatachannel 0.24.5, fmt 12.2, secp256k1 0.7.1.

Overlay diet (the headline)

All five old overlay directories deleted (folly/usrsctp/libdatachannel/magic-enum/fmt), along with Phase 1.2's CMake-4 stopgaps (CMAKE_POLICY_VERSION_MINIMUM, VCPKG_OSX_SYSROOT) — the new vcpkg handles CMake 4 itself. Three minimal overlays returned, strictly evidence-driven, each with a JUSTIFICATION.md:

Overlay Content Why
folly 1 patch + 1 option Missing <exception> include (libc++ 22 hard error); FOLLY_NO_EXCEPTION_TRACER=ON — see below
secp256k1 1 option Recovery module is upstream-default-off; SigningUtils needs it
usrsctp 2 patches The pre-2026 iOS patches (no net/route.h/ifaddrs.h in the iPhoneOS SDK) — verified still required

The folly exception-tracer find deserves a mention: after the bump, 18 tests aborted — every single one exercising an error path. Bisected with minimal repros down to: std::current_exception() returning null inside catch blocks, process-wide. Cause: folly 2026's exception tracer interposes __cxa_throw and now activates on macOS (the 2024 tracer was glibc-only and compiled to empty objects on libc++), breaking exception introspection for everyone. One configure option kills it; the SDK never used the tracer.

SDK adaptations

  • Protobuf 25→33: all checked-in generated code regenerated with protoc 33.4 (the bulk of the diff); the codegen plugin ported to the absl::string_view descriptor API; proto.sh scripts now detect the protoc triplet dir (was hardcoded arm64-osx) and drop the removed --experimental_allow_proto3_optional flag; protobuf::libprotoc removed from library targets (only the host plugin needs it; the new port doesn't export it for cross triplets).
  • folly API: seven scheduleOn(exec) sites → co_withExecutor(exec, task) (2026 deprecation, fatal under warnings-as-errors lint).
  • magic-enum 0.9.8 header move (magic_enum/magic_enum.hpp); libdatachannel 0.24 target rename; secp256k1_precomputed archive no longer exists (merged into main lib) → optional; RpcCommunicatorTest compares message fields instead of DebugString() output (6.33 prefixes a goo.gle/debugproto marker — the format was never stable); -fpermissive removed from proto-rpc (GCC-only, plan item).

Verification

Gate Result
macOS full build (clean, all deps at new baseline) ✅
Tests ✅ 307/307
Full lint (clangd 22 + clang-format 22) ✅
iOS cross-build + XCFramework (platform=iOS, minos=13.0, no post-deployment-target runtime symbols) ✅
Linux + iOS CI this PR (title carries iosbuild)
Regenerated proto diff for your review — mechanical protoc output

Follow-ups

  • fmt overlay from 1.2 is gone as predicted; MODERNIZATION.md updated; README documents the baseline-bump procedure (including the overlay-revisit rule).
  • Part 1 remaining: Phase 1.4 (iOS libc++ arrangement + deployment target + ios.toolchain refresh), 1.5 (lint remainder: clangd-tidy submodule + suppression triage), 1.6 (CI/docs closeout). Then Part 2: modules.

🤖 Generated with Claude Code

ptesavol and others added 3 commits July 2, 2026 22:03
- vcpkg submodule: 2024-09 pin -> 2026.06.24 tag; builtin-baseline
  added to vcpkg.json (enables per-port overrides; the jq-based
  merge-dependencies.sh preserves the key).
- All overlay ports deleted: magic-enum (was byte-identical to
  upstream), fmt (Phase 1.2 stopgap; folly 2026.02 works with fmt 12),
  folly/usrsctp/libdatachannel (patch sets against 2024 versions;
  upstream ports at the new baseline carry their own fixes). Overlays
  return only with written justification (see overlayports/README.md).
- CMake-4 stopgaps removed from the Apple triplets
  (CMAKE_POLICY_VERSION_MINIMUM, VCPKG_OSX_SYSROOT): the new vcpkg
  scripts and ports handle CMake 4 themselves.
- Root dist/ (XCFramework build output) gitignored.

Port versions at this baseline: protobuf 6.33.4 (regen of checked-in
generated code follows in this phase), folly 2026.02.23, boost 1.91,
openssl 3.6.3, libdatachannel 0.24.5, fmt 12.2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- protobuf 25->33: regenerate all checked-in generated code (protoc
  33.4); port the codegen plugin to the absl::string_view descriptor
  API; proto.sh scripts detect the protoc triplet dir and drop the
  removed --experimental_allow_proto3_optional flag.
- folly 2026.02: overlay port with two justified changes —
  fix-missing-exception-include.patch (rich_error_code.h lacks
  <exception>, hard error under libc++ 22) and
  -DFOLLY_NO_EXCEPTION_TRACER=ON (the 2026 tracer interposes
  __cxa_throw and activates on macOS, unlike the glibc-only 2024
  tracer, breaking std::current_exception process-wide and aborting
  every coro error path; verified with a minimal repro). Migrate the
  seven scheduleOn call sites to co_withExecutor (deprecated in 2026
  folly, warnings-as-errors in lint).
- secp256k1 0.7: overlay enabling the recovery module (upstream
  default-off; SigningUtils needs secp256k1_recovery.h); the separate
  secp256k1_precomputed archive no longer exists, so its find_library
  result is now optional in streamr-utils.
- magic-enum 0.9.8: headers moved under magic_enum/ subdirectory.
- libdatachannel 0.24: exported CMake target renamed to
  LibDataChannel::LibDataChannel.
- RpcCommunicatorTest: compare the message field instead of protobuf
  DebugString output (6.33 prefixes a goo.gle/debugproto marker;
  DebugString was never a stable format).
- Remove -fpermissive from streamr-proto-rpc (GCC-only flag).

Verified on macOS: full build, 307/307 tests, full lint.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- usrsctp overlay: restore the two pre-2026 iOS patches (the iPhoneOS
  SDK ships neither <net/route.h> nor transitively <ifaddrs.h>) —
  verified still required against usrsctp 0.9.5.
- Remove protobuf::libprotoc from library targets (proto-rpc, dht,
  trackerless-network): only the host codegen plugin needs libprotoc,
  and the new protobuf port does not export it for cross triplets.
- README: builtin-baseline bump procedure; MODERNIZATION.md: Phase 1.3
  status.

Verified: iOS cross-build green (XCFramework platform=iOS, minos=13.0,
no post-deployment-target runtime symbols); macOS clean rebuild after
the changes: full build, 307/307 tests, full lint.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The 2026.06.24 baseline pulls libunwind on Linux (new transitive
dependency), whose vcpkg port requires autoconf/autoconf-archive/
automake/libtoolize from the system package manager.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ptesavol

ptesavol commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator Author

Final CI state — all green ✅

Check Result
validate: macos-latest (LLVM 22, new baseline) ✅ install + lint + test
validate: ubuntu-latest (clang-22 + libc++) ✅ install + lint + test
validate: linux-arm64-runner (clang-22 + libc++) ✅ install + lint + test
validate iOS (XCFramework at the new baseline) ✅
Local ✅ build, 307/307 tests, lint, iOS artifact verified

One CI-only fix landed after opening: the new baseline pulls libunwind on Linux, whose port needs autotools from the system (autoconf autoconf-archive automake libtool added to install-prerequisities.sh).

This is the first time the complete matrix is green in a single run during the modernization — old toolchain fully retired, dependencies current, three documented overlays remaining (down from five opaque ones).

Ready for review. The regenerated protobuf sources are the bulk of the diff; the interesting commits are the overlay justifications and the folly exception-tracer analysis.

🤖 Generated with Claude Code

@ptesavol
ptesavol merged commit f4cc6fe into main Jul 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant