Scala3Generator

nscn.polaris2.protoc.codegen.Scala3Generator
object Scala3Generator extends CodeGenApp

The protoc plugin.

Runs as a protoc-gen-scala3 executable, or in-process through the bridge. Everything interesting is in the printers; this is the entry point, the parameter parsing, and the validation that turns an unsupportable schema into a readable error rather than generated code that will not compile.

Attributes

Graph
Supertypes
trait CodeGenApp
trait ProtocCodeGenerator
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def process(request: CodeGenRequest): CodeGenResponse
override def registerExtensions(registry: ExtensionRegistry): Unit

Teaches protoc's request parser about this project's own options.

Teaches protoc's request parser about this project's own options.

Not optional. Without it every (nscn.polaris2.protoc.*) option arrives as an unknown field and reads back as its default, so the generator quietly ignores the configuration rather than failing.

Attributes

Definition Classes
CodeGenApp

Inherited methods

final def main(args: Array[String]): Unit

Attributes

Inherited from:
CodeGenApp
final def run(input: CodedInputStream): Array[Byte]

Never throws: a generator that dies without writing a response leaves protoc waiting on the pipe, so every failure is converted into a CodeGeneratorResponse.error.

Never throws: a generator that dies without writing a response leaves protoc waiting on the pipe, so every failure is converted into a CodeGeneratorResponse.error.

Attributes

Inherited from:
CodeGenApp
final override def run(req: Array[Byte]): Array[Byte]

Attributes

Definition Classes
CodeGenApp -> ProtocCodeGenerator
Inherited from:
CodeGenApp
def suggestedDependencies: Seq[Artifact]

Artifacts the generated code needs on the consumer's classpath.

Artifacts the generated code needs on the consumer's classpath.

Attributes

Inherited from:
ProtocCodeGenerator