These are chat archives for sbt/sbt

7th
Nov 2016
Matt Hicks
@darkfrog26
Nov 07 2016 00:04
Never mind...apparently I had too old a version of SBT. I completely deleted it and re-installed sbt-launch.jar and now it works fine.
P. Oscar Boykin
@johnynek
Nov 07 2016 00:25
I'm trying to build a project with 2.12 and getting a confusing error
but, it I build using ++2.12.0 I get: 14:23 [error] Modules were resolved with conflicting cross-version suffixes in {file:/home/oscar-unencrypted/oss/bijection/}bijection-core: 14:23 [error] org.scala-lang.modules:scala-xml _2.11, _2.12
I'm confused because this project actually has no dependencies.
P. Oscar Boykin
@johnynek
Nov 07 2016 00:44
when I run with ++2.10.5 I get: [warn] Binary version (2.11) for dependency org.scala-lang#scala-library;2.11.8
[warn] in com.twitter#bijection-core_2.10;0.9.3 differs from Scala binary version in project (2.10).
but it builds.
I don't see why it thinks the scala-library from itself is not the right version if I am using the ++2.10.5 to set the scala version... But of course, since I know almost nothing about sbt (and this build has 4 years of cruft) who knows what the real issue is.
wedens
@wedens
Nov 07 2016 08:51
how do I write taskA <<= taskB.dependsOn(taskC) without deprecated syntax?
I'd suppose taskA := { taskC.value; taskB.value } but it runs in parallel
wedens
@wedens
Nov 07 2016 08:58
ah. sorry. should've read migration guide
Dale Wijnand
@dwijnand
Nov 07 2016 09:11
Cool, the migration guide helped :)
pingbat
@pingbat
Nov 07 2016 09:44
I'm trying to upgrade to 0.13.13 from 0.13.9 but I'm getting a error on start up in one of my projects: java.lang.NoSuchMethodError
scala.reflect.internal.TreeInfo.isConstructorWithDefault(Lscala/reflect/internal/Trees$Tree;)Z
That happens while it's process the imports in a scala file I have in my "project" directory
What's the best way to track it down? I've tried commenting out the import in question and changing the code so it compile, but the error just moves to the next import
Samy Dindane
@Dinduks
Nov 07 2016 10:05
Hi. What repository contains sbt-0.13.13.jar?
Samy Dindane
@Dinduks
Nov 07 2016 10:20
Answering my question: https://repo.typesafe.com/typesafe/ivy-releases has it.
Dale Wijnand
@dwijnand
Nov 07 2016 10:20
that's right
Grzegorz Slowikowski
@gslowikowski
Nov 07 2016 17:18
Hi. I've had issue with sbt-release plugin and one of my artifacts wasn't published during release process. I'd like to republish it, but ideally, without rebuilding (I have .pom, all .jar and all .asc files in target directory). Is there a way to run publishSigned without rebuilding?
eugene yokota
@eed3si9n
Nov 07 2016 17:27
@johnynek you might be running into sbt/sbt#2786
eugene yokota
@eed3si9n
Nov 07 2016 17:36
or sbt/sbt#1466
P. Oscar Boykin
@johnynek
Nov 07 2016 17:36
Thanks for the help @eed3si9n !
eugene yokota
@eed3si9n
Nov 07 2016 17:36
you can ignore sbt/sbt#1466 basically
I'll post a workaround for 2786
P. Oscar Boykin
@johnynek
Nov 07 2016 17:37
I am using scalafmt in this build
eugene yokota
@eed3si9n
Nov 07 2016 17:38
yea. I'm looking at bijectio build's master
P. Oscar Boykin
@johnynek
Nov 07 2016 17:38
(develop is the current “HEAD”, master is last published. Kind of old-school style there)
@eed3si9n sorry that build is so ugly. Some OSGI stuff someone contributed, and evolving up from very old SBT with the minimal change each time.
eugene yokota
@eed3si9n
Nov 07 2016 17:41
actually I was on develop
the build looks fine to me
P. Oscar Boykin
@johnynek
Nov 07 2016 17:42
We still use Project( )...
which I think you said is not the preferred way?
maybe that was defaultSettings or something….
eugene yokota
@eed3si9n
Nov 07 2016 17:43
oh.. that could actually cause some issues with autoplugins then
you just need to move the location of your settings
P. Oscar Boykin
@johnynek
Nov 07 2016 17:43
eugene yokota
@eed3si9n
Nov 07 2016 17:43
  Project(id = id,
          base = file(id),
          settings = sharedSettings ++ Seq(Keys.name := id,
                                           previousArtifact := youngestForwardCompatible(name),
                                           binaryIssueFilters ++= ignoredABIProblems))
that needs to be Project(id = id, base = file(id)).settings(....)
P. Oscar Boykin
@johnynek
Nov 07 2016 17:44
since I get an error that project. must be assigned to a val.
eugene yokota
@eed3si9n
Nov 07 2016 17:44
Project() contstructor itself is actually not bad. it's the settings parameter that we don't like
but explaining that's too complicated, so we usually say "don't use Project(...)`
P. Oscar Boykin
@johnynek
Nov 07 2016 17:45
I see.
(I mean, I don’t but I hear the rule now)...
eugene yokota
@eed3si9n
Nov 07 2016 17:46
that allows auto plugin to inject the settings in the right order of plugin-to-plugin dependencies basically
def module(name: String) = {
  val id = "bijection-%s".format(name)
  Project(id = id,
          base = file(id)).
    settings(sharedSettings ++
      Seq(Keys.name := id,
          previousArtifact := youngestForwardCompatible(name),
          binaryIssueFilters ++= ignoredABIProblems))
}
Jules Ivanic
@guizmaii
Nov 07 2016 19:22
Hi

I’m trying to do something like this:

lazy val npmStart = taskKey[Unit]("run npm start for dev env")
npmStart := {
  val frontendDir: File = baseDirectory.value / frontEndName
  Process("npm install", frontendDir) #> (frontendDir / "install.log") #&& Process("npm start", frontendDir) run
}
(runAll in ThisBuild) <<= { npmStart runBefore (runAll in ThisBuild) }

The command runAll is never launched because npm start does not end. Is there a way to « simulate » its end ?

FYI, I know that it can be done like this:
(runAll in ThisBuild) <<= { (runAll in ThisBuild) dependsOn(npmStart)  }
but with this solution it’s launched at the same time as runAll and I don’t want this behavior.
it’s aslo not a good solution because if npm start fail, runAll will continue
Jules Ivanic
@guizmaii
Nov 07 2016 19:27
:’(