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)

nafg
@nafg
Why is the root project called global? Does it have code that you need published as well?
Oron Port
@soronpo

Does it have code that you need published as well?

No.

I don't remember why I called it global.
Ancient history :)
nafg
@nafg
Ok. It may help to add publish/skip:=true to it
then it won't try to publish global
Oron Port
@soronpo
@nafg Thanks! I changed it so that lib is the one that gets the library (main) binary name.
Cyrille Chépélov
@cchepelov
Hi @alexarchambault, would it be possible to release lm-coursier-shaded % 2.0.9 as well please?
Martijn
@martijnhoekstra:matrix.org
[m]
I have the strong impression the scripted task isn't using the latest version of my plugin. How can I check which version it's loading and from where?
Raphael Bosshard
@esarbe
Good day everyone!
How is one supposed to do this with bare configs?
lazy val root = (project in file("."))
  .configs(IntegrationTest)
  .settings(
    Defaults.itSettings,
    libraryDependencies += scalatest % "it,test"
    // other settings here
  )
Anton Sviridov
@keynmol

@martijnhoekstra:matrix.org that's very likely, if you don't have the following incantation in your plugin settings:

  .settings(
    scriptedLaunchOpts := {
      scriptedLaunchOpts.value ++
        Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
    },
    scriptedBufferLog := false
  )

and something like addSbtPlugin(... % sys.props("plugin.version")) in your scripted project plugins.sbt

the key there is -Dplugin.version of course, the rest just copypasta
Martijn
@martijnhoekstra:matrix.org
[m]
I have the following incantation in /sbt-test/myprojectname/mytestname/project/plugins.sbt:
sys.props.get("plugin.version") match {
  case Some(x) => addSbtPlugin("com.martijnhoekstra" % "sbt-sourcedirs" % x)
  case _ => sys.error("""|The system property 'plugin.version' is not defined.
                         |Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
}
and the following settings in my build.sbt that defines the plugin:
    scriptedLaunchOpts := {
      scriptedLaunchOpts.value ++ List("-Xmx1024M", "-Dplugin.version=" + version.value)
    },
    scriptedBufferLog := false,
Anton Sviridov
@keynmol
that all looks fine. does your plugin depend on another module that needs to be published for the plugin to work?
Martijn
@martijnhoekstra:matrix.org
[m]
yes, one I have in a different project, and publishLocaléd
Anton Sviridov
@keynmol
do you have plugin's publishLocal depend on that project's publishLocal?
  .settings(
    publishLocal := publishLocal
      .dependsOn(
        publishLocal in core
      )
  )
I'm quickly running out of things I know about scripted tests being broken :D
Martijn
@martijnhoekstra:matrix.org
[m]
that project is in an entirely different repo
I publishLocal it manually
I'll see if changing the plugin version does something
Anton Sviridov
@keynmol

Right.

what are the symptoms you're seeing then?

I usually just run JAVA_OPTS="-Dplugin.version=..." in the scripted test folder to see if my test even has a chance to work

Martijn
@martijnhoekstra:matrix.org
[m]
I think it's not picking up the changes I'm making, and it doesn't output stuff when I either println or log from sLog.value
ah, it's not finding the plugin when I update the version number, so that indeed is a sign it's not getting picked up, and gives me some tools to check what is happening instead
ugh, got it, I changed the org name
so it picked up the build of the old org name
Anton Sviridov
@keynmol
Classic :) I also love battling for hours trying to figure out why scripted doesn't work until I realise that I only publish 2.13 dependency, not 2.12.
Martijn
@martijnhoekstra:matrix.org
[m]
thanks for thinking along!
Anton Sviridov
@keynmol
:+1: no problem
Martijn
@martijnhoekstra:matrix.org
[m]
ha, I already did that one
Anton Sviridov
@keynmol

I actually still don't know what's the best way of calling publishLocal for a particular Scala version.

with sbt-projectmatrix it works wonderfully, but without it I'd be lost and doing something like +publishLocal; scripted as an alias.

Martijn
@martijnhoekstra:matrix.org
[m]
just ++2.12.x and call it good?
Anton Sviridov
@keynmol

I don't know if I can do that in the build definition tho. With project matrix there's no scala version state, so I can do

  .settings(
    publishLocal := publishLocal
      .dependsOn(
        publishLocal in core.jvm(Scala_212),

on the plugin build and everything works

Антон Войцишевский
@FunFunFine

Hi everyone. Have someone tried to use sbt remote cache with GitLab CI/CD?
I have this idea that one can use this feature which allows to store artifacts and then get them by URL.
So, as I understand, I need to put caches into artifact and then pull it in my builds.
Latter seems easy enough as I can specify where to pull caches from:

//...
    remoteCacheResolvers += "Gitlab Build Cache".at("https://gitlab.my-company.com/foo/my-project/-/jobs/artifacts/master/download?job=build"),
//...

But the first is not clear to me. What files should I save as artifact? Is there a way to tell SBT to do it for me?

Martijn
@martijnhoekstra:matrix.org
[m]
I'm trying to publish my sbt plugin to sonatype using the sbt-sonatype plugin. But the publishSigned task publishes the bundle to be released to a pluginname_2.12_1.0/ directory, and releaseBundle seems to expects it in pluginname_2.12/
how do I align those?
Rodrigo
@rodrigotn
Hi everyone. I want to extends o create a new template resolver, but the documentation is not clear on how to add or where the new custom template engine. Can you help me. Thanks!
Иван Сердюк
@oceanfish81_twitter
I have a problem here:

[info] compiling 151 Scala sources and 15 Java sources to /home/ivan/sbt_master/main/target/scala-2.12/classes ...

| => mainProj / Compile / compileIncremental 703s
| => mainProj / Compile / compileIncremental 704s

[error] /home/ivan/sbt_master/main/src/main/scala/sbt/internal/LayeredClassLoaders.scala:44:9: overriding variable parent in class ClassLoader of type ClassLoader;
[error] value parent needs `override' modifier
[error] val parent: ClassLoader,
[error] ^
[error] one error found

Aaron Delaplane
@AaronDelaplane
General question. Say a test suite is run via SBT and fails in the context of a CI-CD pipeline. When this occurs the CI-CD pipeline will fail but I don't know how the failure is communicated to the CI-CD runner. Via an error exit code?
Anton Sviridov
@keynmol
@AaronDelaplane AFAIK, yes, can't think of any other way that would work for all CIs
you can try sbt test; echo $?and if test fails you should see a non-zero code
Gergő Törcsvári
@tg44
I have a project (first), and two other projects (second, third) whose dependsOn first. I want to publish only the two "main" projects as separated libs, and somehow elegantly include the first projects files to them. As I understand it is not so straightforward bcs of the possible package name collision, but I'm ok with package rewrites too (like the first project has a first package, and the classes would be reachable in the second project like second.first.Example) is there any sbt plugin that can do this for me? (Building first, and moving its compiled files to an another project target dir?) Or I should publish "first" even if I don't want to?
Ryan Peters
@sloshy
@tg44 can I ask out of curiosity, why you do not want to publish "first"? Assuming your projects share a common version, and you have downstream projects that share "second" and "third" dependencies, this seems like by far the best way to go.
Gergő Törcsvári
@tg44
@sloshy Are you familiar with the alpakka codebase? The google connectors currently share the same auth logic by copy-paste. Moving this to a sub-project and depending on it would be much better. But publishing it under the alpakka umbrella is not so (it is not akka stream specific). Moving it to another codebase would be bad idea too (maintain reasons), so at this point I just trying to find a not so hurtful solution (and also I'm curious).
Adam Fraser
@adamgfraser
Hi. Apologies if this question has been asked before. I am looking to make sure that some finalization logic runs when my program is terminated with CTRL-C by the user within SBT. My current approach is to use forked run and install a shutdown hook. However, I am observing that the thread I install with the shutdown hook is forcibly interrupted during execution before completing its finalization logic. How can I support this use case?
Eric K Richardson
@ekrich
Hi, I am having trouble publishing using sbt-ci-release. I successfully published before but now I switched to GitHub actions and having problems.
https://github.com/ekrich/sjavatime/runs/1770510485?check_suite_focus=true
I poked around and it seems similar to this one with followup actions in sbt.
sbt/sbt-pgp#150
I am having the same problem in 2 repos:
https://github.com/ekrich/sconfig/ and https://github.com/ekrich/sjavatime/
Any help, and/or I could create an issue if needed.