These are chat archives for sbt/sbt

21st
May 2016
Tim Harper
@timcharper
May 21 2016 00:13

@edmondo1984 That can be a difficult problem; if they're related, then I'd maybe consider creating a suite dependency which brings in your dependencies.

If they're completely unrelated... first.. why do you care?

Second... you can define an Object in ~/.sbt/0.13/plugins/SomeFile.scala.. but that would be an awful way to solve this.

Matthew de Detrich
@mdedetrich
May 21 2016 07:30
@pfn Thanks I will look into it
Sam Halliday
@fommil
May 21 2016 10:44
@lxol if you're happy with it, I'll cut java7-file-watchers 1.0.0 today
just doing some housekeeping
argh, wrong room
trepidacious
@trepidacious
May 21 2016 11:58
What's the easiest way to generate some source in an sbt project? It's specific to that project, should I still make a plugin?
Tim Kellogg
@tkellogg
May 21 2016 15:00
Hi Everyone, I'm new here and I have a rather involved question. I'm fine if we move elsewhere, I just need to understand how to approach the problem
I'm part of a large corporation that has their own build system, and it has it's own dependency resolution system. I'm wondering if I can wrap SBT or make an SBT plugin that completely disables ivy dependency resolution and uses our own system
looking through the source, it looks like SBT is tied rather directly to ivy (I'm looking at 1.0 development)
Perry
@pfn
May 21 2016 15:05
@trepidacious, by adding a task to sourceGenerators
Tim Kellogg
@tkellogg
May 21 2016 15:06
Our current build system is somewhat similar to Google's Bazel (http://bazel.io/) - that it's designed to build whole trees of source code from scratch, rather than pulling dependencies in as JARs. But that means all dependencies have to be imported into our build system and can't rely on Ivy
It seems that building Scala code is less trivial than we had imagined, so our current Scala build tools for our build system don't work terribly well.
anyway, I'd love any support and/or direction anyone can give
Perry
@pfn
May 21 2016 15:09
have bazel build your artifacts into a local m2repository
then have sbt read from it
or just dump everything into unmanagedJars
and don't use dependencies at all
Tim Kellogg
@tkellogg
May 21 2016 15:11
ok, that's one solution. I was thinking more along the lines of, how can I make a pull request to SBT to cut the direct dependency on Ivy?
Perry
@pfn
May 21 2016 15:11
you cannot
ivy is an intrinsic part of sbt at the moment
Tim Kellogg
@tkellogg
May 21 2016 15:11
is Ivy that core to SBT that it couldn't survive without it?
Perry
@pfn
May 21 2016 15:12
yes
Tim Kellogg
@tkellogg
May 21 2016 15:12
hmmm, okay thanks
Perry
@pfn
May 21 2016 15:12
you can disable artifact resolution
Tim Kellogg
@tkellogg
May 21 2016 15:12
well, there's something
Perry
@pfn
May 21 2016 15:12
but you can't disable ivy
ivy is the basis for configurations and multiproject builds in sbt
Tim Kellogg
@tkellogg
May 21 2016 15:13
how do I disable artifact resolution?
Perry
@pfn
May 21 2016 15:14
override update to return an empty UpdateReport or set offline := true
of course your build will fail if you have dependencies...
Tim Kellogg
@tkellogg
May 21 2016 15:16
well, that's a start
Simon Hafner
@reactormonk
May 21 2016 19:04
How can I add arbitrary dependencies to my meta-project? libraryDependencies doesn't seem to be it.
Eh oops.
trepidacious
@trepidacious
May 21 2016 20:48
@pfn I was trying to work out where to put the code for the task though?
trepidacious
@trepidacious
May 21 2016 21:01
@pfn I found a description of doing it by making a plugin project separate to the main project, then using this plugin in the main project to get the task for code generation, it seemed like there might be an easier way
Perry
@pfn
May 21 2016 21:02
@trepidacious, in build.sbt