These are chat archives for sbt/sbt

17th
May 2016
Erik Bakker
@eamelink
May 17 2016 08:32
I created a custom config lint, which adds some additional scalac options. Now lint:compile does what I want, and compile:compile also does what I want. However, I'd prefer plain old compile task to be 'provided' by compile:compile, but now its provided by lint:compile. How is this determined? Can't find anything about it in the docs.
Dale Wijnand
@dwijnand
May 17 2016 08:34
Not sure, but you could just force it: compile := (compile in Compile).value
Erik Bakker
@eamelink
May 17 2016 08:35
Thanks, completely overlooked that, wanting to get to the bottom of it. But that seems reasonable :)
Dale Wijnand
@dwijnand
May 17 2016 08:36
always better to fix the actual problem though..
Erik Bakker
@eamelink
May 17 2016 08:36
Yes, guess I'll dive into Scope.delegates
Hmm, it does not work:
[error] found : sbt.TaskKey[sbt.inc.Analysis]
[error] required: sbt.inc.Analysis
[error] compile := (compile in Compile))
Dale Wijnand
@dwijnand
May 17 2016 08:42
those parens don't make sense and there's a missing .value there
Erik Bakker
@eamelink
May 17 2016 08:43
Right, thanks
Erik Bakker
@eamelink
May 17 2016 09:28
@dwijnand we fixed it by explicitly adding Compile to the project configuration in our plugin: override def projectConfigurations = List(Compile, autoImport.Lint)
Now in the delegate chain compile comes before lint.
Simon Hafner
@reactormonk
May 17 2016 09:29
Is there a way to remove a plugin?
s3ni0r
@s3ni0r
May 17 2016 09:35
Hi everyone, i'm new to sbt, and i was wondering if it was possible to download scala libraries using sbt command line, i'm trying to use the scala REPL to play with scalaz library, i need to run :require command to include scalaz from ivy cache.
Simon Hafner
@reactormonk
May 17 2016 09:36
I just have my playgrounds with a build.sbt with a few library requirements.
s3ni0r
@s3ni0r
May 17 2016 09:39
@reactormonk hmm ok
Dale Wijnand
@dwijnand
May 17 2016 10:20
in the sbt shell you can also use set libraryDependencies += /* scalaz */ and then call update and console
Sanjiv Sahayam
@ssanj
May 17 2016 10:33
@s3ni0r I've got a small project called dabble that lets you "dabble" with scala libraries through SBT and the REPL. You can use it without a build.sbt. I use it for scalaz and a bunch of others: https://github.com/ssanj/dabble
s3ni0r
@s3ni0r
May 17 2016 12:30
@dwijnand @ssanj :+1:
Arno den Hartog
@acdenhartog
May 17 2016 12:31
Hey, I tried running "partest" on the scala repository on Windows, but hit this error:
[error] (test/it:testOnly) java.io.IOException: Cannot run program "E:\Code\scala./pull-binary-libs.sh": CreateProcess error=193, %1 is not a valid Win32 application
So is this an issue with SBT itself saying that ".sh" file is not a Win32 application? Or does this bug come from SBT or somewhere else?
I was able to run "E:\Code\scala./pull-binary-libs.sh" manually from command prompt, then removed a line from the build file and "sbt partest" worked as expected...
Perry
@pfn
May 17 2016 12:55
sh files don't run on Windows natively
Arno den Hartog
@acdenhartog
May 17 2016 12:56
But doesn't everyone have git installed? And "E:\Code\scala./pull-binary-libs.sh" in cmd does just work...
Perry
@pfn
May 17 2016 12:57
that doesn't mean anything
only exe works for CreateProcess on windows
sh files require it to be a shell command
Arno den Hartog
@acdenhartog
May 17 2016 12:58
so... for compatiblity the build.sbt should be edited to use a shell command instead?
Perry
@pfn
May 17 2016 12:59
eg sh -c pull-binary-libs.sh
Arno den Hartog
@acdenhartog
May 17 2016 12:59
would be nice if CreateProcess tries to run the shell command itself instead of creating this rather pointless incompatibility between platforms...
Perry
@pfn
May 17 2016 13:01
that's windows
CreateProcess is a win 32 api
Arno den Hartog
@acdenhartog
May 17 2016 13:02
oh bother; but the ! method could at least try to be more platform independent.
I mean seriously, if the scala repository itself is creating bugs, while they are trying to support Windows, can you really just say: "oh no, that's not our problem, users can figure it out"
At very least SBT could give a more informative error message about those ".sh" files.
FelAl
@FelAl
May 17 2016 13:07
Do you want "We are sorry but .sh files don't work on Windows" instead of " java.io.IOException: Cannot run program "E:\Code\scala./pull-binary-libs.sh": CreateProcess error=193, %1 is not a valid Win32 application"? @acdenhartog
Arno den Hartog
@acdenhartog
May 17 2016 13:12
I suppose what I want is for that ! method to switch over to a command line whenever it is not an exe; then let Windows itself decide what file types are incompatible.
Perry
@pfn
May 17 2016 13:26
yeah, up to the build script writer to decide that
OlegYch
@OlegYch
May 17 2016 18:44
how do i override a setting in all projects?
in ThisBuild doesn't seem to take effect
Dale Wijnand
@dwijnand
May 17 2016 19:20
In code or in the shell.
There's set every a := b in the shell
Doesn't always work, but have a go
Brandon Weber
@bweber
May 17 2016 19:52
anybody having issues with the typesafe repo? module not found: org.scala-lang#scala-library;2.10.4
Simon Hafner
@reactormonk
May 17 2016 19:55
How can you get full compiler output, aka which file it's currently working on?
Sam Halliday
@fommil
May 17 2016 19:57
@reactormonk sbt-ensime has the ability to compile individual files, I realise that's not exactly what you're asking for but could be useful
Simon Hafner
@reactormonk
May 17 2016 19:58
@fommil, how do I invoke it?
Sam Halliday
@fommil
May 17 2016 19:58
read the docs
OlegYch
@OlegYch
May 17 2016 20:12
dwijnand in *.sbt
Perry
@pfn
May 17 2016 20:15
@OlegYch in Global often does
Arno den Hartog
@acdenhartog
May 17 2016 20:17
@Perry incoming pull request, lolololol
OlegYch
@OlegYch
May 17 2016 20:49
nope in Global doesn't do anything at all
am i correct to assume settings from .sbt are appended after settings from .scala?
Dale Wijnand
@dwijnand
May 17 2016 20:52
@OlegYch make a local autoplugin that autotriggers
OlegYch
@OlegYch
May 17 2016 20:52
how do you mean?
oh i guess you meant that for reactormonk
Perry
@pfn
May 17 2016 20:54
@OlegYch yes, .sbt is after Project.settings(...)
Simon Hafner
@reactormonk
May 17 2016 21:00
How can I ask which resolver gives sbt a dependency?
Perry
@pfn
May 17 2016 21:32
what?
oh, you mean where dependencies are resolved from
you can check the resolution-cache xml files
hmm, nevermind, it says sbt-chain, which is worthless
you can get it out of UpdateReport @reactormonk
Simon Hafner
@reactormonk
May 17 2016 21:37
Thanks, I'll take a look.
Perry
@pfn
May 17 2016 22:14
huh? sbt 1.0 is going to be on scala 2.11?
eugene yokota
@eed3si9n
May 17 2016 22:15
it could be Scala 2.12, not sure yet
Perry
@pfn
May 17 2016 22:17
screwing around with getting sbt-android to build on it
waiting for bintray update checker yo show up on central
but, I could have just publish local...
Eric K Richardson
@ekrich
May 17 2016 22:20
2.11 and 2.12 compatible?
So basically Java 8?
eugene yokota
@eed3si9n
May 17 2016 22:22
if sbt adopts Scala 2.12 as the build language, then you'd need JDK8 to run it
ReiReiRei
@ReiReiRei
May 17 2016 22:22
Hi anyone , does anyone know sbt plugin that is deploying assembled jar on remote server each time I made new build
Eric K Richardson
@ekrich
May 17 2016 22:36
yeah, the idea was that it might good to drop Scala 2.10 support for sbt 1.0. JDK6 and 7 are already EOL. http://www.oracle.com/technetwork/java/eol-135779.html