p

protocbridge

package protocbridge

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. case class Artifact(groupId: String, artifactId: String, version: String, crossVersion: Boolean = false, configuration: Option[String] = None, extraAttributes: Map[String, String] = Map.empty) extends Product with Serializable
  2. final case class BuiltinGenerator(name: String, suggestedDependencies: Seq[Artifact] = Nil) extends Generator with Product with Serializable

    Represents a generator built into protoc, to be used with a directory target.

  3. final case class DescriptorSetGenerator() extends Generator with Product with Serializable

    Represents a generator built into protoc, to be used with a file target.

  4. final class ExtraEnv extends AnyRef

    Ad-hoc message-like class that represents extra environment available for protoc code generators running through protocbridge.

    Ad-hoc message-like class that represents extra environment available for protoc code generators running through protocbridge. This message gets appended by protocbridge to CodeGeneratorRequest so JVM plugins get access to the environment. We do not generate Java or Scala code for this message to prevent potential binary compatibility issues between the bridge and the plugin. Instead, we serialize directly to bytes. Parsing is done in a sandboxed environment, so we rely on DynamicMessage then.

  5. final class FileCache[K] extends AnyRef

    Cache for files that performs a single concurrent get per key upon miss.

  6. sealed trait Generator extends AnyRef

    Represents a code generator invocation

  7. final case class JvmGenerator(name: String, gen: ProtocCodeGenerator) extends Generator with Product with Serializable

    Represents a generator implemented by ProtocCodeGenerator.

  8. final case class PluginGenerator(name: String, suggestedDependencies: Seq[Artifact], path: Option[String]) extends Generator with Product with Serializable
  9. trait ProtocCodeGenerator extends AnyRef

    This is the interface that code generators need to implement.

  10. abstract class ProtocRunner[ExitCode] extends AnyRef
  11. final case class SandboxedJvmGenerator extends Generator with Product with Serializable

    Represents a JvmGenerator that needs to be dynamically loaded from an artifact.

    Represents a JvmGenerator that needs to be dynamically loaded from an artifact. This allows to run each JvmGenerator in its own classloader and thus avoid dependency conflicts between plugins or between plugins and the container (such as sbt).

    This mechanism is needed because SBT ships with an old version of protobuf-java that is not binary compatible with recent versions. In addition, SBT depends on ScalaPB's runtime, so ScalaPB plugins can't use ScalaPB itself without running a risk of conflict.

    artifact: Artifact containing the generator class. resolver: Using a ClassLoader, return a new instance of a ProtocCodeGenerator.

  12. case class Target(generator: Generator, outputPath: File, options: Seq[String] = Seq.empty) extends Product with Serializable

    Target is a generator call and a path to output the generated files

Value Members

  1. object ExtraEnv
  2. object ExtraEnvParser
  3. object FileCache
  4. object ProtoUtils
  5. object ProtocBridge
  6. object ProtocCodeGenerator
  7. object ProtocRunner
  8. object SandboxedJvmGenerator extends Serializable
  9. object SystemDetector
  10. object Target extends Serializable
  11. object gens

Ungrouped