These are chat archives for sbt/sbt

20th
Aug 2017
Alexey Alekhin
@laughedelic
Aug 20 00:02
Okay, I figured out some things. My initial problem was that I couldn't start a project with actually running sbt 1.0 (forgot about project/build.properties).
Once I run sbt in a project, I see a log message sbt server started at 127.0.0.1:4714, and from another terminal I can connect to it with sbt client 127.0.0.1:4714. The behavior is quite strange though: I can send commands to the server from this secondary shell, but some output will appear on the server side, some on the client.
New question: how to start a server in background, without keeping an open sbt instance?
frostyrock
@frostyrock
Aug 20 01:08

I don't know how to format event messages from custom extraLoggers

val extraLoggers = settingKey[ScopedKey[_] => Seq[Appender]]("A function that provides additional loggers for a given setting.").withRank(DSetting)
extraLoggers must satisfy org.apache.logging.log4j.core.Appender
and Appender receives event messages through def append(event: org.apache.logging.log4j.core.LogEvent): Unit
and the messages looks like these

ObjectEvent(error, [Error] /Users/foo/sc_work/plugin-test/src/main/scala/example/ScalaJsExample.scala:26: unbound placeholder parameter, Some(console0), None, xsbti.Problem, JObject([Lsjsonnew.shaded.scalajson.ast.unsafe.JField;@1cd90669))

StringEvent(info, Compiling 1 Scala source to /Users/foo/sc_work/plugin-test/target/scala-2.12/classes ..., Some(console0), None)

How do I properly format these? Any advice will be appreciated.

nafg
@nafg
Aug 20 05:28
Is there way to force sbt (with coursier) to (attempt to) re-download its artifacts?
I want to test a change of resolvers
Nicolas Rinaudo
@nrinaudo
Aug 20 05:34
@nafg clear the corresponding artifacts from ~/.coursier/cache
nafg
@nafg
Aug 20 05:34
@nrinaudo there are a lot
Actually another thing that might help is to get a report where each artifact is resolved from
preferably grouped by resolver
Nicolas Rinaudo
@nrinaudo
Aug 20 05:35
the cache is organised like that
for example: ~/.coursier/cache/v1/https/dl.bintray.com/
nafg
@nafg
Aug 20 05:36
good point
Nicolas Rinaudo
@nrinaudo
Aug 20 05:36
that's all the artifacts downloaded from bintray
so if you delete the directory corresponding to the resolver you want to test (or copy / rename it somewhere in case something goes wrong and you don't want to re-download half of the internet), you should be good to go
nafg
@nafg
Aug 20 05:37
Right, that should do it. Thanks
Nicolas Rinaudo
@nrinaudo
Aug 20 05:37
you're quite welcome
nafg
@nafg
Aug 20 05:37
It's a personal bintray repo (I want to check whether it's synced to jcenter) so not too much to go wrong
Nicolas Rinaudo
@nrinaudo
Aug 20 05:41
can't you simply browse jcenter to double check?
nafg
@nafg
Aug 20 05:41
@nrinaudo to double-check what?
Nicolas Rinaudo
@nrinaudo
Aug 20 05:42
whether your personal bintray is synced
maybe I misunderstood what you meant
nafg
@nafg
Aug 20 05:42
No, but the problem is that they only synced the 2.11 artifacts not the 2.12 artifacts
Nicolas Rinaudo
@nrinaudo
Aug 20 05:44
ah, can't really help you there, I really don't know much at all about bintray
nafg
@nafg
Aug 20 05:44
yeah I've had it before, need to open support request. I think they're designed with the assumption of one top-level dir per package
Rich
@Richtype
Aug 20 07:39
Does build.properties need to be called "build.properties" or will "*.properties" work? I don't call files build.sbt any-more for the same reason I've stopped using "package.scala", as I find it confusing when I have multiple files open with the same name.
Mayhem
@mayhemm
Aug 20 14:16
It's. But the problem with what you are doing, @Richtype , is that your are making your own convention... I for example expect to see a build.sbt in each scala project. If I don't see it, I asume they are using something else. Which creates aditional confusion.
Also, I just test it. On IDEA when you open two files with the same name, it add the package in front of the file name