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)

Michael Pollmeier
@mpollmeier
would you like me to add this to the docs, or create a stackoverflow question with answer?
I'll wrap up a PR for neo-sbt-scalafmt shortly
Dale Wijnand
@dwijnand
resolvedScoped is a pretty advanced topic. But a stackoverflow question and answer can't hurt, can it.
s3ni0r
@s3ni0r

Hi everyone, i have a custom resolver in my build.sbt file that's not challenged when resolving dependencies, these are my revolvers

resolvers ++= Seq(
      Resolver.sonatypeRepo("snapshots")
      ,Resolver.sonatypeRepo("releases")
      ,Resolver.typesafeRepo("releases")
      ,"spray repo" at "http://repo.spray.io"
      ,"SpinGo OSS" at "http://spingo-oss.s3.amazonaws.com/repositories/releases"
    )

and this is the warning i get :

[info] Resolving com.spingo#op-rabbit-core_2.11;1.2.1 ...
[warn]     module not found: com.spingo#op-rabbit-core_2.11;1.2.1
[warn] ==== local: tried
[warn]   /root/.ivy2/local/com.spingo/op-rabbit-core_2.11/1.2.1/ivys/ivy.xml
[warn] ==== local-preloaded-ivy: tried
[warn]   /root/.sbt/preloaded/com.spingo/op-rabbit-core_2.11/1.2.1/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn]   file:////root/.sbt/preloaded/com/spingo/op-rabbit-core_2.11/1.2.1/op-rabbit-core_2.11-1.2.1.pom
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/spingo/op-rabbit-core_2.11/1.2.1/op-rabbit-core_2.11-1.2.1.pom

i tried both sbt 13.8 and 13.15 and got the same result, do you guys have any idea about this? thanks for your help

OlegYch
@OlegYch
that probably means your config is not actually applied
eg the resolvers are applied to different project
s3ni0r
@s3ni0r
yeah i have 3 modules
and the resolvers above are included in the modules that uses the needed dependency
it suddenly stopped working
s3ni0r
@s3ni0r
Problem solved it was a module dependency issue, thanks everyone :)
Jose C
@jmcardon
@dwijnand a few days later it seems most people are on board sort of
with the style proposal
:D
Dale Wijnand
@dwijnand
Yep! :)
Ryan Williams
@ryan-williams

are multi-module projects always configured from the root?

I want to have a multi-module SBT project where the SBT modules are also git submodules with their own build.sbt's, that can be built as stand-alone projects when cloned by themselves / separately from the any multi-module context.

The root project build configs would describe tasks related to interactions between the modules: rebuilding modules that depend on other modules, etc., but without repeating module-specific configurations that already exist in each module's build configs.

Can a root project play nicely with modules' existing SBT configs?

OlegYch
@OlegYch
no, projects can only be configured at the root
Jose C
@jmcardon
@ryan-williams like you want each subproject in it's own repo?
Ryan Williams
@ryan-williams
@jmcardon correct; each subproject is its own repo, but I also develop them together in an umbrella repo that contains each one as a submodule: https://github.com/hammerlab/pageant and it would be nice to be able to add tooling/config that pertains to multiple modules, or how they relate to one another, at that level
Ryan Williams
@ryan-williams

some larger context is that i feel that with appropriate build- and VCS- tooling a person should be able to have the best of both of the {mono,poly}-repo worlds: upgrading a bunch of inter-connected components in lockstep when that is desired (e.g. a single commit to an umbrella repo that upgrades the submodule SHAs of its submodule-repos) while still letting the component projects exist and be developed/forked in a standalone way.

git submodules basically do exactly what is needed here on the VCS front, and i'm trying to figure out whether I can get SBT to handle it as well. it seems philosophically aligned with SBT's whole "recursive project definitions" design, but afaict ppl don't use it this way and current SBT may not make this feasible

Jose C
@jmcardon
ah... ironically I made a proposal to get rid of those sort of definitions
because of the complications in style convergence within sbt
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 :/