Skip to content

Bump capnp-cpp past AnyStruct schema change and fix compatibility-date#6752

Merged
harrishancock merged 1 commit into
mainfrom
harris/2026-05-11-capnp-anystruct-as-fix
May 11, 2026
Merged

Bump capnp-cpp past AnyStruct schema change and fix compatibility-date#6752
harrishancock merged 1 commit into
mainfrom
harris/2026-05-11-capnp-anystruct-as-fix

Conversation

@harrishancock
Copy link
Copy Markdown
Collaborator

capnproto/capnproto#2501 introduced a source-breaking change: schema::Value::Reader::getStruct() now returns capnp::AnyStruct::Reader (with as()) instead of capnp::AnyPointer::Reader (with getAs()).

Bump capnp-cpp past it and update the two getStruct().getAs() callers in compatibility-date.{c++,-test.c++} to use as().

Assisted-by: OpenCode:claude-opus-4.7

capnproto/capnproto#2501 introduced a source-breaking change:
schema::Value::Reader::getStruct() now returns capnp::AnyStruct::Reader
(with as<T>()) instead of capnp::AnyPointer::Reader (with getAs<T>()).

Bump capnp-cpp past it and update the two getStruct().getAs<T>() callers
in compatibility-date.{c++,-test.c++} to use as<T>().

Assisted-by: OpenCode:claude-opus-4.7
@harrishancock harrishancock requested review from a team as code owners May 11, 2026 12:20
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 11, 2026

No remaining callers of the old API. The change is complete and correct.

Let me verify the strip_prefix matches the new commit hash.

The old strip_prefix was capnproto-capnproto-23bb5b9 (first 7 chars of 23bb5b957cb1ab9f92734341b5664150e71890f2). The new strip_prefix is capnproto-capnproto-911e53d (first 7 chars of 911e53d67841687afe9a349fd8c0d39fe024515a). Both match correctly.

The change is straightforward and mechanically correct:

  1. Dependency bump: capnp-cpp updated from 23bb5b9 to 911e53d, advancing 5 commits. SHA256 hash updated accordingly. strip_prefix matches the new commit.
  2. API migration: Both callers of .getStruct().getAs<T>() are updated to .getStruct().as<T>(), matching the upstream API change from Use more precise AnyList and AnyStruct in the Value schema capnproto/capnproto#2501.
  3. No missed callers: grep confirms no remaining uses of the old getStruct().getAs<>() pattern in the codebase.

LGTM

github run

@harrishancock harrishancock merged commit ac31559 into main May 11, 2026
25 checks passed
@harrishancock harrishancock deleted the harris/2026-05-11-capnp-anystruct-as-fix branch May 11, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants