Skip to content

Conversation

@cbrunsdon
Copy link

@cbrunsdon cbrunsdon commented Jan 9, 2026

The doc explaining the reason ProtoReader and ProtoReader32 are separate was inaccurate.

The "tag" methods listed all operate on int's in both cases (ProtoReader and ProtoReader32).

This clarifies which methods actually care about int vs long, and the reason for the divergence between ProtoReader and ProtoReader32.

Its trivial, but its probably worth updating since its pretty important to one of the bigger surprises in the consumer interfaces for this.

From the relevant wire-runtime.api

public class com/squareup/wire/ProtoReader {
  public fun beginMessage ()J
  public fun endMessageAndGetUnknownFields (J)Lokio/ByteString;
  public fun nextFieldMinLengthInBytes ()J
  public fun nextTag ()I
}

public abstract interface class com/squareup/wire/ProtoReader32 {
  public abstract fun beginMessage ()I
  public abstract fun endMessageAndGetUnknownFields (I)Lokio/ByteString;
  public abstract fun nextFieldMinLengthInBytes ()I
  public abstract fun nextTag ()I
}

The "tag" methods listed all operate on int's in both cases (ProtoReader
and ProtoReader32).

This clarifies which methods actually care about int vs long, and the
reason for the divergence between ProtoReader and ProtoReader32
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.

1 participant