lightbend-labs / dbuild

Multi-project build tool, based on sbt.
https://lightbend-labs.github.io/dbuild
Other
83 stars 14 forks source link

Support for bintray sbt plugin #158

Closed gkossakowski closed 7 years ago

gkossakowski commented 9 years ago

Projects using bintray sbt plugin cannot be built by dbuild at the moment. The problem has been originally reported as sbt/sbt-testng-interface#4. @cunei has investigated it and concluded that dbuild needs special support for bintray plugin:

Yep. The bintray-sbt plugin, according to its source, overrides publishTo, publish, publishConfiguration, and credentials (and other stuff). Subsequently, dbuild overwrites publishTo (so that the artifacts end up in its own cache), but assumes publish will be unchanged and will actually publish to the rewritten publishTo. So this won't work, and dbuild will need to work around that, either by disabling the bintray plugin or by rewriting publish in order to set it /again/ to the default one, which will probably do the trick.

Until explicit support for bintray arrives we'll need to get rid of bintray settings by forking projects using it. See for example gkossakowski/sbt-testng-interface@41b39ec59491adfeb93b52390d62bb52afee73fc.

I set priority to medium because this issue forces us to keep forks of projects we are building around.

SethTisue commented 8 years ago

this hasn't been causing me any trouble in the Scala community build in the past year. maybe not an issue anymore

well, with perhaps one exception: https://github.com/scala/community-builds/pull/290

SethTisue commented 7 years ago

@cunei I'm seeing this in ScalaMock here: https://scala-ci.typesafe.com/job/scala-2.12.x-integrate-community-build/1055/consoleFull, even with dbuild 0.9.7-RC1

ScalaMock is not the only project in the community build that uses bintray-sbt 0.3.0. I'm not sure what the difference is

SethTisue commented 7 years ago

akka-http, too, at https://scala-ci.typesafe.com/job/scala-2.12.x-integrate-community-build/1056/consoleFull:

[akka-http] Running "compile" in: akka-parsing
[akka-http] [warn] Credentials file /home/jenkins/.bintray/.credentials does not exist
[akka-http] Publishing: akka-parsing
[akka-http] bintray-sbt requires your bintray credentials.
[akka-http] Enter bintray username: java.util.NoSuchElementException: None.get
SethTisue commented 7 years ago

hit this twice more recently — had to fork akka-sse and akka-contrib-extras to get around it

SethTisue commented 7 years ago

hit this again with scalameta in https://github.com/scala/community-builds/pull/472

the bintray plugin was long unmaintained, but was recently moved to the sbt org. perhaps there's a possibility of addressing this now from the plugin's end

dwijnand commented 7 years ago

Strictly WRT the None.get case I think it should be possible to change sbt-bintray, not by special-casing sbt-bintray in dbuild - an acceptable variant on https://github.com/sbt/sbt-bintray/pull/69 would suffice (see my comments at the end).

SethTisue commented 7 years ago

Strictly WRT the None.get case I think it should be possible to change sbt-bintray, not by special-casing sbt-bintray in dbuild

yeah but based on @cunei's remarks (quoted by Grzegorz at the top of this ticket), the problem is more fundamental than that, I think — working around the None.get would likely only expose further problems...?

this is getting to be a bigger and bigger problem for the community build, as more projects adopt Bintray — we're up to nine forked projects over this one issue.

is there any chance you guys could give this issue a look and arrive at a fix or workaround that doesn't require forking projects? whether the fix is in dbuild or sbt-bintray or some combination...? (or are you maxed out until sbt 1.0 is out?)

dwijnand commented 7 years ago

I've put it on my overflow list, hopefully I can carve out some time to work on it. But generally, yeah, we're all out on sbt 1 atm.

SethTisue commented 7 years ago

I'm finding that the following combination works:

@cunei so, you can close this ticket 🎉