From 7563ccba430aaa2f211e9a423299fd9a4c5fc9fe Mon Sep 17 00:00:00 2001 From: Alex Henning Johannessen Date: Wed, 18 Oct 2023 11:18:23 +0100 Subject: [PATCH] code-gen: add scala3_sources and no_lenses code generator options --- .../main/scala/fs2/grpc/codegen/Fs2GrpcPlugin.scala | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugin/src/main/scala/fs2/grpc/codegen/Fs2GrpcPlugin.scala b/plugin/src/main/scala/fs2/grpc/codegen/Fs2GrpcPlugin.scala index f6dac6e8..4cd7478e 100644 --- a/plugin/src/main/scala/fs2/grpc/codegen/Fs2GrpcPlugin.scala +++ b/plugin/src/main/scala/fs2/grpc/codegen/Fs2GrpcPlugin.scala @@ -64,6 +64,12 @@ object Fs2GrpcPlugin extends AutoPlugin { case object AsciiFormatToString extends CodeGeneratorOption { override def toString: String = "ascii_format_to_string" } + case object NoLenses extends CodeGeneratorOption { + override def toString: String = "no_lenses" + } + case object Scala3Sources extends CodeGeneratorOption { + override def toString: String = "scala3_sources" + } } val scalapbCodeGeneratorOptions = @@ -94,7 +100,9 @@ object Fs2GrpcPlugin extends AutoPlugin { javaConversions = options(CodeGeneratorOption.JavaConversions), grpc = options(CodeGeneratorOption.Grpc), singleLineToProtoString = options(CodeGeneratorOption.SingleLineToProtoString), - asciiFormatToString = options(CodeGeneratorOption.AsciiFormatToString) + asciiFormatToString = options(CodeGeneratorOption.AsciiFormatToString), + lenses = !options(CodeGeneratorOption.NoLenses), + scala3Sources = options(CodeGeneratorOption.Scala3Sources) ) }