Skip to content

Only inline from current project sources under enableOptimizer #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2018

Conversation

retronym
Copy link
Member

@retronym retronym commented Mar 1, 2018

Otherwise we can inline bytecode public, but unstable, artifacts
from the standard library, as was see in:

scala/scala#6300 (comment)

Tested as follows:

% sbt publish-local

% cd /code/scala-partest
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 314c55a..df23fea 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1 +1 @@
-addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "1.0.13")
+addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "1.0-7aee2b537d30f227f2bb27ac6b1c09d5e94dcdf1")

% sbt
[info] Loading global plugins from /Users/jz/.sbt/0.13/plugins
[info] Loading project definition from /Users/jz/code/scala-partest/project
[info] Set current project to scala-partest (in build file:/Users/jz/code/scala-partest/)
> ++2.13.0-M2
[info] Setting version to 2.13.0-M2
[info] Reapplying settings...
[info] Set current project to scala-partest (in build file:/Users/jz/code/scala-partest/)
> show compile:compile::scalacOptions
[info] * -Xfatal-warnings
[info] * -feature
[info] * -deprecation
[info] * -unchecked
[info] * -Xlint
[info] * -opt:l:inline
[info] * -opt-inline-from:<sources>
[success] Total time: 0 s, completed 01/03/2018 11:19:54 AM
> set ScalaModulePlugin.enableOptimizerInlineFrom := "scala/*"
[info] Defining *:enableOptimizerInlineFrom
[info] The new value will be used by compile:compile::scalacOptions
[info] Reapplying settings...
[info] Set current project to scala-partest (in build file:/Users/jz/code/scala-partest/)
> show compile:compile::scalacOptions
[info] * -Xfatal-warnings
[info] * -feature
[info] * -deprecation
[info] * -unchecked
[info] * -Xlint
[info] * -opt:l:inline
[info] * -opt-inline-from:scala/*
[success] Total time: 0 s, completed 01/03/2018 11:20:13 AM
> ++2.12.4
[info] Setting version to 2.12.4
[info] Reapplying settings...
[info] Set current project to scala-partest (in build file:/Users/jz/code/scala-partest/)
> show compile:compile::scalacOptions
[info] Updating {file:/Users/jz/code/scala-partest/}scala-partest...
[info] Resolving jline#jline;2.14.5 ...
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scalap/2.12.4/scalap-2.12.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scalap;2.12.4!scalap.jar (2784ms)
[info] Done updating.
[info] * -Xfatal-warnings
[info] * -feature
[info] * -deprecation
[info] * -unchecked
[info] * -Xlint
[info] * -opt:l:inline
[info] * -opt-inline-from:scala/*

Otherwise we can inline bytecode public, but unstable, artifacts
from the standard library, as was see in:

scala/scala#6300 (comment)
@retronym retronym merged commit e4b0262 into scala:master Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant