lightbend / genjavadoc

A compiler plugin for generating doc’able Java source from Scala source
Other
58 stars 32 forks source link

Update to sbt 1.x #193

Closed raboof closed 5 years ago

raboof commented 5 years ago

We tried updating to sbt 1.x before, but it turned out that since f34a2d90fa2004d352e85f68f6a025c5bc6dd247 publishLocal no longer worked, and publishLocalSigned worked but did not create ivy metadata for com.typesafe.genjavadoc/genjavadoc-plugin_2.12.9

We would like to update to sbt 1.x, but should verify that the plugin is still properly released - perhaps moving to sbt-ci-release as well would help?

helena commented 5 years ago

@raboof what was the error you saw?

raboof commented 5 years ago

sbt publishLocal:

...
[info]  published genjavadoc-plugin_2.13.0 to /home/aengelen/.ivy2/local/com.typesafe.genjavadoc/genjavadoc-plugin_2.13.0/0.13_2.13.0+12-012acb3d/docs/genjavadoc-plugin_2.13.0-javadoc.jar
[info]  published ivy to /home/aengelen/.ivy2/local/com.typesafe.genjavadoc/genjavadoc-plugin_2.13.0/0.13_2.13.0+12-012acb3d/ivys/ivy.xml
[error] java.lang.IllegalStateException: Ivy file not found in cache for com.typesafe.genjavadoc#genjavadoc_2.13;0.13_2.13.0+12-012acb3d!
[error]         at sbt.internal.librarymanagement.ResolutionCache.getResolvedModuleDescriptor(ResolutionCache.scala:66)
[error]         at org.apache.ivy.core.deliver.DeliverEngine.deliver(DeliverEngine.java:111)
[error]         at org.apache.ivy.Ivy.deliver(Ivy.java:596)
[error]         at sbt.internal.librarymanagement.IvyActions$.$anonfun$deliver$2(IvyActions.scala:100)
[error]         at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error]         at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error]         at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error]         at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error]         at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error]         at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error]         at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error]         at xsbt.boot.Using$.withResource(Using.scala:10)
[error]         at xsbt.boot.Using$.apply(Using.scala:9)
[error]         at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error]         at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error]         at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error]         at xsbt.boot.Locks$.apply(Locks.scala:28)
[error]         at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error]         at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error]         at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error]         at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error]         at sbt.internal.librarymanagement.IvyActions$.deliver(IvyActions.scala:95)
[error]         at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:129)
[error]         at sbt.Classpaths$.$anonfun$publishTask$4(Defaults.scala:2416)
[error]         at sbt.Classpaths$.$anonfun$publishTask$4$adapted(Defaults.scala:2416)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:67)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:278)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]         at java.lang.Thread.run(Thread.java:748)
[error] (publishLocal) java.lang.IllegalStateException: Ivy file not found in cache for com.typesafe.genjavadoc#genjavadoc_2.13;0.13_2.13.0+12-012acb3d!
[error] Total time: 9 s, completed Sep 17, 2019 2:53:15 PM
raboof commented 5 years ago

sbt publishLocalSigned does complete successfully, but does not publish ivy metadata:

[info] Done packaging.
[error] gpg: using "0xC6EADDD5FF1F13F8" as default secret key for signing
[error] gpg: using "0xC6EADDD5FF1F13F8" as default secret key for signing
[error] gpg: using "0xC6EADDD5FF1F13F8" as default secret key for signing
[error] gpg: using "0xC6EADDD5FF1F13F8" as default secret key for signing
[info]  published genjavadoc-plugin_2.13.0 to /home/aengelen/.ivy2/local/com.typesafe.genjavadoc/genjavadoc-plugin_2.13.0/0.14.x/docs/genjavadoc-plugin_2.13.0-javadoc.jar.asc
[info]  published genjavadoc-plugin_2.13.0 to /home/aengelen/.ivy2/local/com.typesafe.genjavadoc/genjavadoc-plugin_2.13.0/0.14.x/jars/genjavadoc-plugin_2.13.0.jar.asc
[info]  published genjavadoc-plugin_2.13.0 to /home/aengelen/.ivy2/local/com.typesafe.genjavadoc/genjavadoc-plugin_2.13.0/0.14.x/docs/genjavadoc-plugin_2.13.0-javadoc.jar
[info]  published genjavadoc-plugin_2.13.0 to /home/aengelen/.ivy2/local/com.typesafe.genjavadoc/genjavadoc-plugin_2.13.0/0.14.x/srcs/genjavadoc-plugin_2.13.0-sources.jar.asc
[info]  published genjavadoc-plugin_2.13.0 to /home/aengelen/.ivy2/local/com.typesafe.genjavadoc/genjavadoc-plugin_2.13.0/0.14.x/jars/genjavadoc-plugin_2.13.0.jar
[info]  published genjavadoc-plugin_2.13.0 to /home/aengelen/.ivy2/local/com.typesafe.genjavadoc/genjavadoc-plugin_2.13.0/0.14.x/poms/genjavadoc-plugin_2.13.0.pom
[info]  published genjavadoc-plugin_2.13.0 to /home/aengelen/.ivy2/local/com.typesafe.genjavadoc/genjavadoc-plugin_2.13.0/0.14.x/poms/genjavadoc-plugin_2.13.0.pom.asc
[info]  published genjavadoc-plugin_2.13.0 to /home/aengelen/.ivy2/local/com.typesafe.genjavadoc/genjavadoc-plugin_2.13.0/0.14.x/srcs/genjavadoc-plugin_2.13.0-sources.jar

... which causes the following error when trying to use it with akka by choosing the newly-created release in project/Doc.scala and running sbt -Dakka.genjavadoc.enabled=true unidoc:

[warn]   /home/aengelen/.ivy2/local/com.typesafe.genjavadoc/genjavadoc-plugin_2.12.9/0.14.x/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/typesafe/genjavadoc/genjavadoc-plugin_2.12.9/0.14.x/genjavadoc-plugin_2.12.9-0.14.x.pom
[warn] ==== local-preloaded-ivy: tried
[warn]   /home/aengelen/.sbt/preloaded/com.typesafe.genjavadoc/genjavadoc-plugin_2.12.9/0.14.x/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn]   file:////home/aengelen/.sbt/preloaded/com/typesafe/genjavadoc/genjavadoc-plugin_2.12.9/0.14.x/genjavadoc-plugin_2.12.9-0.14.x.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.genjavadoc#genjavadoc-plugin_2.12.9;0.14.x: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]  Note: Unresolved dependencies path:
[warn]          com.typesafe.genjavadoc:genjavadoc-plugin_2.12.9:0.14.x ((sbtunidoc.GenJavadocPlugin.projectSettings) GenJavadocPlugin.scala#L18)
[warn]            +- com.typesafe.akka:akka-protobuf_2.12:2.6-SNAPSHOT ()
[error] sbt.librarymanagement.ResolveException: unresolved dependency: com.typesafe.genjavadoc#genjavadoc-plugin_2.12.9;0.14.x: not found
[error]         at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)

(reproduced with genjavadoc 012acb3)

SethTisue commented 5 years ago

(I'm interested in returning to this, I just haven't had time yet)

raboof commented 5 years ago

(agreed, the revert was just a temporary thing to be able to release, keeping this open since at some point we'd still want to move to sbt1 ;) )

SethTisue commented 5 years ago

fixed by #208