Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 22 2015 11:10
    japgolly commented #2066
  • Jun 22 2015 08:25
    keepscoding commented #2044
  • Jun 21 2015 03:24
    xerial commented #157
  • Jun 21 2015 00:10
    eed3si9n unlabeled #2057
  • Jun 21 2015 00:10

    eed3si9n on 0.13

    Adds bundledLauncherProj to all… Remove launcher tests Add unit tests to Travis and 3 more (compare)

  • Jun 21 2015 00:10
    eed3si9n closed #2057
  • Jun 21 2015 00:10

    eed3si9n on fixbuild

    (compare)

  • Jun 20 2015 18:42
    eed3si9n synchronize #2057
  • Jun 20 2015 18:42

    eed3si9n on fixbuild

    Fix typo (compare)

  • Jun 20 2015 18:23

    eed3si9n on fixbuild

    Adds bundledLauncherProj to all… Remove launcher tests Add unit tests to Travis and 1 more (compare)

  • Jun 20 2015 18:23
    eed3si9n synchronize #2057
  • Jun 20 2015 14:59

    eed3si9n on scalaversionbump

    (compare)

  • Jun 20 2015 14:59

    eed3si9n on 0.13

    Bumping up Scala version to 2.1… Try to keep bincompat Fixes #1666 and 1 more (compare)

  • Jun 20 2015 14:59
    eed3si9n unlabeled #2068
  • Jun 20 2015 14:59
    eed3si9n closed #2068
  • Jun 20 2015 14:59
    eed3si9n closed #1666
  • Jun 20 2015 14:57
    eed3si9n commented #2068
  • Jun 20 2015 12:55
    dwijnand commented #2068
  • Jun 20 2015 04:51
    eed3si9n synchronize #2068
  • Jun 20 2015 04:51

    eed3si9n on scalaversionbump

    Fixes #1666 (compare)

Owen Healy
@ellbur
e.g., if I have projects a and b, b depends on a, and a:test depends on b
this gives me a NullPointerException
but I feel like this should be basically the same as three projects, a, b and c, b depends on a, c (aka a:test) depends on a and b
nkgm
@nkgm
is there a hook to run code after a task has completed?
OlegYch
@OlegYch
ellbur make sure you declared your projects using lazy var
*lazy val
ritschwumm
@ritschwumm
@nkgm ususally you just define a new task that depends on the one you originally wanted to run
nkgm
@nkgm

@ritschwumm i'm trying to run some code after sbt-revolver's ~re-start. I tried the following:

lazy val sampleTask = taskKey[Int]("A sample task.")

sampleTask := {
  (reStart in Compile).value
  val sum = 1 + 2
  println("sum: " + sum)
  sum
}

and running sbt sampleTask only prints 3 and doesn't execute what re-start would normally do.

ritschwumm
@ritschwumm
@nkgm i had a similar problem, namely calling out to jEdit to clear its error list before ~compile triggered the compile task. i don't remember the details, but i could not find any satisfying solution.
in the end i re-implemented the ~ command under a different name :/
nkgm
@nkgm
@ritschwumm that sounds very unpleasant :smile:
however, i havent even got to the ~ point. can't even get it to trigger once
ritschwumm
@ritschwumm
@nkgm if you find a way, let me know - if you don't, i can post my code somewhere.
what do you want to do in your task, btw?
nkgm
@nkgm
i just want to touch a file, so an external node watcher can run newman
atm watching target is unreliable as there's two batches of writes so it would trigger twice
and i want to get up to speed with sbt anyway, so this seemed like a sane task
@ritschwumm if it's not too much hassle, wouldn't mind taking a look
ritschwumm
@ritschwumm
feels sad to say this, but after about 10 year and 17 plugins written for it i still don't feel "up to speed" with sbt...
i'm never confident my code is actually correct, or if it just works by accident.
nkgm
@nkgm
i feel the sentiment...
ritschwumm
@ritschwumm
otoh, after having to go back to ant and maven for half a year - sbt beats those hands down when it comes to making a non-trivial build work :)
nkgm
@nkgm
true again but i do miss the simplicity of ant
OlegYch
@OlegYch
the what?
eugene yokota
@eed3si9n
for anyone who wants to try the new syntax for sbt shell and build.sbt, there's now a plugin for that. https://twitter.com/eed3si9n/status/879333519926972416
Sukant Hajra
@shajra
I could have sworn that whatDependsOn was giving me tab-completion on the various artifacts resolved in the resolver.
Sukant Hajra
@shajra
Okay, I think I figured it out. I guess you have to run dependencyTree first or maybe some similar command.
Dale Wijnand
@dwijnand
yeah it caches the module graph
I'd say raise an issue, but then it looks like whatDependsOn is not meant to be user-facing API? https://github.com/jrudolph/sbt-dependency-graph/blob/v0.8.2/src/main/scala/net/virtualvoid/sbt/graph/DependencyGraphKeys.scala#L73
Nic Flores
@nicflores
how do you call it? I've tried this:
> whatDependsOn org.scalaz.stream
[error] Expected whitespace character
[error] Expected 'org.quasar-analytics'
[error] Expected 'org.typelevel'
[error] whatDependsOn org.scalaz.stream
[error]                                ^
>
Sukant Hajra
@shajra
@nicflores if you have the sbt-depenency-graph plugin enabled
> whatDependsOn org.scalaz scalaz-core_2.11 7.2.9
...
Nic Flores
@nicflores
thanks! @shajra that should help in some troubleshooting I'm currently looking into
Edmondo Porcu
@edmondo1984
Our build in SBT fails because it's multi-module and we are using a java library that internally use reflection. It seems like not all classes are correctly unloaded between one module and the other
We basically end up wrapping all the methods that use reflection in Thread.currentThread()setContextClassLoader
Vladimir Kostyukov
@vkostyukov
Hello! Is there a way express the following “cyclic” dependency in sbt?
lazy val core = (project in file("core"))
   .dependsOn(LocalProject("impl") % "test")

lazy val impl = (project in file("impl"))
  .dependsOn(core)
Obviously, this fails to compile with [error] Cyclic reference involving.
Edmondo Porcu
@edmondo1984
@vkostyukov there should not be a way to express cyclic dependencies in software :))
OlegYch
@OlegYch
it's not really cyclic though
split it into three projects
Vladimir Kostyukov
@vkostyukov
@OlegYch What do you mean? Like moving the tests out of core into tests that depends on both core and impl. Yeah I can see that working.
Sukant Hajra
@shajra
I'm having a hard time finding in the documentation where ++ is mentioned for cross-compilation builds.
I see +, though.
Sukant Hajra
@shajra
(I found it).
Sukant Hajra
@shajra
cross-compiling is confusing me a lot.
Just when I think I understand how it's supposed to be set up, I run into something that doesn't work the way I'd prefer.
Sukant Hajra
@shajra
Does it make sense that it matters what order things are specified in .aggregate?
I'd have thought dependency resolution would make the order not matter.
eugene yokota
@eed3si9n
ordering in .aggregate should not matter
Dale Wijnand
@dwijnand
@vkostyukov that's sbt/sbt#2698
Kåre Blakstad
@kareblak
I'm using sbt docker. This task doesn't read any input, so I want a version of this task where an inputKey is being parsed and this value is set like (imageNames in docker).map(_.copy(tag = inputValue))... How can I accomplish something like that? This is a sbt docker example, but should be valid for all cases where one would like user input to non-input task.