These are chat archives for sbt/sbt

17th
Jan 2017
andyr
@arobson73
Jan 17 09:05
which book has best guide on sbt ? scala cookbook ?
Dale Wijnand
@dwijnand
Jan 17 09:33
sbt in Action
ka4eli
@ka4eli
Jan 17 10:03
I'm using deploy-ssh plugin and got error every time I'm trying to use ssh key instead of password. ```
SSH_MSG_DISCONNECT: 2 Too many authentication failures
Both with local vagrant and with rackspaxe cloud.
Have anybody faced such problems with this plugin?
andyr
@arobson73
Jan 17 10:25
@dwijnand so the typos in the book and low reviews and not that bad(can easily google the for the typos)
Justin Kaeser
@jastice
Jan 17 11:48
is a project's root always a valid source directory or can that be disabled?
Dale Wijnand
@dwijnand
Jan 17 11:50
it's a configuration
everything can be configured to be or not be whatever
it's addBaseSources in Defaults.scala
disableable with sourcesInBase := false
Justin Kaeser
@jastice
Jan 17 11:51
thanks
andyr
@arobson73
Jan 17 13:51
Compiling 3 Scala sources to C:\Users\andy\workspace_scala\tut_sbt2\SbtSubProjectsExample\project\target\scala-2.10\sbt-0.13\classes...
[error] IO error while decoding C:\Users\andy\workspace_scala\tut_sbt2\SbtSubProjectsExample\project\Dependencies.scala with UTF-8
[error] Please try specifying another one using the -encoding option
[error] IO error while decoding C:\Users\andy\workspace_scala\tut_sbt2\SbtSubProjectsExample\project\Resolvers.scala with UTF-8
[error] Please try specifying another one using the -encoding option
[error] IO error while decoding C:\Users\andy\workspace_scala\tut_sbt2\SbtSubProjectsExample\project\ShellPrompPlugin.scala with UTF-8
[error] Please try specifying another one using the -encoding option
[error] three errors found
import sbt._
import Keys._

object Dependencies {
   val scalatest = "org.scalatest" %% "scalatest" % "3.0.1"
}
UTF-8 anyone seen this ?
not sure why it creates scala-2.10 folder, I'm using 2.12.1
Dale Wijnand
@dwijnand
Jan 17 13:58
what encoding are you using for your files?
andyr
@arobson73
Jan 17 13:59
im just using vim in windows ?
gvim, the line ending should be like Linux, not windows
unless when I copy paste from the web docs somehow hidden characters have appeared
hidden encodings. is there a way to cut and paste from web page and avoid any of that
andyr
@arobson73
Jan 17 14:12
if learning sbt was not bad enough now I get this problem :)
file Dependencies.scala
Dependencies.scala: ISO-8859 text, with CRLF line terminators
andyr
@arobson73
Jan 17 14:18
what coding type does sbt require ? ascii ?
Dale Wijnand
@dwijnand
Jan 17 14:24
looks like it's trying to use utf-8
so why don't you re-encode Dependencies.scala in utf-8?
andyr
@arobson73
Jan 17 14:34
don't look like its easy to convert from ISO-8859 to ascii.
Dale Wijnand
@dwijnand
Jan 17 14:35
ascii isn't an encoding
eugene yokota
@eed3si9n
Jan 17 14:37
I thought ASCII is a character set as well as an encoding
it's just that when ppl say "ASCII" they probably don't mean what they mean
andyr
@arobson73
Jan 17 14:41
ok thanks for link, yeah will recode it. how it occur in first place so it don't happen again.
eugene yokota
@eed3si9n
Jan 17 14:43
you said you wrote it using vim on Windows?
Worse, Vim, by default, uses Latin-1 to represent the text in the buffer. So a UTF-8 file with a byte-order mark will be corrupted by down-conversion to Latin-1.
The solution is to configure Vim to use UTF-8 internally. This is, in fact, recommended in the Vim documentation, and the only reason it is not configured that way out of the box is to avoid creating enormous confusion among users who expect Vim to operate basically as a Latin-1 editor.
In your .vimrc, add set encoding=utf-8 and restart Vim.
andyr
@arobson73
Jan 17 14:46
thanks Eugene. i'll set it to this.
andyr
@arobson73
Jan 17 15:39
this was a quick way to remove the \u002a characters :%s/[^[:alnum:][:punct:][:space:]]//gc
in vim
Jules Ivanic
@guizmaii
Jan 17 15:44
Hi
it’s not an optimal experience for beginners, neither for other :/
eugene yokota
@eed3si9n
Jan 17 15:47
thanks for bringing that up
could you open an issue for that on sbt/sbt?
Jules Ivanic
@guizmaii
Jan 17 15:48
thank you for this great tool 🙂
i do that !
Jules Ivanic
@guizmaii
Jan 17 16:05
sbt/sbt#2931
:)
Harit Himanshu
@hhimanshu
Jan 17 16:36
Is there a way I could see what a task does via command-line?
> show scalaJSDev
[info] <function1>
[success] Total time: 1 s, completed Jan 17, 2017 8:35:32 AM
I wanted to see what <function1> is
Dale Wijnand
@dwijnand
Jan 17 17:16
you can use inspect to see where it's defined
inspect scalaJSDev
P. Oscar Boykin
@johnynek
Jan 17 19:06
I was thinking about way to have sbt emit it’s full resolution into a lock file, then commit that lock file to git. So, resolution does not happen if the lock file is present.
can anyone suggest a plugin or docs to look at on how to accomplish this?
I think the dependency caching is related to this. In this case, I want to make building the cache a separate step that I run.
Edgar Orendain
@orendain
Jan 17 20:37
I have a project that must be built with Maven, and I'd like to define this project as a subproject in my sbt build. Anyone have a reference on executing maven sub-projects from a parent sbt project? In all my googling, haven't been able to find a solution
Matt Hicks
@darkfrog26
Jan 17 21:21
this is getting VERY annoying....for some reason when I +publishLocal for a snapshot dependency everything works fine, but the second time I do it for the same version everything that depends on it says "class is broken". If I increment the SNAPSHOT version by one, +publishLocal, then update my dependencies in the other project everything works fine again.
it consistently happens EVERY time and I'm pretty sure it's specific to cross-building. If I do publishLocal it doesn't seem to happen.
surely I'm not the only one seeing this?
deleting the directories for the dependency under .ivy2/local and .ivy2/cache and publishing again doesn't make a difference
Matt Hicks
@darkfrog26
Jan 17 21:26
interesting
deleting the project's (the one using the dependency) "target" directories fixes it!
marios iliofotou
@imarios
Jan 17 23:33
Hello! I am having a strange behavior with Def.sequential. I include a bunch of package tasks for different sub-projects foo := Def.sequential(package.in(Project1),package.in(Project2) )but non of them gets executed when I run foo. It works I think if the tasks I am sequencing are custom tasks (rather than sbt naitive tasks)?