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

Shipping python project by docker
Shipping python project by dockerShipping python project by docker
Shipping python project by docker
Wei-Ting Kuo
 
Server and home linux
Server and home linuxServer and home linux
Server and home linux
Tyler Largin
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
John Willis
 

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

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
Robert Lee-Cann
 
3 Git
3 Git3 Git
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
ITCamp
 
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
martinlippert
 

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

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

Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
drm1699
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Marc Lester
 

Recently uploaded (20)

Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphGraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 
Rapidoform for Modern Form Building and Insights
Rapidoform for Modern Form Building and InsightsRapidoform for Modern Form Building and Insights
Rapidoform for Modern Form Building and Insights
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
Your Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | EvmuxYour Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | Evmux
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea Goulet
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 

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.