Skip to content

Conversation

@cbrunsdon
Copy link
Collaborator

@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
Copy link
Member

@oldergod oldergod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@oldergod oldergod enabled auto-merge January 12, 2026 13:54
@oldergod oldergod merged commit f13dca3 into square:master Jan 12, 2026
9 checks passed
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