Skip to content

Fix grpc-core ServerListener.transportCreated drop breaking Firestore Java builds#1490

Open
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-xamarin-firestore-build-issue
Open

Fix grpc-core ServerListener.transportCreated drop breaking Firestore Java builds#1490
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-xamarin-firestore-build-issue

Conversation

Copilot AI commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Apps referencing Xamarin.Firebase.Firestore (transitively Xamarin.Grpc.Core) fail to build with ServerListenerImplementor is not abstract and does not override abstract method transportCreated(ServerTransport) in ServerListener.

Root cause

io.grpc.internal.ServerListener has two abstract methods, serverShutdown() and transportCreated(ServerTransport). The latter was silently dropped because its parameter io.grpc.internal.ServerTransport is unbound — ServerTransport implements io.grpc.InternalInstrumented, which is itself dropped (its getStats() returns an unbound Guava ListenableFuture). Since ServerListener is a *Listener, the generator emits an IServerListenerImplementor ACW (mono/io/grpc/internal/ServerListenerImplementor.java); with transportCreated missing, the ACW overrode only serverShutdown() and failed Java compilation in consumers.

Changes

  • source/io.grpc/grpc-core/Transforms/Metadata.xml
    • <add-node> a minimal io.grpc.internal.ServerTransport interface (its three directly-declared methods, omitting the unbound InternalInstrumented base) so the parameter type resolves.
    • <add-node> transportCreated back onto ServerListener.
  • config.json — bump Xamarin.Grpc.Core nugetVersion 1.82.0.11.82.0.2.
  • PublicAPI.Unshipped.txt — regenerated: adds IServerTransport, IServerListener.TransportCreated, ServerTransportCreatedHandler.

ServerTransport is not a *Listener, so it gets no Implementor of its own — the minimal stub adds no new ACW and cannot reintroduce a missing-override break.

The generated implementor now overrides both methods:

public void ServerShutdown () { ... }
public IServerTransportListener? TransportCreated (IServerTransport? p0) { ... }

…fixes grpc-core Java build)

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Xamarin.Firebase.Firestore build failure on .NET 9 Android Fix grpc-core ServerListener.transportCreated drop breaking Firestore Java builds Jun 29, 2026
Copilot AI requested a review from jonathanpeppers June 29, 2026 13:28
@jonathanpeppers jonathanpeppers marked this pull request as ready for review June 29, 2026 16:21
Copilot AI review requested due to automatic review settings June 29, 2026 16:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a gRPC binding-generation mismatch where io.grpc.internal.ServerListener.transportCreated(ServerTransport) was being silently dropped (due to an unbound ServerTransport type), causing the generated ServerListenerImplementor.java to miss an override and break downstream Android app Java compilation (e.g., via Xamarin.Firebase.FirestoreXamarin.Grpc.Core).

Changes:

  • Reintroduces a minimal io.grpc.internal.ServerTransport interface in metadata so transportCreated(ServerTransport) can be bound again.
  • Re-adds ServerListener.transportCreated(...) to keep the managed interface and generated Java implementor in sync.
  • Bumps Xamarin.Grpc.Core NuGet revision and updates PublicAPI unshipped surface to include the restored API.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
source/io.grpc/grpc-core/Transforms/Metadata.xml Adds minimal ServerTransport and restores ServerListener.transportCreated(...) so the *Implementor compiles correctly.
source/io.grpc/grpc-core/PublicAPI/PublicAPI.Unshipped.txt Reflects the new/restored public API surface (IServerTransport, TransportCreated, related delegate).
config.json Bumps Xamarin.Grpc.Core nugetVersion to publish the binding fix as a new revision.

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.

Xamarin.Firebase.Firestore 126.0.2.3 fails to build on .NET 9 Android due to ServerListenerImplementor missing transportCreated(ServerTransport)

3 participants