These are chat archives for sbt/sbt

9th
Apr 2015
Michael Loster
@milost
Apr 09 2015 11:29
Hi can someone explain to me why sbt keeps creating folders "scala-2.10" and "test-2.10"?
Dale Wijnand
@dwijnand
Apr 09 2015 12:56
@bitbender have a look at sbt/sbt#1959 it should explain why, and it's an attempt to improve on the situation
Re-reading, it doesn't link to the original change, which is sbt/sbt#1799
Michael Loster
@milost
Apr 09 2015 13:19
thx
Dale Wijnand
@dwijnand
Apr 09 2015 15:03
np
Will Sargent
@wsargent
Apr 09 2015 15:24
SBT server support in Intellij IDEA: https://youtrack.jetbrains.com/issue/SCL-8400
eugene yokota
@eed3si9n
Apr 09 2015 15:26
There are some development in progress for sbt-remote-control (sbt server) to make that happen
Jacek Laskowski
@jaceklaskowski
Apr 09 2015 15:34
Hi
Good morning to those in -8h timezone!
eugene yokota
@eed3si9n
Apr 09 2015 15:36
I'm at UTC-4:00
Jacek Laskowski
@jaceklaskowski
Apr 09 2015 15:37
is it 12:37 now?
eugene yokota
@eed3si9n
Apr 09 2015 15:37
11:37 in the morning
Jacek Laskowski
@jaceklaskowski
Apr 09 2015 15:37
am seeing compilation errors for an autoplugin with scoverage on
it works without scoverage plugin
does this ring any bell to anyone?
eugene yokota
@eed3si9n
Apr 09 2015 15:40
not sure
for a while they use to run compile tasks against the same target in parallel iirc, and that was a problem
Jacek Laskowski
@jaceklaskowski
Apr 09 2015 15:41
scala.tools.nsc.interactive.RangePositions$ValidateException: Synthetic tree [875] contains nonsynthetic tree [874]
that’s the exception that fails builds :(
eugene yokota
@eed3si9n
Apr 09 2015 15:42
minimize the issue and bring it up to the plugin authors
Jacek Laskowski
@jaceklaskowski
Apr 09 2015 15:43
working on it
Jacek Laskowski
@jaceklaskowski
Apr 09 2015 15:52
[info] ======= Position error
[info] Synthetic tree [875] contains nonsynthetic tree [874]
[info] == Enclosing tree [875] of type Select at [257]CommonSettingsPlugin.scala
[info] 
[info] [L  12        ] #875    [257]           Select     // Select(Select(Select(Ident(sbt), Keys), organization), set)
[info] 
[info] == Enclosed tree [874] of type Select at [243:255]CommonSettingsPlugin.scala
[info] 
[info] [L  12        ] #874    [243:255]       Select     // organization 
[info] 
[info] 
[info] While validating #1203
[info] [L   4        ] #1203   [46:507]        PackageDef // sbtplugin
[info] 
[info] Children:
[info]   [L   4 P# 1203] #43     [54:76]         Select     // sbtplugin
[info]   [L   6 P# 1203] #45     [78:90]         Import     // sbt._
[info]   [L   7 P# 1203] #280    [91:104]        Import     // Keys._
[info]   [L   9 P# 1203] #1202   [106:507]       ModuleDef  // CommonSettingsPlugin extends AutoPlugin {
[info] =======
does it say anything to anyone?
eugene yokota
@eed3si9n
Apr 09 2015 15:54
if you need help, Stackoverflow might be a better forum to get answers
Jacek Laskowski
@jaceklaskowski
Apr 09 2015 15:55
there was an issue with -Yrangepos in Scala somewhere
I remember something similar with specs2
eugene yokota
@eed3si9n
Apr 09 2015 15:57
or Typesafe Subscription (http://typesafe.com/subscription). I (or others who know better) would answer any question within 1 biz day.
Jacek Laskowski
@jaceklaskowski
Apr 09 2015 15:58
thanks @eed3si9n
etorreborre/specs2#213
Jacek Laskowski
@jaceklaskowski
Apr 09 2015 16:13
yup. that’s it. I’m compiling with Scala 2.10 with -Yrangepos enabled
dunno why it’s happening this way
eugene yokota
@eed3si9n
Apr 09 2015 16:24
speaking of Stackoverflow, I haven't answered sbt questions in a while. do you guys have any suggestion for question(s) I should look into?
otherwise I would just pop a few from the top of the Unanswered stack that doesn't have IDE or plugin tags - http://stackoverflow.com/questions/tagged/sbt
Dale Wijnand
@dwijnand
Apr 09 2015 17:13
just noticed yesterday how badass your stackoverflow reputation is
eugene yokota
@eed3si9n
Apr 09 2015 17:15
I used to be active when it was becoming popular, so I have early stakes on generic questions like how one should write a README
Dale Wijnand
@dwijnand
Apr 09 2015 17:16
sure, but that's also a great question and answer
eugene yokota
@eed3si9n
Apr 09 2015 17:16
in today's more stringent stackoverflow, it probably would be thrown out as too subjective
Dale Wijnand
@dwijnand
Apr 09 2015 17:17
at great loss, I think that example proves it's good
eugene yokota
@eed3si9n
Apr 09 2015 17:18
you are top runner for the last 30 days on sbt tag - http://stackoverflow.com/tags/sbt/topusers
Dale Wijnand
@dwijnand
Apr 09 2015 17:19
yeah been trying to be more active
been too shy in the past
eugene yokota
@eed3si9n
Apr 09 2015 17:20
we really should encourage ppl to ask/answer stackoverflow more
Dale Wijnand
@dwijnand
Apr 09 2015 17:21
This one is about sbt-native-packager (via the play sbt plugin) but it laces quite a bit in sbt packaging mechanics
http://stackoverflow.com/questions/28457973/packaging-an-artifact-without-publishing-it/28644208#28644208
I didn't go all the way down the rabbit hole trying to figure out why, and just posted my findings (in my newfound "stop being shy, dimwit" attitude)
bbl
eugene yokota
@eed3si9n
Apr 09 2015 17:22
yea. I think it's a good attitude since we all have finite resources to do opensource
Daniel Capo Sobral
@dcsobral
Apr 09 2015 17:59
@eed3si9n You should have used the “share” link, which contains your user id. There’s a badge for lots of people suddenly looking at an old question from a link of yours. :)
eugene yokota
@eed3si9n
Apr 09 2015 18:01
nice to know
I now remembered why I'm not as active on stackoverflow recently. it's only helps one (+ a few) ppl. whereas if I fix the website, ppl can go there later. maybe some of the docs should be more like Q&A like the how to section
Dale Wijnand
@dwijnand
Apr 09 2015 19:26
I don't know I often find my sbt answer on StackOverflow, I feel it works well as a place for Q&A.
Whereas the docs have more flexibility in guiding through explaining different parts of SBT as a whole.
As a reference, I really like how Guava did their docs (https://code.google.com/p/guava-libraries/wiki/GuavaExplained) particularly the Idea Graveyard, but also the Glossary and the Philosophy pages
The docs should be the king for explaining design and intent, where the Q&A about niggly details and some niche integrations, as well as simple support, works well crowd-sourced on StackOverflow
Dale Wijnand
@dwijnand
Apr 09 2015 21:26
"JAR download process initiating... May take hours if you live in Asia or Australia." lol
eugene yokota
@eed3si9n
Apr 09 2015 21:56
most Github issues are tagged now
Dale Wijnand
@dwijnand
Apr 09 2015 21:56
nice thanks
Sam Halliday
@fommil
Apr 09 2015 22:32
sbt/sbt#1952 maybe reopen?
eugene yokota
@eed3si9n
Apr 09 2015 22:33
I was suspecting that the OP put that in build.sbt
Sam Halliday
@fommil
Apr 09 2015 22:33
nope, it's our ENSIME launch script
it's definitely in plugins.sbt
the way we launch ENSIME is that we create a little {build.sbt, project/build.properties, project/plugins.sbt} project with the ENSIME dependency. Then get sbt to resolve/download all the jars and tell us where they are. Then we launch that from emacs.
we're basically using sbt as a deployment tool because it is cross-platform
eugene yokota
@eed3si9n
Apr 09 2015 22:35
and the error message is the same?
Sam Halliday
@fommil
Apr 09 2015 22:36
that bug report is from someone trynig to launch ENSIME on windows, using exactly the same definition as a linux/osx project
lemme link you to the project...
eugene yokota
@eed3si9n
Apr 09 2015 22:36
From #1952. this one says build.sbt:
...\proj\scala\test\build.sbt:1: error: not found: value addMavenResolverPlugin
addMavenResolverPlugin
^
Sam Halliday
@fommil
Apr 09 2015 22:36
hopefully you can see through the lisp
well... that error message.... who am I to argue with the magical ".sbt" parser gods?
my take on it is that windows sbt ignores the build.properties file, but the OP swears he is running 0.13.8 of the script.
eugene yokota
@eed3si9n
Apr 09 2015 22:39
ensime/ensime-server#924 does say:
...\AppData\Local\Temp\ensime_update_3440Ylu\project\plugins.sbt:1: error: not found: value addMavenResolverPlugin addMavenResolverPlugin ^ [error] Type error in expression Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore
Sam Halliday
@fommil
Apr 09 2015 22:40
yup, but line one of build.sbt is "import sbt._" so I dispute the parser warning
this is an auto-generated build.sbt, the OP can't change it without running his own fork of ENSIME
aaah, sorry, yes that one says plugins.sbt
eugene yokota
@eed3si9n
Apr 09 2015 22:42
I wonder if this is related to #1963, and it's about sbt.version=0.13.8\n in the file vs sbt.version=0.13.8\r\n
Sam Halliday
@fommil
Apr 09 2015 22:42
hmm, looks like the OP screwed up the report
ouch!
it would be the opposite of that. Our files have \n (however emacs interprets that)
Dale Wijnand
@dwijnand
Apr 09 2015 22:43
"value addMavenResolverPlugin addMavenResolverPlugin" ??
Sam Halliday
@fommil
Apr 09 2015 22:44
I should create a new tag for ENSIME. "closed because reported by Vim user" :grin:
aliased with "+1 Troll"
eugene yokota
@eed3si9n
Apr 09 2015 22:45
vim is awesome when you're in docker containers
Sam Halliday
@fommil
Apr 09 2015 22:45
ppppfh!
I have FIVE versions of emacs in my containers! https://github.com/ensime/ensime-docker/blob/shippable-1.0/Dockerfile#L63
eugene yokota
@eed3si9n
Apr 09 2015 22:46
i actually want to add vim mode to sbt so you can split screens, scroll, and do all sorts of modern vim things
Sam Halliday
@fommil
Apr 09 2015 22:46
evil-mode does it all already, I'm sure
that's M-x evil-mode to the uninitiated
Dale Wijnand
@dwijnand
Apr 09 2015 22:47
oh nvm I see what it actually reads on multi-line (simulated with fakeAddMavenResolverPlugin):
/Users/dnw/Desktop/t-2015-04-09.2345/project/plugins.sbt:1: error: not found: value fakeAddMavenResolverPlugin
fakeAddMavenResolverPlugin
^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
eugene yokota
@eed3si9n
Apr 09 2015 22:47
maybe the first thing we add is :q to quit sbt
Sam Halliday
@fommil
Apr 09 2015 22:47
(although, I've been known to apt-get install nano ; nano foo in docker :blush:
Dale Wijnand
@dwijnand
Apr 09 2015 22:48
sbt/sbt#1374
let's not add a :q too :P
Sam Halliday
@fommil
Apr 09 2015 22:49
I exit sbt with C-x C-k
sorry, C-x k
I think. These things become burned into muscle memory.
eugene yokota
@eed3si9n
Apr 09 2015 22:49
the beauty of vim-quit (:q) is that Scala REPL already respects it
Josh Suereth
@jsuereth
Apr 09 2015 22:50
I just tried to duplicate without ensime in windows and it does not fail
i suspect ensime is adding a few strings twice, or something
i.e. I can use mavne resolver on my windows 7 box
eugene yokota
@eed3si9n
Apr 09 2015 22:50
awesome
Dale Wijnand
@dwijnand
Apr 09 2015 22:51
@eed3si9n TIL
eugene yokota
@eed3si9n
Apr 09 2015 22:54
@dwijnand it's basically :quit but REPL allows you to use a non-ambiguous prefix
Dale Wijnand
@dwijnand
Apr 09 2015 22:56
doh, of course!
does anyone know of a good way to get some sort of output to identify which sbt script is in use?
Josh Suereth
@jsuereth
Apr 09 2015 22:57
@fommil Yeah, I think it must be writing the "addMavenResolver" line twice. I'm unable to duplciate on windows7
and I don't really use emacs.....
Dale Wijnand
@dwijnand
Apr 09 2015 22:58
@jsuereth if you're thinking that because of "??", I was confused by the error message, but because it was all on one line
Sam Halliday
@fommil
Apr 09 2015 22:59
@jsuereth the line is exactly once
Josh Suereth
@jsuereth
Apr 09 2015 22:59
hmm
Sam Halliday
@fommil
Apr 09 2015 22:59
and why would it succeed in OS X and Linux?
do you have emacs installed? I could give you a solid test case if so
Josh Suereth
@jsuereth
Apr 09 2015 23:00
i dunno, it's odd
no. I'd like a git project I can checkout that duplicates the isue though
I just created the files by hand and am not seeing the issue
g2g though, dinner. I'll check back in a bit
if you can get me a non-emacs reproduction, I'll work on it
Sam Halliday
@fommil
Apr 09 2015 23:04
well the project that emacs produces should be enough. Can you check what distribution of the sbt script the OP is using?
it's just those 3 files. Should be trivial to read them off the ensime-startup.el file
eugene yokota
@eed3si9n
Apr 09 2015 23:08
if it's sbt.version=0.13.8\n vs sbt.version=0.13.8\r\n, that'll explain why only on Windows
Sam Halliday
@fommil
Apr 09 2015 23:09
the ticket you pointed at was the other way round. Doesn't Java readline factor all this out?
can you try generating the local project on windows with the \n instead of \r\n and see if you can reproduce?
oh, btw, the scoverage plugin folk reckon there is a bug in the cache resolver of 0.13.8
I'll try to get them to submit a ticket for it
Josh Suereth
@jsuereth
Apr 09 2015 23:11
Can do
Sam Halliday
@fommil
Apr 09 2015 23:11
has something to do with the "it" phase not picking up on the "provided" phase
eugene yokota
@eed3si9n
Apr 09 2015 23:11
yea. we'd like report if there's regression
Sam Halliday
@fommil
Apr 09 2015 23:11
which is added by the scoverage plugin. I'll ping them to report it.
eed3si9n @eed3si9n burrito time
Josh Suereth
@jsuereth
Apr 09 2015 23:36
it's not a line separator issue (@eed3si9n @fommil )
I just tried (for all files) \r\n, \n and \r
Sam Halliday
@fommil
Apr 09 2015 23:36
hmm
Josh Suereth
@jsuereth
Apr 09 2015 23:36
all of them work
Sam Halliday
@fommil
Apr 09 2015 23:36
I guess the particular sbt launcher that the OP is using is maybe to blame
he calls it "the native sbt". That ring any bells?
Josh Suereth
@jsuereth
Apr 09 2015 23:36
(as I suspected, sbt is over-eager on EOL parsing, so we'd ignore legitimate \r when in unix, e.g.)
hmm, that's what I'm using
the MSI install
Sam Halliday
@fommil
Apr 09 2015 23:38
Iguess we'll have to wait for him to post some more details
I'm not seeing the bug myself, but it means we have to revert our use of the maven resolver
Josh Suereth
@jsuereth
Apr 09 2015 23:43
sure. It looks like some of the sbt scripts actually have issues with windows line endings
not the ones we provide, because we don't read that in a BASH file...
Sam Halliday
@fommil
Apr 09 2015 23:44
by OP I mean #1952