These are chat archives for sbt/sbt

19th
Jan 2016
Dale Wijnand
@dwijnand
Jan 19 2016 00:02
@smarter talk to @Duhemm, he wired all that stuff up, he might know :)
Guillaume Martres
@smarter
Jan 19 2016 00:15
Oh, I've got an even simpler solution, look at the date of the jar for the compiled compiler-bridge retrieved from scratch, if it's older then 24 hours, refetch and recompile
there, no need to do some heroic sbt api hacking
Do you have a release schedule for 0.13.10?
Guillaume Martres
@smarter
Jan 19 2016 00:26
Or alternatively: is there a way to know if IvyActions#update actually retrieved new dependencies from the Internet or if everything was resolved from cache?
eugene yokota
@eed3si9n
Jan 19 2016 00:32

24 hours

I would rather not have a timer without some explicit setting

Do you have a release schedule for 0.13.10?

hopefully soonish. once some of the show stopper bugs are fixed.

Guillaume Martres
@smarter
Jan 19 2016 00:34
yes, I'd rather not use a timer too, it's a hacky solution if I can't find another way
eugene yokota
@eed3si9n
Jan 19 2016 00:35
sbt's chain resolver implements the logic for sbt's normal behavior
Guillaume Martres
@smarter
Jan 19 2016 00:35
I just need some way to know if a more recent version of a module exist
eugene yokota
@eed3si9n
Jan 19 2016 00:36
there's a field called publicationDate
Guillaume Martres
@smarter
Jan 19 2016 00:37
on ModuleReport yeah, but I'd need to compare the publicationDate of the module in cache with the publicationDate of the most recent version of the module
or alternatively, get a ModuleReport from cache, get its publicationDate, do an update of the module, get its publicationDate, compare the two
but that seems complicated
eugene yokota
@eed3si9n
Jan 19 2016 00:38
maybe I'm mixing up several layers of caches
are we talking about ivy cache or the bridge cache?
Guillaume Martres
@smarter
Jan 19 2016 00:39
well both, but mostly ivy cache
eugene yokota
@eed3si9n
Jan 19 2016 00:39
if hooked up correctly, i thought SNAPSHOTs are not cached to the ivy cache
Guillaume Martres
@smarter
Jan 19 2016 00:40
yes, but the bridge itself is special since it gets built locally
eugene yokota
@eed3si9n
Jan 19 2016 00:40
i suspect that compiler bridge cache could be caching things without respecting -SNAPSHOT because mostly we don't deal with changing compiler bridge
Guillaume Martres
@smarter
Jan 19 2016 00:40
so what I wanted to do is look at the source module corresponding to the compiler bridge
and if there's a newer version of this source module, rebuild the compiler bridge
this is surprisingly tricky
eugene yokota
@eed3si9n
Jan 19 2016 00:42
I'd say wipe it out when the version ends with -SNAPSHOT every time you boot up sbt
Guillaume Martres
@smarter
Jan 19 2016 00:42
how do I know that sbt has been restarted?
that seems like a nice solution if I can actually do that
eugene yokota
@eed3si9n
Jan 19 2016 00:44
a quick hack maybe something like object Foo { var isFirstTime = false }
Guillaume Martres
@smarter
Jan 19 2016 00:45
wow, that's ugly :)
eugene yokota
@eed3si9n
Jan 19 2016 00:46
yea. i'm sure there are more elegant solution that's less hacky
Guillaume Martres
@smarter
Jan 19 2016 00:47
maybe I can check if the compiler cache is empty or something
but I don't really understand how the compiler cache works
eugene yokota
@eed3si9n
Jan 19 2016 00:48
actually the compiler cache itself could do the wiping
var isFirstTIme = false effectively is the cache hit
Guillaume Martres
@smarter
Jan 19 2016 00:50
yeah, but I don't have access to the compiler cache from IvyComponentCompiler
eugene yokota
@eed3si9n
Jan 19 2016 00:50
true
Guillaume Martres
@smarter
Jan 19 2016 00:51
and again, I can't just add parameters to its constructor without breaking bincompat :/
or can I? It's private[compiler]
eugene yokota
@eed3si9n
Jan 19 2016 00:52
which class are you talking about again?
(dinner time soon, so I might have to drop out)
Guillaume Martres
@smarter
Jan 19 2016 00:53
IvyComponentCompiler is the one that compiles the compiler bridge
defined in ComponentCompiler.scala
I'll be off to sleep soon too
eugene yokota
@eed3si9n
Jan 19 2016 00:55
could you open issue on this so we dont forget?
gotta go
Guillaume Martres
@smarter
Jan 19 2016 00:55
alright, thanks for the help so far!
Tim Harper
@timcharper
Jan 19 2016 04:49
@eed3si9n scripted dependency-management/configurations fails with or without my patch
oh... it's supposed to
[warn]     This usage is deprecated and will be removed in sbt 1.0.
[info]     published ivy to /Users/timcharper/.ivy2/local/org.scala-sbt/main/0.13.10-devel/ivys/ivy.xml
About to run tests:
 * dependency-management/configurations

Running dependency-management / configurations
[error] x dependency-management / configurations [PENDING]
[error]    {line 14}  Command failed: compile failed
[success] Total time: 22 s, completed Jan 18, 2016 9:48:14 PM
Tim Harper
@timcharper
Jan 19 2016 04:56
green ! sbt/sbt#2399
Sam Halliday
@fommil
Jan 19 2016 09:59
@dwijnand many apologies, I lost a link you sent a week or so ago with an example of dynamic tasks that don't use macros. Do you still have that to hand?
Dale Wijnand
@dwijnand
Jan 19 2016 10:15
@fommil it was @eed3si9n's link
but essentially it was around flatMapping keys
Sam Halliday
@fommil
Jan 19 2016 10:23
Got the example
Oh you're kidding :-) I went and scrolled all the way up on my mobile to find that
Dale Wijnand
@dwijnand
Jan 19 2016 10:30
:D
Justin Kaeser
@jastice
Jan 19 2016 15:34
is it possible to get the configurations in which a key is defined?
Dale Wijnand
@dwijnand
Jan 19 2016 15:35
@jastice interesting question :+1:
do you know about inspect/inspect actual?
Justin Kaeser
@jastice
Jan 19 2016 15:36
in the repl, yes. I meant in the library
but maybe I am going about this the wrong way. I want to generate sources for any config that a specific key is defined in
Roman Landenband
@romansky
Jan 19 2016 18:21

Can't understand what I'm doing wrong
trying to publish to Sonatype, but when I do "publishSigned" it creates a ghost project and tries to publish it too
the relevant SBT- https://github.com/uniformlyrandom/jello/blob/master/build.sbt

➜  jello git:(master) ✗ sbt publishSigned
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=2G; support was removed in 8.0
[info] Loading global plugins from /Users/romansky/.sbt/0.13/plugins
[info] Loading project definition from /Users/romansky/Dropbox/Code/jello/project
[info] Set current project to jello (in build file:/Users/romansky/Dropbox/Code/jello/)
[info] Wrote /Users/romansky/Dropbox/Code/jello/jello/jvm/target/scala-2.11/jello-0.1.pom
[info] :: delivering :: default#jello_2.11;0.1-SNAPSHOT :: 0.1-SNAPSHOT :: integration :: Tue Jan 19 18:05:48 GMT 2016
[info]     delivering ivy file to /Users/romansky/Dropbox/Code/jello/target/scala-2.11/ivy-0.1-SNAPSHOT.xml
[info] Wrote /Users/romansky/Dropbox/Code/jello/target/scala-2.11/jello_2.11-0.1-SNAPSHOT.pom
[info] Wrote /Users/romansky/Dropbox/Code/jello/jello/js/target/scala-2.11/jello-0.1.pom
[info] :: delivering :: com.uniformlyrandom#jello;0.1 :: 0.1 :: release :: Tue Jan 19 18:05:48 GMT 2016
[info]     delivering ivy file to /Users/romansky/Dropbox/Code/jello/jello/js/target/scala-2.11/ivy-0.1.xml
[info] :: delivering :: com.uniformlyrandom#jello;0.1 :: 0.1 :: release :: Tue Jan 19 18:05:48 GMT 2016
[info]     delivering ivy file to /Users/romansky/Dropbox/Code/jello/jello/jvm/target/scala-2.11/ivy-0.1.xml
Please enter PGP passphrase (or ENTER to abort): %

I don't understand where the "default" 0.1-SNAPSHOT integration is coming from
Can't get rid of it =/

Dale Wijnand
@dwijnand
Jan 19 2016 18:22
Default is the org nane
And its probably your robot project
Disabile publishing of your root project
Roman Landenband
@romansky
Jan 19 2016 18:23
I understand, what am I doing wrong that it thinks its relevant?
How do I do this in a crossProject?
Dale Wijnand
@dwijnand
Jan 19 2016 18:25
I'm on mobile, Google it, it's voted in Stackoverflow
Your not doing anything "wrong"
Your just telling the root project, that aggregates the other projects, to publish
So it's trying to
. s/your/you're/
Roman Landenband
@romansky
Jan 19 2016 18:27
Googling !
Roman Landenband
@romansky
Jan 19 2016 18:38
Thanks for the help, this was the final solution uniformlyrandom/jello@8603381
Dale Wijnand
@dwijnand
Jan 19 2016 18:58
@romansky :+1: nice one
Can publishTo not be None?
Andrew Zurn
@AndrewZurn
Jan 19 2016 20:18
I'm packaging and publishing to Artifactory a child project in my multi module project, and am noticing that the sbt number is getting appended to the artifactId. Rather than ARTIFACT_ID_2.11, I'm getting ARTIFACT_ID_2.11_0.13, which is definitely not what I'm looking for, or need in order to convienently import the project as a dependency. Any ideas why this might be happening?
command I'm running to package and publish is sbt module-a/clean module-a/test module-a/package module-a/publish
Greg Symons
@gregsymons
Jan 19 2016 20:19
What's your publishing pattern?
For the publishing resolver, that is.
Andrew Zurn
@AndrewZurn
Jan 19 2016 20:19
which is the same command use in other project that look to be publishing in the manner I want
Greg Symons
@gregsymons
Jan 19 2016 20:19
Also, is the subproject an sbt plugin?
Andrew Zurn
@AndrewZurn
Jan 19 2016 20:20
it's a client of an api that is the other project in the multi-module project
Greg Symons
@gregsymons
Jan 19 2016 20:20
Does it have sbtPlugin := true?
Andrew Zurn
@AndrewZurn
Jan 19 2016 20:20
no
should it?
here are the variable I have in the root modules build file
Greg Symons
@gregsymons
Jan 19 2016 20:21
Not if it's not a plugin project... I was just double checking you hadn't accidentally set it.
Andrew Zurn
@AndrewZurn
Jan 19 2016 20:21
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { x => false },
resolvers ++= Seq(
Resolver.mavenLocal,
"Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
"Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/",
"Scalaz Bintray" at "https://dl.bintray.com/scalaz/releases",
... ARTIFACTORY urls... )
the base project does have that however
Greg Symons
@gregsymons
Jan 19 2016 20:21
The base project has sbtPlugin := true?
Andrew Zurn
@AndrewZurn
Jan 19 2016 20:22
lazy val commonSettings = Seq(
sbtPlugin := true,
organization := "xxxx",
version := "0.1.2.0-SNAPSHOT",
scalaVersion := "2.11.7",
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { x => false },
resolvers ++= Seq(
Resolver.mavenLocal,
"Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
"Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/",
"Scalaz Bintray" at "https://dl.bintray.com/scalaz/releases", ... )
Greg Symons
@gregsymons
Jan 19 2016 20:22
Is the base project an SBT plugin?
Andrew Zurn
@AndrewZurn
Jan 19 2016 20:22
definitely not, suppose that shouldn't be in there
Greg Symons
@gregsymons
Jan 19 2016 20:23
Nope... some how it got overridden as false in some of the modules and not in the one that's messed up, but that's why you're getting the sbt version in the name mangling.
Andrew Zurn
@AndrewZurn
Jan 19 2016 20:24
so it is more than likely it should be set to false, or can it be excluded all together (not sure of it's default value)
Greg Symons
@gregsymons
Jan 19 2016 20:24
The default value is false, so you can just get rid of it.
Andrew Zurn
@AndrewZurn
Jan 19 2016 20:24
perfecto, that was it
thanks sir!
@gregsymons :+1: