44
The state of sbt 0.13, sbt server, and sbt 1.0 Eugene Yokota (@eed3si9n) Dale Wijnand (@dwijnand) February, 2017

The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)

Embed Size (px)

Citation preview

The state of sbt 0.13, sbt server,

and sbt 1.0Eugene Yokota (@eed3si9n) Dale Wijnand (@dwijnand)

February, 2017

• Scala hobbyist since 2010

• “learning Scalaz” / “herding Cats”

• an organizer of ScalaMatsuri

• scalaxb (XML data binding)

• treehugger.scala

• sbt-assembly, sbt-buildinfo, etc

• Lightbend/Typesafe since 2014

• current tech lead of sbt & Tooling team

who are these guysEugene (@eed3si9n)

Dale (@dwijnand)

• sbt core dev since 2015

• :_* no longer needed for settings(Seq(…))

• -= & --= for settings & tasks

• Lightbend Tooling team since 2016

• SIP-27 - Trailing Commas

Lightbend Production Suite

• sbt server • sbt 0.13.x tech previews • sbt 1.0.x

Overview of this talk

sbt server

• See http://eed3si9n.com/sbt-server-reboot

sbt server reboot

• single JVM process • implemented as a command, sort of • JSON API to drive sbt from network

what is sbt server?

• IDE integration • Distributed build

example usages

sbt main loop

shell prompts the user

server command

server prompts the user, and listens to network

telnet{ "type": "ExecCommand", "commandLine": "compile" }...

thin client$ sbt client localhost:5000> compile

input/output of common taskscompile task

input/output of common taskstest task

input/output of common tasks• Outputs are side effects to disk and screen

event logging• A way to log object (semantic logging) • Logs are then relayed as JSON • Decoupled from screens

sbt 0.13.x tech previews

sbt 0.13.x tech previews• sbt 0.13.5 and onwards

sbt 0.13.5 (May 2014)• Introduction of AutoPlugin

sbt 0.13.6 (September 2014)• Name hashing is enabled by default • HTTPS by default • Eviction warnings • Unresolved dependency error tree

sbt 0.13.7 (November 2014)• Natural whitespace handling • Cached resolution (experimental)

sbt 0.13.8 (March 2015)• Cross-version support for Scala sources • Sequential tasks • Seq[Setting[_]] can be used directly

in .settings(...) • Maven resolver (experimental)

sbt 0.13.9 (August 2015)• inThisBuild • Maven compatibility (read maven-metadata.xml)

sbt 0.13.11 (February 2016)• Configurable compiler bridge • Dotty support • Inter-project dependency tracking

sbt 0.13.12 (July 2016)• Deprecates project/Build.scala • scalaVersion enforcement to toolchain

sbt 0.13.13 (October 2016)• sbt new command • Synthetic subprojects • Deprecate old sbt 0.12 DSL

(<<=,<+=,<++=)

sbt 0.13.14 (soon 2017)• Java 9 compatibility • Other bug fixes

sbt 0.13 lesson learned• Binary compatibility is great for plugins • Binary compatibility is hard • Everything changes

sbt 1.0

less is more

binary compatibility (bincompat)• Goal: 2+ years of binary compatibility

removed feature• (Non-auto) sbt.Plugin • project/build.scala • 0.12 DSL operators (<<=, <+=, <++=) • Scala 2.9.x support

new feature• Scala 2.12.x based • Zinc 1.x (class-based name hashing) • sbt server

modularization• sbt • Zinc API • librarymanagement API • IO API

Zinc API• Unified API to drive Scala compiler • Lightbend, Scala Center, VirtusLab, Twitter

engineers

librarymanagement API • Abstraction of dependency management

free of Ivy.

meta-tooling• Making tools to make the tool • Contraband • sjson-new • Gigahorse

• Giter8

Contraband• http://www.scala-sbt.org/contraband/ • GraphQL dialect to describe API • Generates pseudo-case class that’s evolvable while

keeping binary compatibility. • Generates sjson-new JSON codecs.

package com.example @target(Scala)

## Character represents the characters in Star Wars. type Character { name: String! appearsIn: [com.example.Episode]! }

impact to build users• Some migration required • Faster incremental compilation • Hopefully improved tooling in the long-term

impact to plugin authors• JSON compatibility

todo• Validate using plugin ecosystem • Validate using community build

Questions?