square / square/wire

Some bug in grpcServerCompatible.

Open
#2,307 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

gRPC-server
Dominant language
Kotlin
Stars
4.4k
Forks
627
Avg merge
3d 15m
Merged PRs (30d)
20

Description

//It is generated code.
  public class APIImplLegacyAdapter(
    private val streamExecutor: ExecutorService,
    private val Query: () -> APIQueryBlockingServer//Unresolved reference: APIQueryBlockingServer. It should be APIBlockingStub.
  ) : APIImplBase() {
    public override fun Query(request: Request,
        response: StreamObserver<Reply>): Unit {
      response.onNext(Query().Query(request))
      response.onCompleted()
    }
  }
//It is generated code.
  public class APIBlockingStub : AbstractStub<APIStub> {
    internal constructor(channel: Channel) : super(channel)

    internal constructor(channel: Channel, callOptions: CallOptions) : super(channel, callOptions)

    public override fun build(channel: Channel, callOptions: CallOptions) =
        APIStub(channel, callOptions)

    public fun Query(request: protowireSourcePath.Request):
        protoWireSourcePath.Reply = blockingUnaryCall(channel,//Unresolved reference: protoWireSourcePath. It is not support java_package option.
        getQueryMethod(), callOptions, request)
  }

also #2202

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report concerns Kotlin generated output from grpcServerCompatible, including APIImplLegacyAdapter and APIBlockingStub. Start by locating the generator path for this compatibility mode and compare its output with the two reported unresolved references, including the java_package case. Reproduce the generated output and confirm both references are corrected; use issue #2202 for related context.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
api, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.