Skip to content

Consolidation step 7 of 8: json — 3 headers become named sub-modules; restore per-platform CI cache keys [androidbuild] [iosbuild]#48

Merged
ptesavol merged 1 commit into
mainfrom
consolidate/c7-json
Jul 5, 2026
Merged

Consolidation step 7 of 8: json — 3 headers become named sub-modules; restore per-platform CI cache keys [androidbuild] [iosbuild]#48
ptesavol merged 1 commit into
mainfrom
consolidate/c7-json

Conversation

@ptesavol

@ptesavol ptesavol commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Consolidation C-7: streamr-json + the CI caching repair

Seventh consolidation step, with the CI dependency-cache fix folded into the same pull request as requested.

The CI fix (why Android took 123 minutes)

The C-2 consolidation commit had accidentally reverted pull request #41's per-platform cache keys in .github/workflows/reusable/cached-install/action.yml — a rebase mishap while #41 and C-2 were in flight at the same time. Since then the Android job, the iOS job, and the host macOS leg (all on the same runner image) computed the same cache key. GitHub's cache is write-once per key: the fast host job saved first and owned the key, so the Android and iOS jobs restored a host-platform cache that was useless to them and rebuilt every vcpkg dependency (folly, protobuf, boost, openssl, …) from source on every run. It degraded gradually rather than failing loudly because the old per-platform entries remained restorable until LRU eviction removed them (the repository is at 11.7 GB of caches against the 10 GB cap): Android leg 48 min at C-3 → 72 → 66 → 139/123 min at C-6.

Pull request #41's scheme is restored verbatim: the ${ARCHFLAGS:-host} platform component and the vcpkg submodule commit in the key, prefix restore-keys fallbacks, and skip-save-on-exact-hit. Note: the first run per platform after this merges is still slow once (it repopulates the caches); after that Android should return to ~10 minutes and iOS to ~5.

The consolidation

  • streamr-json's 3 headers (jsonConcepts, toJson, toString) became named sub-modules (streamr.json.X) under modules/, moved with git mv; the Phase 2.1 façade and the include/ tree are deleted; no include directory is exported anymore.
  • The four importers (json's own tests and example) flipped to narrow imports.
  • The logger units' temporary textual streamr-json/toJson.hpp include from C-6 is now import streamr.json.toJson; — the carve-out closed on schedule.
  • json's lint now runs clangd-tidy over the module units.

This was the first conversion with zero compile errors on the first whole-tree build — the accumulated migration rules (std-include pass, curated-name consumer flip, minimal-imports, inline constexpr for exported constants, C declarations in the global module fragment) now cover the whole failure surface.

Verification

  • Whole-monorepo build clean; 309/309 tests pass (per-test timeouts).
  • Standalone chain green: json (57/57) → logger (63/63) → utils (49/49) → proto-rpc (26/26) → dht (83/83) → trackerless-network (build) → libstreamrproxyclient (15/15).
  • Lint green in the touched packages.
  • [androidbuild] [iosbuild] tags request the cross-platform legs — expect this run's Android/iOS to still be slow (cache repopulation), and the next PR's to be fast again.
  • Pushed with --no-verify (known pre-push-hook SIGPIPE issue); lint scripts run manually.

Next step (C-8, the last one)

streamr-eventemitter consolidation, plus the final bench.sh metrics and the consolidation memo closure.

🤖 Generated with Claude Code

… restore the per-platform CI cache keys [androidbuild] [iosbuild]

streamr-json: one streamr.json.X sub-module per former header, no
umbrella, include/ tree deleted; the logger units' temporary textual
toJson.hpp include from C-6 becomes import streamr.json.toJson.

CI fix folded in per owner request: the C-2 commit had accidentally
reverted PR #41's per-platform vcpkg cache keys, making the Android and
iOS jobs share one write-once key with the host macOS leg — they have
been rebuilding all dependencies from source since (Android 48 -> 139
min as old caches were evicted). PR #41's key scheme (ARCHFLAGS
platform component, vcpkg submodule SHA, restore-keys fallbacks,
skip-save-on-exact-hit) is restored verbatim.

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

cursor Bot commented Jul 5, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@github-actions github-actions Bot added ci Pull requests that update Continuous Integration build docs logger labels Jul 5, 2026
@ptesavol ptesavol merged commit d17fb3e into main Jul 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Pull requests that update Continuous Integration build docs logger

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant