Skip to content

pxf-android codegen: generated SbeTextSbeMeta.java does not compile, which breaks protowire's hardening-corpus job #183

Closed

Description

@bfrancojr

protowire's hardening-corpus job fails on main, before any port runs. It builds protowire-java's check-decode-android, and that build stops at the generated SBE meta class for adversarial.v1.SbeText:

protowire-java/pxf-android-codegen-it/build/generated/sources/proto/main/pxf-java-meta/adversarial/v1/SbeTextSbeMeta.java:75: error: switch expression does not have any result expressions
...SbeTextSbeMeta.java:81: error: switch expression does not have any result expressions
...SbeTextSbeMeta.java:104: error: switch expression does not have any result expressions
3 errors
Execution failed for task ':pxf-android-codegen-it:compileJava'

Where it was seen

Likely cause (inferred from timing, not bisected)

protowire-java merged #171 at 08:28. It covers SBE UTF-8 string fields and cutting on a character boundary. SbeText (string text = 1 [(sbe.length) = 8], bytes raw = 2 [(sbe.length) = 8]) is the first adversarial message whose SBE fields are all char arrays, with no numeric field. A generated switch expression that has a case only for numeric fields would have no result there, which is the error above. #172 (08:39) and #174 (08:52) also landed in that window.

Done when

./gradlew :check-decode-android:installDist builds against protowire main's adversarial.proto, and protowire's hardening-corpus job passes on main.

Activity

  1. bfrancojr commented on Nov 3, 2026

    @bfrancojr
    CollaboratorAuthor

    Fixed, though not here, and my guess at the cause was wrong. The generator that wrote SbeTextSbeMeta.java is protoc-gen-pxf-java-meta, which lives in the spec repo. trendvidia/protowire#528 (3f83b43, "throw directly when a dispatch has no cases") fixed it. protowire's hardening-corpus then passed on main at a4ca518 (2026-11-03T10:03), which meets this issue's done-when. protowire-java#171 was not the cause.

    The job fails again from 47b5879 for another reason: CheckDecodeAndroid.java:110/:112 has no suitable method found for unmarshal(byte[],int,int). That is #175 calling the overloads from trendvidia/protowire#541, which hasn't merged yet. #175's own body tracks it, so I'm not filing it separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions