You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "spangaer (via GitHub)" <gi...@apache.org> on 2023/05/04 12:44:09 UTC

[GitHub] [incubator-pekko] spangaer commented on a diff in pull request #305: Enable inliner for Scala 2

spangaer commented on code in PR #305:
URL: https://github.com/apache/incubator-pekko/pull/305#discussion_r1184962375


##########
project/PekkoInlinePlugin.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, derived from Akka.
+ */
+
+import sbt.Keys._
+import sbt._
+import sbt.plugins.JvmPlugin
+
+object PekkoInlinePlugin extends AutoPlugin {
+  override def trigger: PluginTrigger = allRequirements
+
+  override def requires: Plugins = JvmPlugin
+
+  val enabled = !sys.props.contains("pekko.no.inline")
+
+  private val flagsFor212 = Seq(
+    "-opt-inline-from:org.apache.pekko.**",
+    "-opt:l:inline")
+
+  private val flagsFor213 = Seq(
+    "-opt-inline-from:org.apache.pekko.**",

Review Comment:
   I guess you get away with this and possibly even want this this with the main pekko repo, but in all other case `<sources>` is probably the safer choice?
   
   Well even here it's obviously the safer choice, but it would also inline fewer utilities than you aim to achieve?



-- 
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