nscn.polaris2.protoc.bridge
Members list
Type members
Classlikes
Maven coordinates of an artifact a generator wants on the consumer's classpath.
Maven coordinates of an artifact a generator wants on the consumer's classpath.
crossVersion = true means the build tool should append its Scala binary version suffix to artifactId (foo -> foo_3).
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A generator compiled into protoc itself (--java_out, --cpp_out, ...).
A generator compiled into protoc itself (--java_out, --cpp_out, ...).
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Generatorclass Objecttrait Matchableclass AnyShow all
protoc's --descriptor_set_out, which writes a single file rather than a directory.
protoc's --descriptor_set_out, which writes a single file rather than a directory.
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait Generatorclass Objecttrait Matchableclass AnyShow all
- Self type
Extra environment the bridge hands to in-JVM generators, on top of what protoc sends.
Extra environment the bridge hands to in-JVM generators, on top of what protoc sends.
protoc's plugin protocol has no room for this, so the bridge appends it as an unknown field on the serialized CodeGeneratorRequest and mirrors it in the child process environment. No Java or Scala class is generated for the message: the writer side must work without a protobuf-java of its own version on the classpath, so it serializes by hand (see ProtoUtils) and the reader side uses DynamicMessage.
Field number and variable name are deliberately kept byte-identical to protoc-bridge's (1020 is protobuf's globally reserved extension number for ScalaPB) so a third-party protoc plugin that already speaks this protocol keeps working.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Reader half of ExtraEnv, split out because it needs protobuf-java and only runs inside the generator, where a compatible protobuf-java is guaranteed.
Reader half of ExtraEnv, split out because it needs protobuf-java and only runs inside the generator, where a compatible protobuf-java is guaranteed.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ExtraEnvParser.type
One code generator invocation protoc should perform.
One code generator invocation protoc should perform.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class BuiltinGeneratorobject DescriptorSetGeneratorclass JvmGeneratorclass PluginGeneratorclass SandboxedJvmGenerator
A generator running inside this JVM, reached through a frontend.PluginFrontend.
A generator running inside this JVM, reached through a frontend.PluginFrontend.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Generatorclass Objecttrait Matchableclass AnyShow all
An external protoc-gen-<name> executable, optionally at an explicit path.
An external protoc-gen-<name> executable, optionally at an explicit path.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Generatorclass Objecttrait Matchableclass AnyShow all
The few protobuf wire-format primitives the bridge needs on its own.
The few protobuf wire-format primitives the bridge needs on its own.
ExtraEnv is appended to an already-serialized CodeGeneratorRequest without ever parsing it, so the bridge cannot go through protobuf-java's generated code here - it would need a compiled message type for a message that deliberately has none.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ProtoUtils.type
Entry point: turns a list of Targets into a single protoc invocation.
Entry point: turns a list of Targets into a single protoc invocation.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ProtocBridge.type
The raw interface a protoc code generator implements: bytes of a CodeGeneratorRequest in, bytes of a CodeGeneratorResponse out.
The raw interface a protoc code generator implements: bytes of a CodeGeneratorRequest in, bytes of a CodeGeneratorResponse out.
Generator authors normally implement nscn.polaris2.protoc.bridge.codegen.CodeGenApp instead, which decodes the request into resolved FileDescriptors.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait CodeGenApp
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ProtocCodeGenerator.type
How the bridge actually launches protoc.
How the bridge actually launches protoc.
Abstract rather than a plain function because the build tool may want to intercept the invocation, and because the extra environment carrying the secondary-output directory has to reach the child process.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ProtocRunner[ExitCode]
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ProtocRunner.type
A JvmGenerator loaded from its own artifact into its own ClassLoader.
A JvmGenerator loaded from its own artifact into its own ClassLoader.
The point is dependency isolation: the build tool, and any other generator in the same protoc run, may hold an incompatible protobuf-java. Resolving the generator's artifact separately and loading it in a child loader keeps those apart.
Attributes
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
Normalizes os.name / os.arch into the classifiers protobuf publishes its protoc executables under (osx-aarch_64, linux-x86_64, ...).
Normalizes os.name / os.arch into the classifiers protobuf publishes its protoc executables under (osx-aarch_64, linux-x86_64, ...).
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
SystemDetector.type
A generator plus where its output goes and which options it receives.
A generator plus where its output goes and which options it receives.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all