These are chat archives for sbt/sbt

15th
Jul 2015
Jason Zaugg
@retronym
Jul 15 2015 04:31
@eed3si9n Could you please add me to https://bintray.com/sbt ?
eugene yokota
@eed3si9n
Jul 15 2015 04:35
@retronym sent an invite
Jason Zaugg
@retronym
Jul 15 2015 04:36
cheers
Pierre Dal-Pra
@pdalpra
Jul 15 2015 12:10
Hi guys
On the SBT plugin that I maintain (SBT plugin for Gatling), I use a custom test framework
The settings goes to two separate configurations gatling and gatling-it, one for tests, one for integration tests
test:test delegates to gatling:test, all is well for that config... but it:test does not however seems to delegate to gatling-it:test... any ideas ?
Dale Wijnand
@dwijnand
Jul 15 2015 12:28
I wonder if you have to configure bare Defaults.itSettings in addition to inConfig(GatlingIt)(Defaults.itSettings)
how does test:test delegate to gatling:test?
Pierre Dal-Pra
@pdalpra
Jul 15 2015 12:29
yep sorry, got caught in something else, forgot to provide a link : https://github.com/gatling/gatling-sbt/blob/master/src/main/scala/io/gatling/sbt/GatlingPlugin.scala
@dwijnand that's a good question... it just does :D
that's what inspect tells me
Dale Wijnand
@dwijnand
Jul 15 2015 12:32
so it runs things in src/gatling/test?
Pierre Dal-Pra
@pdalpra
Jul 15 2015 12:33
not exactly, since I rewired the source directories to use test/it: https://github.com/gatling/gatling-sbt/blob/master/src/main/scala/io/gatling/sbt/GatlingPlugin.scala#L64
Dale Wijnand
@dwijnand
Jul 15 2015 12:33
sorry src/gatling/scala I meant
hmm
Pierre Dal-Pra
@pdalpra
Jul 15 2015 12:42
This message was deleted

> inspect test:test ... [info] Delegates: [info] test:test [info] runtime:test [info] compile:test ...

inspect test
...
[info] Delegates:
[info] gatling:test
[info] test:test
[info] runtime:test
[info] compile:test
...```

> inspect test:test
...
[info] Delegates:
[info]     test:test
[info]     runtime:test
[info]     compile:test
...

> inspect test
...
[info] Delegates:
[info]     gatling:test
[info]     test:test
[info]     runtime:test
[info]     compile:test
...
> inspect test
...
[info] Provided by:
[info]     {file:/Users/pierredalpra/Work/Gatling/gatling-sbt-plugin-demo/}gatling-sbt-plugin-demo/gatling:test
[info] Defined at:
[info]     (sbt.Defaults) Defaults.scala:412

> inspect test:test
...
[info] Provided by:
[info]     {file:/Users/pierredalpra/Work/Gatling/gatling-sbt-plugin-demo/}gatling-sbt-plugin-demo/test:test
[info] Defined at:
[info]     (sbt.Defaults) Defaults.scala:412
Weird :D
Dale Wijnand
@dwijnand
Jul 15 2015 12:46
indeed
I don't have time now, but if you're truely interested you could clone sbt, check out v0.13.8 tag, open it in an IDE, then launch your demo sbt with remote jvm debug port, then connect to that port in your IDE, and breakpoint in that function to figure out what the values are.
Or you can open a SO question and put a bounty on it :D
Pierre Dal-Pra
@pdalpra
Jul 15 2015 12:53
I'll try to tinker a bit further, I'm sure there's a way to do it I do not know yet ;)
Jean Helou
@jeantil
Jul 15 2015 14:55
hello !
in sbt-release there is a settingKey[String=>String] that computes the "next version" for a project.
I can define a custom setting key to apply it to the version of the build but I was wondering if there was a way to apply it directly in the sbt console ?
Pierre Dal-Pra
@pdalpra
Jul 15 2015 14:57
set nextVersion := … should do what you want
Jean Helou
@jeantil
Jul 15 2015 14:59
hmmm, that forces me to define a settingKey[String] named nextVersion to inspect the combined settings
for now I have
val showNextVersion = settingKey[String]("the future version once releaseNextVersion has been applied to it")
val showReleaseVersion = settingKey[String]("the future version once releaseNextVersion has been applied to it")
showReleaseVersion <<= (version, releaseVersion)((v,f)=>f(v))
showNextVersion <<= (version, releaseNextVersion)((v,f)=>f(v))
but I was wondering if I could do away with the settingKey definitions ...
Pierre Dal-Pra
@pdalpra
Jul 15 2015 15:12
AFAIK, except using consoleProject to get your hands on a ‘SBTful’ REPL, it seems you cannot
however, from consoleProject: releaseVersion.eval(version.eval)/ releaseNextVersion.eval(version.eval)
Jean Helou
@jeantil
Jul 15 2015 20:32
interesting, thanks