twitter / finatra

Fast, testable, Scala services built on TwitterServer and Finagle
https://twitter.github.io/finatra/
Apache License 2.0
2.27k stars 410 forks source link

[develop] com.twitter#scrooge-sbt-plugin;19.2.0-SNAPSHOT: not found with JDK 11 #486

Closed christhalinger closed 5 years ago

christhalinger commented 5 years ago

Trying to build develop brach with JDK 11 results in:

[warn]  module not found: com.twitter#scrooge-sbt-plugin;19.2.0-SNAPSHOT
[warn] ==== typesafe-ivy-releases: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/com.twitter/scrooge-sbt-plugin/scala_2.12/sbt_1.0/19.2.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.twitter/scrooge-sbt-plugin/scala_2.12/sbt_1.0/19.2.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== local: tried
[warn]   /home/opc/.ivy2/local/com.twitter/scrooge-sbt-plugin/scala_2.12/sbt_1.0/19.2.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/twitter/scrooge-sbt-plugin_2.12_1.0/19.2.0-SNAPSHOT/scrooge-sbt-plugin-19.2.0-SNAPSHOT.pom
[warn] ==== local-preloaded-ivy: tried
[warn]   /home/opc/.sbt/preloaded/com.twitter/scrooge-sbt-plugin/19.2.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn]   file:////home/opc/.sbt/preloaded/com/twitter/scrooge-sbt-plugin_2.12_1.0/19.2.0-SNAPSHOT/scrooge-sbt-plugin-19.2.0-SNAPSHOT.pom
[warn] ==== sbt-plugin-releases: tried
[warn]   https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.twitter/scrooge-sbt-plugin/scala_2.12/sbt_1.0/19.2.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== sonatype-snapshots: tried
[warn]   https://oss.sonatype.org/content/repositories/snapshots/com/twitter/scrooge-sbt-plugin_2.12_1.0/19.2.0-SNAPSHOT/scrooge-sbt-plugin-19.2.0-SNAPSHOT.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.twitter#scrooge-sbt-plugin;19.2.0-SNAPSHOT: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.twitter:scrooge-sbt-plugin:19.2.0-SNAPSHOT (scalaVersion=2.12, sbtVersion=1.0)
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      com.twitter:scrooge-sbt-plugin:19.2.0-SNAPSHOT (scalaVersion=2.12, sbtVersion=1.0) (/home/opc/finatra/project/plugins.sbt#L8-9)
[warn]        +- default:finatra-build:0.1.0-SNAPSHOT (scalaVersion=2.12, sbtVersion=1.0)
[error] sbt.librarymanagement.ResolveException: unresolved dependency: com.twitter#scrooge-sbt-plugin;19.2.0-SNAPSHOT: not found
cacoco commented 5 years ago

@christhalinger did you follow the guidelines in the CONTRIBUTING doc?

christhalinger commented 5 years ago

Did not, no, but:

cthalinger@tw-mbp-cthalinger:~/finatra-develop-dependencies$ curl -s https://raw.githubusercontent.com/twitter/dodo/develop/bin/build | bash -s -- --no-test finatra
[info] Determining projects...
[info] ------------------------------------------------------------------------
[info] Dodo Build Order:
[info]   util
[info]   scroogecore
[info]   finagle
[info]   scrooge
[info]   twitter-server
[info]  
[info] ------------------------------------------------------------------------
[info] Building util
[info] ------------------------------------------------------------------------
[info]  
[info] --- git-sha @ b3083ac2677e4ce1365798304b4cec27ddeaed4b ---
[info]  
[info] ./sbt --warn update
bad /Users/cthalinger/.dodo/clones/util/sbt-launch.jar.  delete /Users/cthalinger/.dodo/clones/util/sbt-launch.jar and run ./sbt again.
[info] Command failed. Retrying...
bad /Users/cthalinger/.dodo/clones/util/sbt-launch.jar.  delete /Users/cthalinger/.dodo/clones/util/sbt-launch.jar and run ./sbt again.
[info] Command failed. Retrying...
bad /Users/cthalinger/.dodo/clones/util/sbt-launch.jar.  delete /Users/cthalinger/.dodo/clones/util/sbt-launch.jar and run ./sbt again.
[info] Command failed, max attempts: 3 exceeded.
christhalinger commented 5 years ago

After removing the file as suggested above I am seeing this:

OpenJDK 64-Bit Server VM warning: Option AggressiveOpts was deprecated in version 11.0 and will likely be removed in a future release.
Unrecognized VM option 'UseParNewGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

which I've seen before when building finatra. Let me see if I can fix that.

christhalinger commented 5 years ago

Alright. After "fixing" all sbt files like this:

diff --git a/sbt b/sbt
index 9e21a00..c2977e6 100755
--- a/sbt
+++ b/sbt
@@ -25,12 +25,6 @@ java -ea                          \
   $SBT_OPTS                       \
   $JAVA_OPTS                      \
   -Djava.net.preferIPv4Stack=true \
-  -XX:+AggressiveOpts             \
-  -XX:+UseParNewGC                \
-  -XX:+UseConcMarkSweepGC         \
-  -XX:+CMSParallelRemarkEnabled   \
-  -XX:+CMSClassUnloadingEnabled   \
-  -XX:ReservedCodeCacheSize=128m  \
   -XX:SurvivorRatio=128           \
   -XX:MaxTenuringThreshold=0      \
   -Xss8M                          \

I was able to build the dependencies. But when trying to build finatra I get:

[info] Loading settings from plugins.sbt,build.sbt ...
[info] Loading project definition from /Users/cthalinger/finatra/project
[info] Updating ProjectRef(uri("file:/Users/cthalinger/finatra/project/"), "finatra-build")...
[warn] Choosing local for com.twitter#scrooge-sbt-plugin;19.2.0-SNAPSHOT
[warn] Choosing local for com.twitter#scrooge-generator_2.12;19.2.0-SNAPSHOT
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.codehaus.plexus:plexus-utils:3.0.22 is selected over {1.5.4, 3.0.17}
[warn]      +- org.apache.maven:maven-artifact:3.3.9              (depends on 3.0.22)
[warn]      +- org.apache.maven:maven-model:3.3.9                 (depends on 3.0.22)
[warn]      +- org.eclipse.sisu:org.eclipse.sisu.plexus:0.3.2     (depends on 3.0.17)
[warn]      +- com.twitter:scrooge-generator_2.12:19.2.0-SNAPSHOT (depends on 1.5.4)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Loading settings from build.sbt ...
[info] Loading settings from build.sbt ...
[info] Resolving key references (22733 settings) ...
[info] Set current project to root (in build file:/Users/cthalinger/finatra/)
[info] Updating injectSlf4j
[info] Resolved injectSlf4j dependencies
[error] coursier.ResolutionException: Encountered 2 error(s) in dependency resolution:
[error]     com.twitter:finagle-core_2.12:19.2.0-SNAPSHOT:
[error]         not found:
[error]             /Users/cthalinger/.ivy2/local/com.twitter/finagle-core_2.12/19.2.0-SNAPSHOT/ivys/ivy.xml
[error]             https://repo1.maven.org/maven2/com/twitter/finagle-core_2.12/19.2.0-SNAPSHOT/finagle-core_2.12-19.2.0-SNAPSHOT.pom
[error]             https://oss.sonatype.org/content/repositories/releases/com/twitter/finagle-core_2.12/19.2.0-SNAPSHOT/finagle-core_2.12-19.2.0-SNAPSHOT.pom
[error]             https://oss.sonatype.org/content/repositories/snapshots/com/twitter/finagle-core_2.12/19.2.0-SNAPSHOT/finagle-core_2.12-19.2.0-SNAPSHOT.pom
[error]     com.twitter:util-slf4j-api_2.12:19.2.0-SNAPSHOT:
[error]         not found:
[error]             /Users/cthalinger/.ivy2/local/com.twitter/util-slf4j-api_2.12/19.2.0-SNAPSHOT/ivys/ivy.xml
[error]             https://repo1.maven.org/maven2/com/twitter/util-slf4j-api_2.12/19.2.0-SNAPSHOT/util-slf4j-api_2.12-19.2.0-SNAPSHOT.pom
[error]             https://oss.sonatype.org/content/repositories/releases/com/twitter/util-slf4j-api_2.12/19.2.0-SNAPSHOT/util-slf4j-api_2.12-19.2.0-SNAPSHOT.pom
[error]             https://oss.sonatype.org/content/repositories/snapshots/com/twitter/util-slf4j-api_2.12/19.2.0-SNAPSHOT/util-slf4j-api_2.12-19.2.0-SNAPSHOT.pom
[error] (injectSlf4j / coursierResolutions) coursier.ResolutionException: Encountered 2 error(s) in dependency resolution:
[error]     com.twitter:finagle-core_2.12:19.2.0-SNAPSHOT:
[error]         not found:
[error]             /Users/cthalinger/.ivy2/local/com.twitter/finagle-core_2.12/19.2.0-SNAPSHOT/ivys/ivy.xml
[error]             https://repo1.maven.org/maven2/com/twitter/finagle-core_2.12/19.2.0-SNAPSHOT/finagle-core_2.12-19.2.0-SNAPSHOT.pom
[error]             https://oss.sonatype.org/content/repositories/releases/com/twitter/finagle-core_2.12/19.2.0-SNAPSHOT/finagle-core_2.12-19.2.0-SNAPSHOT.pom
[error]             https://oss.sonatype.org/content/repositories/snapshots/com/twitter/finagle-core_2.12/19.2.0-SNAPSHOT/finagle-core_2.12-19.2.0-SNAPSHOT.pom
[error]     com.twitter:util-slf4j-api_2.12:19.2.0-SNAPSHOT:
[error]         not found:
[error]             /Users/cthalinger/.ivy2/local/com.twitter/util-slf4j-api_2.12/19.2.0-SNAPSHOT/ivys/ivy.xml
[error]             https://repo1.maven.org/maven2/com/twitter/util-slf4j-api_2.12/19.2.0-SNAPSHOT/util-slf4j-api_2.12-19.2.0-SNAPSHOT.pom
[error]             https://oss.sonatype.org/content/repositories/releases/com/twitter/util-slf4j-api_2.12/19.2.0-SNAPSHOT/util-slf4j-api_2.12-19.2.0-SNAPSHOT.pom
[error]             https://oss.sonatype.org/content/repositories/snapshots/com/twitter/util-slf4j-api_2.12/19.2.0-SNAPSHOT/util-slf4j-api_2.12-19.2.0-SNAPSHOT.pom
cacoco commented 5 years ago

@christhalinger that error makes it look like the building of the dependencies failed somewhere. Is there any other output that would suggest things did not build?

yufangong commented 5 years ago

Hi @christhalinger, after building finagle, I was able to see its publishing the jar locally: Was finagle-core succesfully built on your branch? JDK 8 in my case, i'll try to use JDK 11 to reproduce.


[info] Done packaging.
[info] :: delivering :: com.twitter#finagle-core_2.12;19.2.0-SNAPSHOT :: 19.2.0-SNAPSHOT :: integration :: Fri Feb 15 14:11:32 PST 2019
[info]  delivering ivy file to /Users/yufang/.dodo/clones/finagle/finagle-core/target/scala-2.12/ivy-19.2.0-SNAPSHOT.xml
[info]  published finagle-core_2.12 to /Users/yufang/.ivy2/local/com.twitter/finagle-core_2.12/19.2.0-SNAPSHOT/poms/finagle-core_2.12.pom
[info]  published finagle-core_2.12 to /Users/yufang/.ivy2/local/com.twitter/finagle-core_2.12/19.2.0-SNAPSHOT/jars/finagle-core_2.12.jar
[info]  published finagle-core_2.12 to /Users/yufang/.ivy2/local/com.twitter/finagle-core_2.12/19.2.0-SNAPSHOT/srcs/finagle-core_2.12-sources.jar
[info]  published finagle-core_2.12 to /Users/yufang/.ivy2/local/com.twitter/finagle-core_2.12/19.2.0-SNAPSHOT/docs/finagle-core_2.12-javadoc.jar
[info]  published ivy to /Users/yufang/.ivy2/local/com.twitter/finagle-core_2.12/19.2.0-SNAPSHOT/ivys/ivy.xml
[success] Total time: 52 s, completed Feb 15, 2019 2:11:32 PM```
cacoco commented 5 years ago

Closing for now. We're actively working on JDK 11 support, so stay tuned. Thanks!