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)

Daniel Capo Sobral
@dcsobral
Uh… maybe? :) It’s a plugin that is changing test to run a task, but only on the root project. Another solution, I suppose, would be to figure out how to modify test only for the root project, from a plugin.
eugene yokota
@eed3si9n
then isRoot is probably close to what you want
you can manually add enablePlugins(..) on root project
it's usually better to do that than invoking dark magic
Daniel Capo Sobral
@dcsobral
Or, to put another way, this is ugly an unreliable:
    Test / test := (Def.taskDyn {
      if (name.value == "root" && isTravisBuild.value) {
eugene yokota
@eed3si9n
or change .travis.yml to call the task instead of rewiring test
Daniel Capo Sobral
@dcsobral
That is a no go. I mean, yeah, I could change travis on all projects, but we want to just update the build plugin version instead.
Changing travis is actually a much better solution in many other respects, but it was ruled out.
Daniel Capo Sobral
@dcsobral
And it works perfectly, thanks.
eugene yokota
@eed3si9n
Dale posted more elegant implementation of isRoot
lazy val foo = taskKey[Int]("")
lazy val isRoot = settingKey[Boolean]("Is this the root project?")

def whereAmI: Seq[Setting[_]] = Seq(
  foo := (Def.taskDyn {
    if (isRoot.value) Def.task { 2 }
    else Def.task { 3 }
  }).value,
  isRoot := {
    val rootBuildUri  = loadedBuild.value.root
    val rootProjectId = loadedBuild.value.units(rootBuildUri).root
    thisProjectRef.value == ProjectRef(rootBuildUri, rootProjectId)
  },
)
Dale Wijnand
@dwijnand

@dcsobral

Another solution, I suppose, would be to figure out how to modify test only for the root project, from a plugin.

test in LocalRootProject := ... stick that in projectSettings.

Dale Wijnand
@dwijnand
Actually you best scope the whole setting with LocalRootProject not just the key:
val overrideTestInRootSettings = inScope(ThisScope in LocalRootProject)(Def.settings(
  test := ....
))
lmeyer
@LeonardMeyer
Hi. Quick question. I'm using SBT 1.3.6 and I published a SNAPSHOT version of a library in my local ivy repo. In my other project, which depends on said SNAPSHOT, I want coursier to resolver the local SNAPSHOT first before the the remote one (on nexus). How can I do that ? When I run update it doesn't seem to pick up any change...
eugene yokota
@eed3si9n
I generally recommend against using SNAPSHOT outside of local testing
unless you have a very reliable way of publishing publish date, I don't think it would work, and even if it did it makes the build non-repeatable and resolution slower
nafg
@nafg
Travis is failing after merging green PRs with
 java.io.IOException: Server returned HTTP response code: 403 for URL: https://repo1.maven.org/maven2/com/eed3si9n/sjson-new-murmurhash_2.12/0.8.3/sjson-new-murmurhash_2.12-0.8.3.jar
Seth Tisue
@SethTisue
re: Travis-CI & Maven Central, over in typelevel/general someone linked to https://travis-ci.community/t/continuous-maven-repo-403/3908
I haven't seen/heard anything that would suggest there is anything specific to sbt or to Scala here
@LeonardMeyer consider using sbt-dynver instead of -SNAPSHOT
Heikki Vesalainen
@hvesalai
Hi all. Is there anybody here who would know more about zinc's SafeLazy. We are having problems with it daily (sbt/zinc#615) and I would like to commit a fix once it is understood why the code was made thread unsafe (causing this bug)
In my view, the fix is simple: make it thread safe again
Whoops.. I'll copy this to sbt/sbt-contrib, let's continue there
Rich
@Rich2
Is it possible to use JavaFx in Sbt with Java 11+? Currently we are using using Oracle Java 8, but that's a great restriction to put on on project developers.
lmeyer
@LeonardMeyer
@eed3si9n Thanks but I'm not sure I get you. The use case I'm describing is precisely for local development testing. Anyway, I looked into the COURSIER_TTL and first, it seems to require sbt-coursier. Second it seems to only affect remote SNAPSHOT on Nexus ? Anyway I noticed that when I publishLocal my lib, it ends up in my ivy local cache instead of inside coursier cache. Is this expected ? Maybe if I just replaced the SNAPSHOT in my coursier cache my project would pick it up automatically ?
Oh, sidenote, maybe I needed sbt-coursier because I didn't use the coursier sbt launcher right ?
eugene yokota
@eed3si9n
sbt 1.3.x uses Coursier internally
publishLocal goes to Ivy "local" repository, which is fine
Coursier would look into it
what I am not 100% sure is if some priority local snapshots are given over the remote ones
OlegYch
@OlegYch
for local development i'd recommend source dependencies
i would never recommend snapshots, local or remote
lmeyer
@LeonardMeyer
@eed3si9n Actually after some testing it seems to work out of the box. So for reference... Once the jar is in ivy local, just run update and even though SBT doesn't say anything about it, it will pick up the change. To use the same remote, already downloaded SNAPSHOT of the same jar in coursier cache, one need to delete the locally published one from Ivy and reboot SBT (update will fail saying it didn't find the previously deleted jar in ivy local). Note that I did not mess with COURSIER_TTL at all during this.
nafg
@nafg
@SethTisue thanks. Now it works anyway
eugene yokota
@eed3si9n
@LeonardMeyer so the required step is manually deleting files from Ivy local?
Rich
@Rich2

So I created a hello world app and placed it in the src folder.

package pack1

object App1 extends App { println("This is App1") }

That runs. I was sure in the past the Scala file needed to be inside a folder called "pack1" inside the src folder for it to run properly. Did I imagine that? Or was that restriction removed at some point?

nafg
@nafg
That was never a scalac restriction. Eclipse Scala IDE would not be happy though
Also, in Java it is a requirement
Carlos Quiroz
@cquiroz
Hi, is it possible to use different libraries for different scala versions?
I tried something along these lines:
libraryDependencies ++= {
  CrossVersion.partialVersion(scalaVersion.value) match {
    case Some((2, scalaMajor)) if scalaMajor <= 12 =>
        Seq("org.tpolecat"           %% "doobie-core" % "0.3.0a"): sbt.internals.DslEntry
    case _ => Seq()
  }
}
Rich
@Rich2
@nafg I used to Eclipse. IntelliJ and VSCode seem to be OK with out all the sub folders.
Daniel Capo Sobral
@dcsobral
@dwijnand Oh, I like that very much so.
Daniel Capo Sobral
@dcsobral
Why doesn’t this break “strict” conflict management?
[warn]     * com.slamdata:quasar-api_2.12:156.0.0 is selected over {155.0.5, 155.0.5}
[warn]         +- com.slamdata:quasar-impl_2.12:156.0.0              (depends on 156.0.0)
[warn]         +- com.slamdata:quasar-qscript_2.12:156.0.0           (depends on 156.0.0)
[warn]         +- com.slamdata:quasar-frontend_2.12:156.0.0          (depends on 156.0.0)
[warn]         +- com.slamdata:slamdata-backend-http_2.12:44.0.0-a662db9 (depends on 155.0.5)
[warn]         +- com.slamdata:slamdata-backend-api_2.12:44.0.0-a662db9 (depends on 155.0.5)
Seth Tisue
@SethTisue

Hi, is it possible to use different libraries for different scala versions?

@cquiroz yes, and the code you showed is how I would do it. does it not work?

Ángel Cervera Claudio
@angelcervera
How to write this in sbt 1.3? mappings in Universal <+= packageBin in Compile map { p => p -> "conf/foo.jar" }
Oron Port
@soronpo
@eed3si9n please reopen this issue sbt/sbt#5128
As I reported on the issue, the workaround doesn't help
Mustafa Kuscu
@mcku

Hi, i would like to test a new sbt-web plugin. It looks like i need to add sbt-web-build-base (https://github.com/sbt/sbt-web-build-base) as dependency, which requires bintray for publishing. It just fails with

> publish
[debug] Checking for meta build source updates
[error] stack trace is suppressed; run last bintrayEnsureCredentials for the full output
[error] (bintrayEnsureCredentials) Missing bintray credentials. Either create a credentials file with the bintrayChangeCredentials task, set the BINTRAY_USER and BINTRAY_PASS environment variables or pass bintray.user and bintray.pass properties to sbt.

However, i want to publish to somewhere else, not to bintray (and not publishLocal).