Introducing Akka Cloud to Edge Continuum. Build once for the Cloud. Seamlessly deploy to the Edge - Read Blog
Support
scala

sbt 1.0 beta 2 is now available

Eugene Yokota Scala Team, Lightbend, Inc.

Here’s an update of what we’ve been working on since sbt 1.0 roadmap and beta-1.

sbt 1.0.0-M6

As promised, the second beta release sbt 1.0.0-M6 is available.

Jorge (@jvican) from The Scala Center contributed most of the major features.

  • Scala Center (Jorge) contributed a Java-friendly Zinc API. This was a overhaul of the Zinc internal API for a good Scala integration with other build tools.
  • Scala Center (Jorge) contributed Ivy engine with parallel artifact download.
  • Scala Center (Jorge) contributed static validation of build.sbt, which prohibits .value calls inside the bodies of if expressions and anonymous functions in a task.

Lightbend (Dale and Eugene) focused on validating beta-1 using various plugins, porting sbt/sbt to use beta1 ourselves, and fixing bugs as they come up.

Feedback on sbt

As we were reading the feedback on sbt thread, one of the actionable items was about code format:

For me the most urgent issue is the state of the source code, which makes it very hard for people to contribute. … So I request some attention to #2944

So we adopted Scalafmt in sbt/sbt#3125.

Another recurring theme on the thread was about documentation, so I took a stab at improving the scoping docs.

If you have ideas on how to improve the docs, join the discussion in #3232. Please check out Jorge’s summary for the feedback thread too.

Eviction warning presentation

To improve the ease of use, however, I don’t think docs alone is enough. Here’s a small improvement we are making, for example to present the eviction warnings.

Before:

[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn]  * com.typesafe.akka:akka-actor_2.12:2.4.17 -> 2.5.0
[warn] Run 'evicted' to see detailed eviction warnings

After:

[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]
[warn]      * com.typesafe.akka:akka-actor_2.12:2.5.0 is selected over 2.4.17
[warn]          +- de.heikoseeberger:akka-log4j_2.12:1.4.0            (depends on 2.5.0)
[warn]          +- com.typesafe.akka:akka-parsing_2.12:10.0.6         (depends on 2.4.17)
[warn]          +- com.typesafe.akka:akka-stream_2.12:2.4.17 ()       (depends on 2.4.17)
[warn]
[warn] Run 'evicted' to see detailed eviction warnings

#3202 by Lightbend (Eugene)

Unification of sbt shell notation and build.sbt DSL

This is not part of sbt 1.0.0-M6, but I have a proposal to unify the shell notation and build.sbt DSL. For more details see Unification of sbt shell notation and build.sbt DSL.

I basically have two solutions. First is using the unified slash syntax that works for both the shell and build.sbt:

> Global / cancelable
> ThisBuild / scalaVersion
> Test / test
> root / Compile / compile / scalacOptions

The second is to allow the current build.sbt DSL inside the shell:

> cancelable in Global
> scalaVersion.in(ThisBuild)
> test in Test
> scalacOptions in (root, Compile, compile)

Instead of having to learn two incantations for scoped keys, if adopted we can just use one notation on both the sbt shell and the build.sbt file. For backward compatibility, the old notation will likely stay for the duration of sbt 1.0.

unified

Let us know which solution you think would make sbt easier on the thread.

Rebuilding the plugin ecosystem

For anyone interested in helping with the release of sbt 1.0, the areas the sbt team is most in need of community participation and assistance is testing/porting sbt plugins against the sbt 1.0 milestones.

To this end, we’ve merged sbt-cross-building into the 0.13 branch, and released sbt 0.13.16-M1 so you can cross build sbt plugins while staying on sbt 0.13. Using sbt 0.13.16-M1, here’s how you can cross build a 1.0.0-M6 plugin:

$ sbt
> ++2.12.2
> ^^1.0.0-M6
> compile

This far I’ve personally ported sbt-bintray 0.4.0, sbt-assembly 0.14.5, sbt-buildinfo 0.7.0, sbt-contraband 0.3.0-M5, sbt-pgp 1.1.0-M1, and sbt-houserules 0.3.3 for sbt 1.0.0-M6.

If you port a plugin, please send a PR on sbt/website.

Towards RC-1

We plan to release sbt 1.0.0-RC1 on July 10th, 2017. Some of the things we need to wrap up are:

  • Fix regressions.
  • Release automatic migration tool (Scala Center)
  • Migrate Dbuild to sbt 1.0 milestones to validate major library builds continuously.
  • Define library management API to abstract out Ivy.
  • Finalize Zinc API.
  • Remove legacy library dependencies and clean up the API.

The Total Economic Impact™
Of Lightbend Akka

  • 139% ROI
  • 50% to 75% faster time-to-market
  • 20x increase in developer throughput
  • <6 months Akka pays for itself