nscn.polaris2.mill.generator
Members list
Type members
Classlikes
Emits http4s service bindings for every service in a .proto.
Emits http4s service bindings for every service in a .proto.
Ported from org.http4s.grpc.generator.Http4sGrpcCodeGenerator, and rebased from ScalaPB onto mill-protoc: the message types it refers to are the ones nscn.polaris2.protoc.codegen.Scala3Generator emits, and the naming decisions come from the same GenContext that generator uses. Sharing that context is what keeps flat_package, (nscn.polaris2.protoc.file).package_name and the rest agreeing across the two targets; a service referring to a type name the message generator did not produce is the failure mode this avoids.
mill-protoc's own generator ignores service declarations entirely, so the two targets never write the same file.
This is a plain ProtocCodeGenerator, so it runs in-process through the bridge (how nscn.polaris2.mill.Http4sGrpcModule drives it) or as a standalone protoc plugin through its inherited main.
Attributes
- Supertypes
-
trait CodeGenApptrait ProtocCodeGeneratorclass Objecttrait Matchableclass Any
- Self type
Ported from org.http4s.grpc.generator.Http4sGrpcServicePrinter (http4s-grpc), with ScalaPB's DescriptorImplicits replaced by mill-protoc's GenContext.
Ported from org.http4s.grpc.generator.Http4sGrpcServicePrinter (http4s-grpc), with ScalaPB's DescriptorImplicits replaced by mill-protoc's GenContext.
Every type name comes from ctx.fullName, which is the same call mill-protoc's message printers make, so the two targets cannot disagree about where a message landed. ctx.fullName already returns a _root_.-qualified name; prefixRoot exists for the names this printer builds itself out of a package and a simple name, and is idempotent so that qualifying twice is not a way to emit _root_._root_.foo.Bar - the upstream bug this port was forked to fix.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type