SlideShare a Scribd company logo
1 of 59
Download to read offline
sbt 1
Eugene Yokota (@eed3si9n)
Dale Wijnand (@dwijnand)

June 2018
• Lightbend Tooling team
who are these guys
Eugene
(@eed3si9n)
Dale
(@dwijnand)
• Lightbend Tooling team
sbt by example
• https://www.scala-sbt.org/1.x/docs/sbt-by-
example.html
overhaul
overhaul
overhaul
• remove old parts
• update new parts
• know-how of rebuilding the parts
goal of sbt 1
• minimize conceptual jump from sbt 0.13
sbt 1 (updated parts)
• Semantic Versioning
• Binary compatible throughout 1.y.z
• Feature releases and Patch releases
sbt 1 (updated parts)
• Use Maven Central
• As opposed to Ivy layout hosted on Bintray behind
redirect
sbt 1 (updated parts)
• Use Scala 2.12 for build definition
• As opposed to Scala 2.10
sbt 1 (updated parts)
• Pseudo-case classes generated by Contraband
• https://www.scala-sbt.org/contraband/
• Instead of .copy(foo = 1), you write .withFoo(1)
• Generates JSON codec
sbt 1 (updated parts)
• Incremental compiler Zinc 1
• https://github.com/sbt/zinc
• Class-based name hashing
sbt 1 (updated parts)
• Library Management (LM) API
• https://github.com/sbt/librarymanagement
• Abstracts Apache Ivy so we can replace it later
sbt 1 (removed parts)
• sbt.Plugin
• Use sbt.AutoPlugin introduced in sbt 0.13.5
sbt 1 (removed parts)
• sbt 0.12 style
• the key dependency operators: <<=, <+=, <++=
• the tuple enrichments (apply and map)
• sbt.Build trait in project/Build.scala
sbt 1 (new parts)
• sbt server
• unified slash syntax
• more on these later
sbt ecosystem
sbt is a hub
• builds
• dependency graph, library ecosystem
• test interface
• development tasks
• plugins
• developers (users & contributors)
how big is the ecosystem
• 147,367 code results
• "scalaVersion" extension:sbt
how big is the ecosystem
• 209,745 download per month (sbt 1 on Maven Central)
• (excludes preloaded .zip, .tgz, .msi)
how big is the ecosystem
• 12956 downloads (in 7 days after 1.1.5 came out)
how big is the ecosystem
• 455 plugins (341 0.13 plugins; 224 1.0 plugins)
• 600+ packages on Bintray sbt/sbt-plugin-releases
migrating the plugin ecosystem
• organizing community efforts
10 days later..
migrating the plugins ecosystem
• 99 plugins were on sbt 1 in 2 months
Places to find us
• sbt 1 / Zinc meeting (every Wednesday)
• Gitter (sbt/sbt + sbt/sbt-contrib)
• Lightbend Discuss: https://
discuss.lightbend.com/c/tooling
• Stackoverflow: http://stackoverflow.com/
tags/sbt
• GitHub Issues: sbt/sbt
• Twitter: https://twitter.com/scala_sbt
• and lots of repos...
GitHub repos
• sbt/sbt - the build tool
• sbt/zinc
• sbt/librarymanagement
• sbt/util
• sbt/io
• sbt/website
• sbt/launcher
• sbt/sbt-launcher-package
• sbt/contraband
• sbt/sbt-houserules
GitHub repos
• sbt/sbt - the build tool
• sbt/zinc
• sbt/librarymanagement
• sbt/util
• sbt/io
• sbt/website
• sbt/launcher
• sbt/sbt-launcher-package
• sbt/contraband
• sbt/sbt-houserules
all repos:
• build: sbt
• PR validation: Travis CI
• Testing: ScalaTest/Specs2/ScalaCheck/scripted
Types of contributions
• Help adoption
• Assist other users
• At work, on Stackoverflow etc
• Contribute to documentation
• Garden the issue tracker
• Report issues
• Expand ecosystem
• Patch the core
Gardening the issue tracker
• Summarize discussions from other channels
• Capture problems
• Sift facts, opinions, and analysis (steps, problems,
expectations, notes)
• Reproduce the reported issues
• Triage
• Leaving breadcrumbs for contributors (previous
discussions, source links)
Patching the core
• Lightbend Discuss
• "Help wanted", "Good first issue"
Plugins that got merged to sbt
• sbt-core-next
• sbt-doge
• sbt-slash
• sbt-cross-building
sbt server
• See http://eed3si9n.com/sbt-server-reboot
sbt server reboot
Language Server Protocol
• created by Microsoft for VS Code
• abstracts IDE features like a web API
LSP
VS Code
Eclipse
Sublime 3
NeoVim
TypeScript
Python
sbt
demand for rich development environment
• Jump to error
• Code navigation
• Tab completion
• Visual debugging
• Incremental compiler
• Library management
• Test integration
• Plugin capabilities
(100+ of plugins)
Editors sbt
• LSP
• Event logging
a brief history of sbt server
• 'client-server split for sbt' (2013) Havoc Pennington
• A proposal to split sbt into 2 JVMs: client (cmd,
IDE, Play run etc) talks to server.
• Typesafe Activator 1.3.0 (2015) was released
using sbt-remote-control.
• 'sbt server reboot' (2016) Eugene Yokota
• 1 JVM. sbt server listens to both CLI and
network. IDEA calling compile.
• sbt 1.1.0 (2017) was released with server built-in
using Language Server Protocol.
• 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
sbt new "shell" command
shell prompts the user, 

and listens to network
nc
$ nc -U /Users/foo/.sbt/1.0/server/
0845deda85cb41abcdef/sock
Content-Length: 99^M
^M
{ "jsonrpc": "2.0", "id": 1, "method":
"initialize", "params":
{ "initializationOptions": { } } }^M
...
input/output of common tasks
compile 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
unified slash syntax
sbt
• a way of describing your build
• interactive shell for development
sbt 0.13
• (scalacOptions in (Test, console)).value
• test:console::scalacOptions
sbt 1.1.x
• (Test/console/scalacOptions).value
• Test/console/scalacOptions
unified slash syntax
• [reference /] [Config /] [intask /] key
• foo / compile
• foo / Test / compile
• ThisBuild / organization
• foo / Compile / console / scalacOptions
scope delegation
• [reference /] [Config /] [intask /] key
• foo / Test / console / scalacOptions
Zero
Runtime console
Compile
Zero
Zero
ThisBuild
Zero
Zero
... ...
problematic areas
sauce dependency
sbt-sriracha
• adds .sourceDependency(scoptJVMRef,
scoptJVMLib)
• use -Dsbt.sourcemode=true to switch
http://eed3si9n.com/hot-source-dependencies-using-sbt-sriracha
lazy val scoptJVMRef = ProjectRef(
workspaceDirectory / "scopt", "scoptJVM")
lazy val scoptJVMLib = "com.github.scopt" %% "scopt" % "3.7.0"
 
lazy val root = (project in file("."))
.sourceDependency(scoptJVMRef, scoptJVMLib)
.settings(
name := "Hello world"
)
cross building across
Scala versions, platforms, etc
sbt-projectmatrix (TBA)
• adds lazy val foo = projectMatrix
lazy val core = (projectMatrix in file("core"))
.scalaVersions("2.12.6", "2.11.12")
.settings(
name := "core"
)
.jvmPlatform()
lazy val app = (projectMatrix in file("app"))
.dependsOn(core)
.scalaVersions("2.12.6")
.settings(
name := "app"
)
.jvmPlatform()
https://discuss.lightbend.com/t/spatial-representation-of-cross-
building/1277/9
Potential areas of contribution
• Library management (Coursier)
• Dependency locking
• Migrate code examples to compiled docs
• Look for "Help wanted" label in GitHub issues
Questions?
Lightbend Subscription

More Related Content

What's hot

Docker get started
Docker get startedDocker get started
Docker get startedTruong LD
 
Introduction to Docker - Docker workshop @Twitter
Introduction to Docker - Docker workshop @TwitterIntroduction to Docker - Docker workshop @Twitter
Introduction to Docker - Docker workshop @TwitterdotCloud
 
Shipping python project by docker
Shipping python project by dockerShipping python project by docker
Shipping python project by dockerWei-Ting Kuo
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with DockerRavindu Fernando
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsRamit Surana
 
Live migrating a container: pros, cons and gotchas
Live migrating a container: pros, cons and gotchasLive migrating a container: pros, cons and gotchas
Live migrating a container: pros, cons and gotchasDocker, Inc.
 
Server and home linux
Server and home linuxServer and home linux
Server and home linuxTyler Largin
 
Package management and creation in Gentoo Linux
Package management and creation in Gentoo LinuxPackage management and creation in Gentoo Linux
Package management and creation in Gentoo LinuxDonnie Berkholz
 
Docking postgres
Docking postgresDocking postgres
Docking postgresrycamor
 
MongoDB as Search Engine Repository @ MongoTokyo2011
MongoDB as Search Engine Repository @ MongoTokyo2011MongoDB as Search Engine Repository @ MongoTokyo2011
MongoDB as Search Engine Repository @ MongoTokyo2011Preferred Networks
 
DockerCon 2015: Docker Engine Breakout Session
DockerCon 2015: Docker Engine Breakout SessionDockerCon 2015: Docker Engine Breakout Session
DockerCon 2015: Docker Engine Breakout SessionDocker, Inc.
 
Docker talk
Docker talkDocker talk
Docker talkRui Sun
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An IntroductionPOSSCON
 
Leverage LXC/LXD with Kubernetes
Leverage LXC/LXD with KubernetesLeverage LXC/LXD with Kubernetes
Leverage LXC/LXD with KubernetesLin Sun
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerJohn Willis
 
Configuration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needsConfiguration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needsSaltStack
 
Gentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile EverythingGentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile EverythingDonnie Berkholz
 

What's hot (20)

Docker get started
Docker get startedDocker get started
Docker get started
 
Introduction to Docker - Docker workshop @Twitter
Introduction to Docker - Docker workshop @TwitterIntroduction to Docker - Docker workshop @Twitter
Introduction to Docker - Docker workshop @Twitter
 
Shipping python project by docker
Shipping python project by dockerShipping python project by docker
Shipping python project by docker
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with Docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and tools
 
Docker
DockerDocker
Docker
 
Live migrating a container: pros, cons and gotchas
Live migrating a container: pros, cons and gotchasLive migrating a container: pros, cons and gotchas
Live migrating a container: pros, cons and gotchas
 
Server and home linux
Server and home linuxServer and home linux
Server and home linux
 
Package management and creation in Gentoo Linux
Package management and creation in Gentoo LinuxPackage management and creation in Gentoo Linux
Package management and creation in Gentoo Linux
 
Docking postgres
Docking postgresDocking postgres
Docking postgres
 
MongoDB as Search Engine Repository @ MongoTokyo2011
MongoDB as Search Engine Repository @ MongoTokyo2011MongoDB as Search Engine Repository @ MongoTokyo2011
MongoDB as Search Engine Repository @ MongoTokyo2011
 
DockerCon 2015: Docker Engine Breakout Session
DockerCon 2015: Docker Engine Breakout SessionDockerCon 2015: Docker Engine Breakout Session
DockerCon 2015: Docker Engine Breakout Session
 
Docker talk
Docker talkDocker talk
Docker talk
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
 
Leverage LXC/LXD with Kubernetes
Leverage LXC/LXD with KubernetesLeverage LXC/LXD with Kubernetes
Leverage LXC/LXD with Kubernetes
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Configuration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needsConfiguration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needs
 
Gentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile EverythingGentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile Everything
 
Git+jenkins+rex presentation
Git+jenkins+rex presentationGit+jenkins+rex presentation
Git+jenkins+rex presentation
 

Similar to sbt 1

CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITPouriaQashqai1
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTaro L. Saito
 
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Ahmed El-Arabawy
 
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily JobLuca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Joblinuxlab_conf
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitRobert Lee-Cann
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubBigBlueHat
 
[FOSDEM 2020] Lazy distribution of container images
[FOSDEM 2020] Lazy distribution of container images[FOSDEM 2020] Lazy distribution of container images
[FOSDEM 2020] Lazy distribution of container imagesAkihiro Suda
 
Git vs Subversion: ¿Cuando elegir uno u otro?
Git vs Subversion: ¿Cuando elegir uno u otro?Git vs Subversion: ¿Cuando elegir uno u otro?
Git vs Subversion: ¿Cuando elegir uno u otro?Paradigma Digital
 
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)Eugene Yokota
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIsTim Osborn
 
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devsITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devsITCamp
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbtFabio Fumarola
 
What's new with tooling for Spring, Grails, and the Cloud
What's new with tooling for Spring, Grails, and the CloudWhat's new with tooling for Spring, Grails, and the Cloud
What's new with tooling for Spring, Grails, and the Cloudmartinlippert
 

Similar to sbt 1 (20)

git and github
git and githubgit and github
git and github
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GIT
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS Projects
 
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
 
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily JobLuca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with Git
 
Monkey space 2013
Monkey space 2013Monkey space 2013
Monkey space 2013
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 
[FOSDEM 2020] Lazy distribution of container images
[FOSDEM 2020] Lazy distribution of container images[FOSDEM 2020] Lazy distribution of container images
[FOSDEM 2020] Lazy distribution of container images
 
Git Branch
Git BranchGit Branch
Git Branch
 
3 Git
3 Git3 Git
3 Git
 
Git vs Subversion: ¿Cuando elegir uno u otro?
Git vs Subversion: ¿Cuando elegir uno u otro?Git vs Subversion: ¿Cuando elegir uno u otro?
Git vs Subversion: ¿Cuando elegir uno u otro?
 
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIs
 
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devsITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
 
Working with Git
Working with GitWorking with Git
Working with Git
 
Git
GitGit
Git
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
 
What's new with tooling for Spring, Grails, and the Cloud
What's new with tooling for Spring, Grails, and the CloudWhat's new with tooling for Spring, Grails, and the Cloud
What's new with tooling for Spring, Grails, and the Cloud
 

More from Eugene Yokota

Equality in Scala (ScalaMatsuri 2020)
Equality in Scala (ScalaMatsuri 2020)Equality in Scala (ScalaMatsuri 2020)
Equality in Scala (ScalaMatsuri 2020)Eugene Yokota
 
sbt: core concepts and updates (Scala Love 2020)
sbt: core concepts and updates (Scala Love 2020)sbt: core concepts and updates (Scala Love 2020)
sbt: core concepts and updates (Scala Love 2020)Eugene Yokota
 
Analysis of Zinc (nescala 2020)
Analysis of Zinc (nescala 2020)Analysis of Zinc (nescala 2020)
Analysis of Zinc (nescala 2020)Eugene Yokota
 
Analysis of Zinc (ScalaSphere 2019)
Analysis of Zinc (ScalaSphere 2019)Analysis of Zinc (ScalaSphere 2019)
Analysis of Zinc (ScalaSphere 2019)Eugene Yokota
 
sbt core concepts (ScalaMatsuri 2019)
sbt core concepts (ScalaMatsuri 2019)sbt core concepts (ScalaMatsuri 2019)
sbt core concepts (ScalaMatsuri 2019)Eugene Yokota
 
pull requests I sent to scala/scala (ny-scala 2019)
pull requests I sent to scala/scala (ny-scala 2019)pull requests I sent to scala/scala (ny-scala 2019)
pull requests I sent to scala/scala (ny-scala 2019)Eugene Yokota
 
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)Eugene Yokota
 
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaMatsuri ver)
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaMatsuri ver)The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaMatsuri ver)
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaMatsuri ver)Eugene Yokota
 
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Eugene Yokota
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with serverEugene Yokota
 

More from Eugene Yokota (11)

Equality in Scala (ScalaMatsuri 2020)
Equality in Scala (ScalaMatsuri 2020)Equality in Scala (ScalaMatsuri 2020)
Equality in Scala (ScalaMatsuri 2020)
 
sbt: core concepts and updates (Scala Love 2020)
sbt: core concepts and updates (Scala Love 2020)sbt: core concepts and updates (Scala Love 2020)
sbt: core concepts and updates (Scala Love 2020)
 
Analysis of Zinc (nescala 2020)
Analysis of Zinc (nescala 2020)Analysis of Zinc (nescala 2020)
Analysis of Zinc (nescala 2020)
 
Analysis of Zinc (ScalaSphere 2019)
Analysis of Zinc (ScalaSphere 2019)Analysis of Zinc (ScalaSphere 2019)
Analysis of Zinc (ScalaSphere 2019)
 
sbt core concepts (ScalaMatsuri 2019)
sbt core concepts (ScalaMatsuri 2019)sbt core concepts (ScalaMatsuri 2019)
sbt core concepts (ScalaMatsuri 2019)
 
pull requests I sent to scala/scala (ny-scala 2019)
pull requests I sent to scala/scala (ny-scala 2019)pull requests I sent to scala/scala (ny-scala 2019)
pull requests I sent to scala/scala (ny-scala 2019)
 
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
 
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaMatsuri ver)
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaMatsuri ver)The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaMatsuri ver)
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaMatsuri ver)
 
Thinking in Cats
Thinking in CatsThinking in Cats
Thinking in Cats
 
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
 

Recently uploaded

Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 

Recently uploaded (20)

Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 

sbt 1

  • 1. sbt 1 Eugene Yokota (@eed3si9n) Dale Wijnand (@dwijnand)
 June 2018
  • 2. • Lightbend Tooling team who are these guys Eugene (@eed3si9n) Dale (@dwijnand) • Lightbend Tooling team
  • 3. sbt by example • https://www.scala-sbt.org/1.x/docs/sbt-by- example.html
  • 6. overhaul • remove old parts • update new parts • know-how of rebuilding the parts
  • 7. goal of sbt 1 • minimize conceptual jump from sbt 0.13
  • 8. sbt 1 (updated parts) • Semantic Versioning • Binary compatible throughout 1.y.z • Feature releases and Patch releases
  • 9. sbt 1 (updated parts) • Use Maven Central • As opposed to Ivy layout hosted on Bintray behind redirect
  • 10. sbt 1 (updated parts) • Use Scala 2.12 for build definition • As opposed to Scala 2.10
  • 11. sbt 1 (updated parts) • Pseudo-case classes generated by Contraband • https://www.scala-sbt.org/contraband/ • Instead of .copy(foo = 1), you write .withFoo(1) • Generates JSON codec
  • 12. sbt 1 (updated parts) • Incremental compiler Zinc 1 • https://github.com/sbt/zinc • Class-based name hashing
  • 13. sbt 1 (updated parts) • Library Management (LM) API • https://github.com/sbt/librarymanagement • Abstracts Apache Ivy so we can replace it later
  • 14. sbt 1 (removed parts) • sbt.Plugin • Use sbt.AutoPlugin introduced in sbt 0.13.5
  • 15. sbt 1 (removed parts) • sbt 0.12 style • the key dependency operators: <<=, <+=, <++= • the tuple enrichments (apply and map) • sbt.Build trait in project/Build.scala
  • 16. sbt 1 (new parts) • sbt server • unified slash syntax • more on these later
  • 18. sbt is a hub • builds • dependency graph, library ecosystem • test interface • development tasks • plugins • developers (users & contributors)
  • 19. how big is the ecosystem • 147,367 code results • "scalaVersion" extension:sbt
  • 20. how big is the ecosystem • 209,745 download per month (sbt 1 on Maven Central) • (excludes preloaded .zip, .tgz, .msi)
  • 21. how big is the ecosystem • 12956 downloads (in 7 days after 1.1.5 came out)
  • 22. how big is the ecosystem • 455 plugins (341 0.13 plugins; 224 1.0 plugins) • 600+ packages on Bintray sbt/sbt-plugin-releases
  • 23. migrating the plugin ecosystem • organizing community efforts 10 days later..
  • 24. migrating the plugins ecosystem • 99 plugins were on sbt 1 in 2 months
  • 25. Places to find us • sbt 1 / Zinc meeting (every Wednesday) • Gitter (sbt/sbt + sbt/sbt-contrib) • Lightbend Discuss: https:// discuss.lightbend.com/c/tooling • Stackoverflow: http://stackoverflow.com/ tags/sbt • GitHub Issues: sbt/sbt • Twitter: https://twitter.com/scala_sbt • and lots of repos...
  • 26. GitHub repos • sbt/sbt - the build tool • sbt/zinc • sbt/librarymanagement • sbt/util • sbt/io • sbt/website • sbt/launcher • sbt/sbt-launcher-package • sbt/contraband • sbt/sbt-houserules
  • 27. GitHub repos • sbt/sbt - the build tool • sbt/zinc • sbt/librarymanagement • sbt/util • sbt/io • sbt/website • sbt/launcher • sbt/sbt-launcher-package • sbt/contraband • sbt/sbt-houserules all repos: • build: sbt • PR validation: Travis CI • Testing: ScalaTest/Specs2/ScalaCheck/scripted
  • 28. Types of contributions • Help adoption • Assist other users • At work, on Stackoverflow etc • Contribute to documentation • Garden the issue tracker • Report issues • Expand ecosystem • Patch the core
  • 29. Gardening the issue tracker • Summarize discussions from other channels • Capture problems • Sift facts, opinions, and analysis (steps, problems, expectations, notes) • Reproduce the reported issues • Triage • Leaving breadcrumbs for contributors (previous discussions, source links)
  • 30. Patching the core • Lightbend Discuss • "Help wanted", "Good first issue"
  • 31. Plugins that got merged to sbt • sbt-core-next • sbt-doge • sbt-slash • sbt-cross-building
  • 34. Language Server Protocol • created by Microsoft for VS Code • abstracts IDE features like a web API LSP VS Code Eclipse Sublime 3 NeoVim TypeScript Python sbt
  • 35. demand for rich development environment • Jump to error • Code navigation • Tab completion • Visual debugging • Incremental compiler • Library management • Test integration • Plugin capabilities (100+ of plugins) Editors sbt • LSP • Event logging
  • 36. a brief history of sbt server • 'client-server split for sbt' (2013) Havoc Pennington • A proposal to split sbt into 2 JVMs: client (cmd, IDE, Play run etc) talks to server. • Typesafe Activator 1.3.0 (2015) was released using sbt-remote-control. • 'sbt server reboot' (2016) Eugene Yokota • 1 JVM. sbt server listens to both CLI and network. IDEA calling compile. • sbt 1.1.0 (2017) was released with server built-in using Language Server Protocol.
  • 37. • single JVM process • implemented as a command, sort of • JSON API to drive sbt from network what is sbt server?
  • 38. • IDE integration • Distributed build example usages
  • 39. sbt main loop shell prompts the user
  • 40. sbt new "shell" command shell prompts the user, 
 and listens to network
  • 41. nc $ nc -U /Users/foo/.sbt/1.0/server/ 0845deda85cb41abcdef/sock Content-Length: 99^M ^M { "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "initializationOptions": { } } }^M ...
  • 42. input/output of common tasks compile task
  • 43. input/output of common tasks • Outputs are side effects to disk and screen
  • 44. event logging • A way to log object (semantic logging) • Logs are then relayed as JSON • Decoupled from screens
  • 46. sbt • a way of describing your build • interactive shell for development
  • 47. sbt 0.13 • (scalacOptions in (Test, console)).value • test:console::scalacOptions
  • 49. unified slash syntax • [reference /] [Config /] [intask /] key • foo / compile • foo / Test / compile • ThisBuild / organization • foo / Compile / console / scalacOptions
  • 50. scope delegation • [reference /] [Config /] [intask /] key • foo / Test / console / scalacOptions Zero Runtime console Compile Zero Zero ThisBuild Zero Zero ... ...
  • 53. sbt-sriracha • adds .sourceDependency(scoptJVMRef, scoptJVMLib) • use -Dsbt.sourcemode=true to switch http://eed3si9n.com/hot-source-dependencies-using-sbt-sriracha lazy val scoptJVMRef = ProjectRef( workspaceDirectory / "scopt", "scoptJVM") lazy val scoptJVMLib = "com.github.scopt" %% "scopt" % "3.7.0"   lazy val root = (project in file(".")) .sourceDependency(scoptJVMRef, scoptJVMLib) .settings( name := "Hello world" )
  • 54. cross building across Scala versions, platforms, etc
  • 55. sbt-projectmatrix (TBA) • adds lazy val foo = projectMatrix lazy val core = (projectMatrix in file("core")) .scalaVersions("2.12.6", "2.11.12") .settings( name := "core" ) .jvmPlatform() lazy val app = (projectMatrix in file("app")) .dependsOn(core) .scalaVersions("2.12.6") .settings( name := "app" ) .jvmPlatform() https://discuss.lightbend.com/t/spatial-representation-of-cross- building/1277/9
  • 56. Potential areas of contribution • Library management (Coursier) • Dependency locking • Migrate code examples to compiled docs • Look for "Help wanted" label in GitHub issues
  • 58.