Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 22 2015 11:10
    japgolly commented #2066
  • Jun 22 2015 08:25
    keepscoding commented #2044
  • Jun 21 2015 03:24
    xerial commented #157
  • Jun 21 2015 00:10
    eed3si9n unlabeled #2057
  • Jun 21 2015 00:10

    eed3si9n on 0.13

    Adds bundledLauncherProj to all… Remove launcher tests Add unit tests to Travis and 3 more (compare)

  • Jun 21 2015 00:10
    eed3si9n closed #2057
  • Jun 21 2015 00:10

    eed3si9n on fixbuild

    (compare)

  • Jun 20 2015 18:42
    eed3si9n synchronize #2057
  • Jun 20 2015 18:42

    eed3si9n on fixbuild

    Fix typo (compare)

  • Jun 20 2015 18:23

    eed3si9n on fixbuild

    Adds bundledLauncherProj to all… Remove launcher tests Add unit tests to Travis and 1 more (compare)

  • Jun 20 2015 18:23
    eed3si9n synchronize #2057
  • Jun 20 2015 14:59

    eed3si9n on scalaversionbump

    (compare)

  • Jun 20 2015 14:59

    eed3si9n on 0.13

    Bumping up Scala version to 2.1… Try to keep bincompat Fixes #1666 and 1 more (compare)

  • Jun 20 2015 14:59
    eed3si9n unlabeled #2068
  • Jun 20 2015 14:59
    eed3si9n closed #2068
  • Jun 20 2015 14:59
    eed3si9n closed #1666
  • Jun 20 2015 14:57
    eed3si9n commented #2068
  • Jun 20 2015 12:55
    dwijnand commented #2068
  • Jun 20 2015 04:51
    eed3si9n synchronize #2068
  • Jun 20 2015 04:51

    eed3si9n on scalaversionbump

    Fixes #1666 (compare)

Luis Miguel Mejía Suárez
@BalmungSan
And now no matter if I disable the sbt-api-mappings plugin, it is still None inside the microsite sub-module and Some(gitlab) in all other modules.
I really do not understand what is happening.
Luis Miguel Mejía Suárez
@BalmungSan
It seems the fix proposed in sbt/sbt-git#171 solved the problem.
I do not understand why, I do not even understand what was wrong, but hey it worked and I am tired.
I just hope it won't crash again in the future.
Seth Tisue
@SethTisue
weird, but glad you figured something out
Alvin Alexander
@alvinj
I don’t know if it’s important (or if I’m doing something wrong), but I just noticed that when I package a Scala 3.0.0-M2 application with sbt 1.4.4, and then run a jar tvf command on the resulting jar file, the timestamps are all like this:
$ jar tvf ./target/scala-3.0.0-M2/dotty-simple_3.0.0-M2-0.1.0.jar 
288 Thu Jan 01 00:00:00 MST 1970 META-INF/MANIFEST.MF
749 Thu Jan 01 00:00:00 MST 1970 Hello$package$.class
266 Thu Jan 01 00:00:00 MST 1970 Hello$package.class
525 Thu Jan 01 00:00:00 MST 1970 Hello$package.tasty
880 Thu Jan 01 00:00:00 MST 1970 Main.class
449 Thu Jan 01 00:00:00 MST 1970 Main.tasty
Alvin Alexander
@alvinj
I also just noticed that sbt 1.4.4 seems to freeze for a long time if you press the [Tab] key inside the interactive shell, at least on a Mac. Just start sbt, then press the [Tab] key, and it freezes for about 30 seconds.
Adrien Piquerez
@adpi2
@steinybot sorry to be late but yes definitely .bsp should be added to .gitignore
Jason Pickens
@steinybot
Thanks!
Rich
@Rich2
@steinybot is there any reason not to add
.*/
2 replies
Seth Tisue
@SethTisue
@alvinj re slow tab completion, there's a related ticket (sbt/sbt#5380), not sure if it's the "same" problem. I have noticed that tab completion on ++ is super slow (5+ seconds on my laptop), but I admit I hadn't gotten around to reporting it
@alvinj as for the 1970 timestamps, it's intentional, see sbt/sbt#5344 (and linked tickets)
Alvin Alexander
@alvinj

@SethTisue Thanks. I did see #5380, but didn’t know if it was related. But I didn’t see #5344; I searched the bugs for “1970”, but didn’t think to search “timestamp”. :[

If it helps to know it, when you hit Ctrl-c when the terminal is hung up for a while, you eventually see this message: “Unable to join thread Thread[sbt-console0-ui-thread,5,main] after 1 second.”

I am an SEO professional 💪
Alvin Alexander
@alvinj
@SethTisue :thumbsup: :laughing:
Alvin Alexander
@alvinj

I’m sorry, I know I’ve asked this question before, but I can’t find my notes from the last time. I promise to write them down this time.

When I run a command like doc or package, how can I tell where the output files are written? I tried the last command, but that doesn’t show any directory information.

I know they’re somewhere under the target directory, and I know I can see the information when I set the log level to debug, but I was wondering if there is another way to see it. Thanks (again)!

Dmitry Polienko
@nigredo-tori
@alvinj, see Compile / packageBin / artifactPath and Compile / packageDoc / artifactPath settings.
Anton Sviridov
@keynmol
or run show doc and it will print out the paths
Alvin Alexander
@alvinj
@nigredo-tori @keynmol Thank you both, I appreciate it!
Kostas Kougios
@kostaskougios

Hi all, I am trying to sort this out for a day now. I got my multimodule build (contains some spark modules) and that works fine on my ubuntu desktop for both sbt 1.2.8 & sbt 1.4.4. But our jenkins machine can't run the tests for spark modules, it gets this:

[info] java.lang.NoClassDefFoundError: com/google/common/collect/Maps [info] at org.apache.hadoop.metrics2.lib.MetricsRegistry.<init>(MetricsRegistry.java:42)

Now I've seen the ClassLoaderLayeringStrategy , set it to Flat, it didn't fix the issue.

Also set Test / fork := true , didn't fix the issue.

Any ideas? It's weird it runs ok on my box but not in jenkins. I've also tried by-passing the jenkins-sbt plugin by wget sbt, unpack & run it from the unpacked dir, but that as well didn't fix the issue.

mdfahad4786
@mdfahad4786
How to deploy lagom scala api on heroku. If there any reference,link please guide me
Seth Tisue
@SethTisue
@mdfahad4786 if you don't get an answer here, you might try https://discuss.lightbend.com
Guillaume Martres
@smarter
I'd like to run something like sbt "show version" but instead of printing a bunch of stuff I'd like stdout to only contain the value of the version setting. Is there a way to do that?
Anton Sviridov
@keynmol
I haven't found one. In our projects we usually have a printVersion task that just writes version to a file named version which we then cat on CI.
Would love to know if there's a better way.
Seth Tisue
@SethTisue
@smarter sbt -Dsbt.supershell=false -error "print version"
keynmol @keynmol goes to rewrite all of his builds
Seth Tisue
@SethTisue
if you are piping the output (e.g. using > or | in the shell) sbt will notice the output isn't a terminal and you won't need -Dsbt.supershell=false
Kostas Kougios
@kostaskougios

where does sbt 1.4.4 download dependencies? I've deleted ~/.ivy2 but it all still compiles without downloading anything

Ok seems it is here: ls ~/.cache/coursier . Now how to change that folder? Those -Divy.home are for the previous versions of sbt

Domas Poliakas
@domaspoliakas
I think it’s -Dcoursier.cache
Kostas Kougios
@kostaskougios

it doesn't seem to work

sbt -Dcoursier.cache=/tmp/sap-sbt-cache , did a compile, the cache folder wasn't created

Domas Poliakas
@domaspoliakas
Try checking coursier docs, maybe you’ll find something. As you probably gathered - coursier is how SBT fetches dependencies since 1.3
Kostas Kougios
@kostaskougios

I tried both
If none of these locations is specified, COURSIER_CACHE in the environment is looked at if it is set. Else the coursier.cache Java property is looked at, if it is set.

But doesn't work

Kostas Kougios
@kostaskougios
Actually export COURSIER_CACHE=/tmp/sbt-cache works ... on 1 of my 2 systems but not on the other
sebarys
@sebarys

Hi everyone

I have one question about custom tasks and integrating them with sbt test:

We would like to run some prepare script before tests and cleanup everything after test execution (no matter about result of test execution).

import scala.sys.process._
lazy val initTestDependencies = TaskKey[Unit]("initTestDependencies", "Init test dependencies")
initTestDependencies := {
  val shell: Seq[String] = if (sys.props("os.name").contains("Windows")) Seq("cmd", "/c") else Seq("bash", "-c")
  val execute = shell :+ "./init_test_dependencies.sh"
  execute !
}
lazy val cleanupTestDependencies = TaskKey[Unit]("cleanupTestDependencies", "Cleanup test dependencies")
cleanupTestDependencies := {
  val shell: Seq[String] = if (sys.props("os.name").contains("Windows")) Seq("cmd", "/c") else Seq("bash", "-c")
  val execute = shell :+ "./cleanup_test_dependencies.sh"
  execute !
}

I would like to pass initTestDependencies value to test execution e.g. port number where some test dependencies are listening.

(test in Test) := cleanupTestDependencies.dependsOn((test in Test).dependsOn(initTestDependencies)).value

will run tasks in correct order but still I'm not able to pass values between tasks and I don't have guarantee that cleanup will be executed

Is anyone have an idea how such case should be solved?

Cédric Gourlay
@kidi
Hi, I setup this kind of scripts ouside sbt and use env var or -Dparams but I'm curious of any other answers
sebarys
@sebarys
yeah, I did the same, but it would be nice to embed such behaviour just under sbt test
Helix112
@Helix1121
Hi, so my project's structure looks like this:
Helix112
@Helix1121
My root project contains the settings, tasks and configs. And has a subprojects folder which contains all subprojects . I have created a task on the root project that depends on some code in a subproject X. Is it possible to call a method from subproj x inside that task definition?
Guillaume Martres
@smarter
@SethTisue thanks!
Helix112
@Helix1121
Hi there, can anybody help me out? This is the link for my detailed question https://stackoverflow.com/questions/65103555/sbt-call-subprojects-source-code-from-root-project
Chris Kipp
@ckipp01
Is the behavior exactly the same for sbt -client sbt --client and sbtn? Or what's the difference between sbt -client and sbt --client?
Dale Wijnand
@dwijnand
@ckipp01 sbt/sbt#6078
Chris Kipp
@ckipp01
thanks @dwijnand I actually came across that and the issue it links to, but neither have an explanation of what is actually different
related to client/server things is this still in use by anything? https://www.scala-sbt.org/1.x/docs/sbt-server.html
We've had a few Metals users look here for sbt server information since we now say you can use the sbt build server, and they get confused by this page as it's an LSP server
Naftoli Gugenheim
@nafg
I did sbt -Dsbt.traces=true -Dsbt.task.timings=true -Dsbt.task.timings.on.shutdown=true compile and loaded the flame graph in chrome://tracing
I'm confused how to understand it. It seems horizontal left to right is elapsed time
What is the relationship of items in different rows?
I really want something like IntelliJ's new compilation graph
Stephen Judkins
@stephenjudkins
is it my imagination or did runMain change at some point to start prefacing lines printed to stdout with [info]?