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)

OlegYch
@OlegYch
you could load projects from another build with ProjectRef, but there are some complications
eg only one set of plugins per build
Jose C
@jmcardon
These complications is part of the proposal... Like jumping between projects doing this results in a lot of uglyness
Ryan Williams
@ryan-williams
@jmcardon yea that makes sense, i think what i want here is pretty different from that though, maybe i shouldn't have mentioned it. i just want my build configs, like my libraries, to do specific things and outsource/depend on other builds/libraries for their things. having to configure all modules' builds in the top level of a multi-module repo is a smell according to this view: it's only appropriate to handle cross-module concerns at that level, modules themselves should be cloneable/buildable in isolation from other things that they might be grouped with in higher-level contexts
@OlegYch very interesting, yea that's kind of what i'm interested in finding out; it doesn't seem like people are doing what i'm imagining today and i don't expect that it has accidentally been supported all this time without ppl wanting it / using it that way
Jose C
@jmcardon
No no definitely do mention it
I think any pov with reasonable explanation is valid and beneficial to discussion
OlegYch
@OlegYch
fwiw i do it every day, but like i said it's not exactly reliable
Ryan Williams
@ryan-williams
@jmcardon haha I just meant that comparing "proper recursive/tree-structure of modules and their builds" to the infamous "SBT is recursively defined [in terms of nested project/dirs]" thing is likely to mislead about what i'm after (the former, not the latter)
@OlegYch interesting, any example repos i can look at? forcing all the modules to have the same plugin version (in the SHAs where I mash them together into a faux-monorepo) seems not insurmountable
i have them all building off of my own parent plugin thing anyway where i fastidiously put anything that i find myself repeating in more than one module's definition (and sometimes in just one :) )
Jose C
@jmcardon
I guess the ProjectRef issue I ran into trying to do something similar is partially why I ended up towards the multi module thing
I can see from a DevOps perspective where you're coming from
OlegYch
@OlegYch
i think you'll find a bunch of examples using ProjectRef mostly in context of 'depending on a git repo'
Ryan Williams
@ryan-williams
i have some skeletal attempts to do the cross-module configuring that i want in my umbrella-repo's build.sbt, but it's basically dead code / never worked, and i just kind of manually propagate invalidated depdencies and things myself
cool, thanks for these pointers y'all
OlegYch
@OlegYch
Owen Healy
@ellbur
Maybe this is a silly question, but I was wondering why circular dependencies to "test" don't work
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