Skip to content

Generated code is invalid for well-known types #70

Open
@andrew-selvia

Description

@andrew-selvia

Based on my experiments, if a message contains a well-known type, http4s-grpc produces invalid code. For example, this protobuf:

syntax = "proto3";
package com.selvia.andrew.demo;
import "google/protobuf/empty.proto";
import "google/protobuf/wrappers.proto";
service Foo {
  rpc Bar (google.protobuf.Empty) returns (stream google.protobuf.Int64Value) {}
}

produces the following code:

trait Foo[F[_]] { 
  def bar(request: _root_.com.google.protobuf.empty.Empty, ctx: _root_.org.http4s.Headers): _root_.fs2.Stream[F, _root_._root_.scala.Long]
}

Notice how the return type has the invalid type prefix _root_._root_.

ScalaPB seems to handle these alright. Will some additional sbt configuration make this work or is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions