You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2023/09/23 09:25:10 UTC
[GitHub] [incubator-pekko-grpc] pjfanning commented on a diff in pull request #181: support scala 2.13 and scala 3 build for codegen lib
pjfanning commented on code in PR #181:
URL: https://github.com/apache/incubator-pekko-grpc/pull/181#discussion_r1334949526
##########
codegen/src/main/scala-2.13+/org/apache/pekko/grpc/gen/CodeGenerator.scala:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * license agreements; and to You under the Apache License, version 2.0:
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * This file is part of the Apache Pekko project, which was derived from Akka.
+ */
+
+/*
+ * Copyright (C) 2018-2021 Lightbend Inc. <https://www.lightbend.com>
+ */
+
+package org.apache.pekko.grpc.gen
+
+import com.google.protobuf.ExtensionRegistry
+import com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest
+import com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse
+import protocbridge.Artifact
+
+/**
+ * Code generator trait that is not directly bound to scala-pb or protoc (other than the types).
+ */
+trait CodeGenerator {
+ import CodeGenerator._
+
+ /** Generator name; example: `pekko-grpc-scala` */
+ def name: String
+
+ def run(request: CodeGeneratorRequest, logger: Logger): CodeGeneratorResponse
+
+ /** Takes Scala binary version and returns suggested dependency Seq */
+ def suggestedDependencies: ScalaBinaryVersion => Seq[Artifact]
+
+ def registerExtensions(registry: ExtensionRegistry): Unit = {}
Review Comment:
the original code (still in use for scala 2.12 compile) does not have scaladoc so I don't want to make the 2 versions differ from each other
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org