SlideShare une entreprise Scribd logo
1  sur  53
The road to sbt 1.0
Paved with Server
Who are we?
@eed3si9n
(Eugene Yokota)
● sbt core dev
● scalaxb
● treehugger.scala
● "learning Scalaz"
● sbt-assembly etc
Josh Suereth
● Big Nerd
● Leader of tools
team @ Typesafe
● Author
o Scala in Depth
o sbt in Action
Agenda
● A brief (incomplete and mostly wrong) history of Build Tools
● A roadmap to sbt 1.0
o Modularization
● sbt-server
A brief history of build tools
Incomplete and mostly wrong
#!/bin/sh
$ make -j 2 hello
# Makefile
OBJ = test.o test2.o
%.o : %.c
$(CC) -c -o $@ < $<
hello : $(OBJ)
gcc -o $@ $^
Make (1976)
● new! Dependency-based programming
● Uses system command to carry out tasks
● problem! Machine-dependent
Q: How do I build this program?
Autoconf/Automake (1991/1996)
● Generate configure script and Makefile templates
o Configure generates header scripts and real makefile
o Configure discovers what the machine has
● Use an even MORE arcane syntax
o m4 macros
o magic strings
Q: How do I build on this machine?
Internet
$ ant dist
<project name="MyProject" default="dist" basedir=".">
<description>example build file</description>
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<target name="compile" description="compile the source " >
<javac srcdir="${src}" destdir="${build}"/>
</target>
<target name="dist" depends="compile"
description="generate the distribution" >
<mkdir dir="${dist}/lib"/>
<jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar"
basedir="${build}"/>
</target>
</project>
Ant (2000)
Q: How do I build on this machine?
● new! Built-in tasks like mkdir, javac, and jar
o Self-contained and platform-independent
● task plugins (like ant-contrib)
● problem! Hard to reuse build logic
Package managers
Q: How do I find library source/binary?
● new! Metadata to track library dependencies
● new! Repository to host source and binary
● CTAN (1993), Port (1994), RPM (1997), APT (1998)
Maven (2004)
Q: How do I find library source/binary?
Q: How do I enforce consistent builds?
● Metadata to track library dependencies
● Repository to host source and binary
● new! Default build (Convention over Configuration)
● new! Plugins that allowed reuse of build logic
● problem! Difficult to customize
Ivy (2004)
Q: How do I find library source/binary?
● Metadata to track library dependencies
● Repository to host source and binary
● Maven integration on top of Ant
Rake (2003)
rule '.o' => ['.c'] do |t|
sh "cc #{t.source} -c -o #{t.name}"
end
task :name, [:first_name, :last_name] do |t, args|
puts "First name is #{args.first_name}"
puts "Last name is #{args.last_name}"
end
Rake (2004)
Q: How do I build on this machine?
Q: How do I customize my build?
● new! Internal DSL
o Leverage Ruby libraries rather than shell programs
o Provide cross-platform ruby libraries for supported language tools
● Real programming language to write tasks
O NOES XML!
SAX parsing is declared uncool
(immediately after inception)
REST/JSON attempt to displace SOAP
Buildr (2008)/Gradle (2009)/ Leningen(2009)
● Maven integration
Q: How do I find library source/binary?
Q: How do I customize my build?
● Use an internal DSL and a real program language
sbt (2008)
Q: How do I find library source/binary?
Q: How do I customize my build?
Q: How can I develop faster?
● new! Incremental compiler tracking source deps
● new! Interactive shell + library-aware REPL
● new! Test framework abstraction
● new! Parallel by default
● shabby-chic! ANSI colors
● Internal DSL + Maven integration
Google Blaze (2009)
Q: How can I develop faster?
Q: How do I avoid version conflicts?
● new! Incremental build
● new! Cache builds remotely
● new! Clustered Building
● Abandon Maven. Check in all source to version control.
Force everyone on the same version.
● 1 SCM repo for all projects
● Assume homogeneous-ish environment
Pants (2014)/Buck (2014)
Q: How can I develop faster?
Q: How do I avoid version conflicts?
● Incremental build
● Cache builds remotely
● Force all dependencies to the same version for all
projects
● Put everything in a mono-repository
History
make (1977)
automake (1996)/
autoconf (1991)
Rake (2003)
Maven (2004)
Ivy (2004)
sbt (2008)
Blaze (2009)
Gradle (2009)
Leiningen
(2009)
Pants (2014)
Buck (2014)
RPM (1997)
Ant (2000)
Buildr (2008)
Jon Pretty's shell scripts (2004-2015)
History Recap
● sbt has inherited:
o dependency based programming (Make)
o internal build DSL (Rake)
o Package/Library Management (Maven)
o Convention over configuration (Maven)
o Re-usable build flow (Maven)
● sbt brings:
o interactivity (on the shell)
o parallel by default
A roadmap to sbt 1.0
stability + sbt server => modularization
Stability
1. Conceptual stability
2. Binary compatibility of sbt plugins
3. Source compatibility of build files
Concepts (mostly stable)
1. Scala incremental compiler
2. Dependency manager (Scala-aware)
3. Task and plugin system (using Scala)
4. Test framework abstraction
5. Text-based interactive shell
5. sbt server + client(s)
Plugin binary compatibility
● sbt 0.13 maintained 18 months of bincompat
o Lots of hacks and effort. Unable to remove cruft.
● sbt 1.x.y should be bincompat with 1.0.0
● Need to minimize surface API
o able to add small features when requested
Build source compatibility
● Source compatibility of your build.sbt
● sbt 1.x.y should be stable
● sbt 1.0 gives us opportunity to break DSL
o Deprecate project/build.scala?
o Unify sbt shell key syntax w/ Scala DSL syntax
Modularization
Componentize stable features, innovate new ideas
1. Pull out cohesive subprojects
2. Distinguish public API and internal details
3. Document usages
4. Clean up historical code
5. Cross publish for latest scala versions
(if applicable)
6. Publish to Maven Central (or JCenter)
Module candidates
● Launcher API
● Serialization API
● Compiler/REPL API
● Test framework API
● Dependency Management API
● Network API
● IO API
● Task DSL
● Completion API
● sbt client (sbt-server)
sbt-server
Architecture and Design
The problem
● Many things want access to the build
● We need to centrally control build-related
tasks to avoid breakage.
o intellij auto-import + "sbt ~ test"
o activator + "play run"
sbt-server design
sbt-server
disk (target/)
sbt client
commands /
watches
changes
Events
(logs, status, custom)
Before server - Command Engine
CMD
(compile)
Engine
(sequential)
Task Engine
(parallel)
Read next
command from
stdin
Next
command
Read previous
log file Reload the build
Terminal
Client
After server - Execution Queue
CMD
(compile)
Engine
TasksRead server
Queue
Next
command
previous
log file
Reload
the build
Server Event
Loop
Request Queue
CommandQueue
Client #1 Client #2
LatestState
Next State
Problem: Server discovery
Who starts the sbt-server, how do we know it is
running, how do we connect?
sbt-launcher
● sbt 0.13.2 launcher had support for "servers"
o launch config specifies "lock" file which prevents
more than one service being started
o "lock" file contains location (ip / port) of the service
o server is tested (ping) for liveness by the launcher.
Problem: Disconnects
● Client may not be the one to start sbt
● Client may disconnect from server, or server
may crash
Connect as an Event
val connector = SbtConnector(
"terminal", "Command Line Terminal",
configuration.baseDirectory)
def onConnect(client: SbtClient): Unit = {
client handleEvents { … }
client watch ...
}
connector.open(onConnect, onError)(<execution context>)
Connect as an Event
val connector = SbtConnector(
"terminal", "Command Line Terminal",
configuration.baseDirectory)
def onConnect(client: SbtClient): Unit = {
client handleEvents { … }
client watch ...
}
connector.open(onConnect, onError)(<execution context>)
Clients
reconstruct their
watches
and restore their
view of the build
on any reconnect
Problem: protocol
We needed a good mechanism for client +
server to communicate.
● Something that can evolve and maintain
compatibility
● Something that is easy for plugin authors to
extend.
sbt-serialization
● New library based on Scala Pickling
o JSON - currently supported format.
● sbt-remote-control has versioned protocol
and tests.
● (coming) plugin *Keys as protocol
o remote clients can watch/get values
o require pickler/unpickler when creating *Key
o ??? release plugin "client" jar separate from impl
Problem: Input
sbt tasks may want the user to type input
Example Client (input)
client.requestExecution(
"run",
Some(TerminalInteraction -> TerminalThread)
)
client server
ExecutionRequest
Example task (input)
readInput := {
val context = (interactionService in Global).value
context.readLine("> ", mask=false)
}
Problem: commands block
When running the `run` task, all other build
commands are blocked.
Background Jobs
● tasks can "fork" background jobs in server
● clients can discover/connect/stop with
background jobs.
server
background
job service
Forked "run"
of application
scala REPL
ensime
server?
not implemented
Input/Interaction Design
● Commands
o The requesting client provides the means for
terminal interaction
o Logs and stderr/stdout are sent to all clients.
● Background Jobs (Not Completed Yet)
o Any client can take terminal interaction for a
background task
o opt-in for getting stdout/stderr events
Problem: Existing plugins
Current plugins + sbt should be able to try out
sbt server, without breaking anything
sbt-core-next
A new, optional, plugin for sbt 0.13.x series
which provides the new services for sbt-server
● BackgroundRunService
● InteractionServicePlugin
● SendEventServicePlugin
● SerializersService
In use in Play 2.4
What's next?
sbt-server TODOS
● Interaction Improvements
o readline abstraction (a.k.a. Scala REPL support)
o Background Job hooks
● meta-project as first class citizen
o replace `reload plugins` command for first-class
support
o ~ as first-class citizen in server
● kill-on-bad-state watchdog
How can I help?
http://www.scala-sbt.org/community.html#how-can-I-help
● Follow @scala_sbt
● Contribute to StackOverflow sbt tag
● Report bugs
● Create plugins
o Try/migrate your plugins to remote APIs: https://github.com/sbt/sbt-
core-next
● Patch the core
o Github Community labeled issues
o Subscribe to sbt-dev list
o Join the discussion on Gitter sbt/sbt

Contenu connexe

Tendances

Microservices in Scala: Play Framework
Microservices in Scala: Play FrameworkMicroservices in Scala: Play Framework
Microservices in Scala: Play FrameworkŁukasz Sowa
 
Ansible, integration testing, and you.
Ansible, integration testing, and you.Ansible, integration testing, and you.
Ansible, integration testing, and you.Bob Killen
 
Empowering developers to deploy their own data stores
Empowering developers to deploy their own data storesEmpowering developers to deploy their own data stores
Empowering developers to deploy their own data storesTomas Doran
 
Node.js Development with Apache NetBeans
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeansRyan Cuprak
 
Apache Camel in the belly of the Docker whale
Apache Camel in the belly of the Docker whaleApache Camel in the belly of the Docker whale
Apache Camel in the belly of the Docker whaleHenryk Konsek
 
Nashorn: JavaScript that doesn't suck - Tomer Gabel, Wix
Nashorn: JavaScript that doesn't suck - Tomer Gabel, WixNashorn: JavaScript that doesn't suck - Tomer Gabel, Wix
Nashorn: JavaScript that doesn't suck - Tomer Gabel, WixCodemotion Tel Aviv
 
Flyway: The agile database migration framework for Java
Flyway: The agile database migration framework for JavaFlyway: The agile database migration framework for Java
Flyway: The agile database migration framework for JavaAxel Fontaine
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Ryan Cuprak
 
Polygot Java EE on the GraalVM
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVMRyan Cuprak
 
Utilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIOliver Busse
 
A Tour of the Modern Java Platform
A Tour of the Modern Java PlatformA Tour of the Modern Java Platform
A Tour of the Modern Java PlatformVMware Tanzu
 
Building Distributed Systems in Scala
Building Distributed Systems in ScalaBuilding Distributed Systems in Scala
Building Distributed Systems in ScalaAlex Payne
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with GradleRyan Cuprak
 
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법Open Source Consulting
 
Getting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydbGetting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydbGirish Bapat
 
Modular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafModular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafIoan Eugen Stan
 
Developing distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterDeveloping distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterKonstantin Tsykulenko
 

Tendances (20)

Microservices in Scala: Play Framework
Microservices in Scala: Play FrameworkMicroservices in Scala: Play Framework
Microservices in Scala: Play Framework
 
Ansible, integration testing, and you.
Ansible, integration testing, and you.Ansible, integration testing, and you.
Ansible, integration testing, and you.
 
Empowering developers to deploy their own data stores
Empowering developers to deploy their own data storesEmpowering developers to deploy their own data stores
Empowering developers to deploy their own data stores
 
Node.js Development with Apache NetBeans
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeans
 
De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14
 
Apache Camel in the belly of the Docker whale
Apache Camel in the belly of the Docker whaleApache Camel in the belly of the Docker whale
Apache Camel in the belly of the Docker whale
 
Nashorn: JavaScript that doesn't suck - Tomer Gabel, Wix
Nashorn: JavaScript that doesn't suck - Tomer Gabel, WixNashorn: JavaScript that doesn't suck - Tomer Gabel, Wix
Nashorn: JavaScript that doesn't suck - Tomer Gabel, Wix
 
Flyway: The agile database migration framework for Java
Flyway: The agile database migration framework for JavaFlyway: The agile database migration framework for Java
Flyway: The agile database migration framework for Java
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
 
Polygot Java EE on the GraalVM
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVM
 
Utilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino API
 
A Tour of the Modern Java Platform
A Tour of the Modern Java PlatformA Tour of the Modern Java Platform
A Tour of the Modern Java Platform
 
Building Distributed Systems in Scala
Building Distributed Systems in ScalaBuilding Distributed Systems in Scala
Building Distributed Systems in Scala
 
Javantura v3 - ES6 – Future Is Now – Nenad Pečanac
Javantura v3 - ES6 – Future Is Now – Nenad PečanacJavantura v3 - ES6 – Future Is Now – Nenad Pečanac
Javantura v3 - ES6 – Future Is Now – Nenad Pečanac
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
 
Getting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydbGetting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydb
 
Modular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafModular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache Karaf
 
De Java 8 a Java 17
De Java 8 a Java 17De Java 8 a Java 17
De Java 8 a Java 17
 
Developing distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterDeveloping distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka Cluster
 

En vedette

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
 
Innovating faster with SBT, Continuous Delivery, and LXC
Innovating faster with SBT, Continuous Delivery, and LXCInnovating faster with SBT, Continuous Delivery, and LXC
Innovating faster with SBT, Continuous Delivery, and LXCkscaldef
 
Hadoop Summit 2013 : Continuous Integration on top of hadoop
Hadoop Summit 2013 : Continuous Integration on top of hadoopHadoop Summit 2013 : Continuous Integration on top of hadoop
Hadoop Summit 2013 : Continuous Integration on top of hadoopWisely chen
 
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
 
Continuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyreContinuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyreSpark Summit
 

En vedette (9)

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)
 
SBT Concepts, part 2
SBT Concepts, part 2SBT Concepts, part 2
SBT Concepts, part 2
 
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)
 
SBT Crash Course
SBT Crash CourseSBT Crash Course
SBT Crash Course
 
Innovating faster with SBT, Continuous Delivery, and LXC
Innovating faster with SBT, Continuous Delivery, and LXCInnovating faster with SBT, Continuous Delivery, and LXC
Innovating faster with SBT, Continuous Delivery, and LXC
 
Hadoop Summit 2013 : Continuous Integration on top of hadoop
Hadoop Summit 2013 : Continuous Integration on top of hadoopHadoop Summit 2013 : Continuous Integration on top of hadoop
Hadoop Summit 2013 : Continuous Integration on top of hadoop
 
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)
 
Continuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyreContinuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyre
 
Build application using sbt
Build application using sbtBuild application using sbt
Build application using sbt
 

Similaire à Road to sbt 1.0 paved with server

차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVMJung Kim
 
Why kernelspace sucks?
Why kernelspace sucks?Why kernelspace sucks?
Why kernelspace sucks?OpenFest team
 
.NET Applications & Cloud Meetup at 7 Peaks
.NET Applications & Cloud Meetup at 7 Peaks.NET Applications & Cloud Meetup at 7 Peaks
.NET Applications & Cloud Meetup at 7 PeaksSeven Peaks Speaks
 
Scala, docker and testing, oh my! mario camou
Scala, docker and testing, oh my! mario camouScala, docker and testing, oh my! mario camou
Scala, docker and testing, oh my! mario camouJ On The Beach
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And BeyondVMware Tanzu
 
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps WayDevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Waysmalltown
 
OSDC 2016 | rkt and Kubernetes: What’s new with Container Runtimes and Orches...
OSDC 2016 | rkt and Kubernetes: What’s new with Container Runtimes and Orches...OSDC 2016 | rkt and Kubernetes: What’s new with Container Runtimes and Orches...
OSDC 2016 | rkt and Kubernetes: What’s new with Container Runtimes and Orches...NETWAYS
 
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...NETWAYS
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
Makefile for python projects
Makefile for python projectsMakefile for python projects
Makefile for python projectsMpho Mphego
 
Dart the Better JavaScript
Dart the Better JavaScriptDart the Better JavaScript
Dart the Better JavaScriptJorg Janke
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...Ambassador Labs
 
(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_netNico Ludwig
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'acorehard_by
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present futurelolopetit
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development PipelineGlobalLogic Ukraine
 
MoldCamp - multidimentional testing workflow. CIBox.
MoldCamp  - multidimentional testing workflow. CIBox.MoldCamp  - multidimentional testing workflow. CIBox.
MoldCamp - multidimentional testing workflow. CIBox.Andrii Podanenko
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systemssosorry
 
DrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxDrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxAndrii Podanenko
 

Similaire à Road to sbt 1.0 paved with server (20)

차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
 
Nodejs
NodejsNodejs
Nodejs
 
Why kernelspace sucks?
Why kernelspace sucks?Why kernelspace sucks?
Why kernelspace sucks?
 
.NET Applications & Cloud Meetup at 7 Peaks
.NET Applications & Cloud Meetup at 7 Peaks.NET Applications & Cloud Meetup at 7 Peaks
.NET Applications & Cloud Meetup at 7 Peaks
 
Scala, docker and testing, oh my! mario camou
Scala, docker and testing, oh my! mario camouScala, docker and testing, oh my! mario camou
Scala, docker and testing, oh my! mario camou
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps WayDevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
 
OSDC 2016 | rkt and Kubernetes: What’s new with Container Runtimes and Orches...
OSDC 2016 | rkt and Kubernetes: What’s new with Container Runtimes and Orches...OSDC 2016 | rkt and Kubernetes: What’s new with Container Runtimes and Orches...
OSDC 2016 | rkt and Kubernetes: What’s new with Container Runtimes and Orches...
 
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Makefile for python projects
Makefile for python projectsMakefile for python projects
Makefile for python projects
 
Dart the Better JavaScript
Dart the Better JavaScriptDart the Better JavaScript
Dart the Better JavaScript
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
 
(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present future
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
MoldCamp - multidimentional testing workflow. CIBox.
MoldCamp  - multidimentional testing workflow. CIBox.MoldCamp  - multidimentional testing workflow. CIBox.
MoldCamp - multidimentional testing workflow. CIBox.
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems
 
DrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxDrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration Toolbox
 

Plus de 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 server (LSP discussion, 2018 Jan)
sbt server (LSP discussion, 2018 Jan)sbt server (LSP discussion, 2018 Jan)
sbt server (LSP discussion, 2018 Jan)Eugene Yokota
 

Plus de Eugene Yokota (9)

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 1
sbt 1sbt 1
sbt 1
 
sbt server (LSP discussion, 2018 Jan)
sbt server (LSP discussion, 2018 Jan)sbt server (LSP discussion, 2018 Jan)
sbt server (LSP discussion, 2018 Jan)
 
Thinking in Cats
Thinking in CatsThinking in Cats
Thinking in Cats
 

Dernier

Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
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
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
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
 
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
 
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
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
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
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
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
 

Dernier (20)

Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
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...
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
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
 
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 - ...
 
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
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
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
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
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
 

Road to sbt 1.0 paved with server

  • 1. The road to sbt 1.0 Paved with Server
  • 2. Who are we? @eed3si9n (Eugene Yokota) ● sbt core dev ● scalaxb ● treehugger.scala ● "learning Scalaz" ● sbt-assembly etc Josh Suereth ● Big Nerd ● Leader of tools team @ Typesafe ● Author o Scala in Depth o sbt in Action
  • 3. Agenda ● A brief (incomplete and mostly wrong) history of Build Tools ● A roadmap to sbt 1.0 o Modularization ● sbt-server
  • 4. A brief history of build tools Incomplete and mostly wrong
  • 6. $ make -j 2 hello # Makefile OBJ = test.o test2.o %.o : %.c $(CC) -c -o $@ < $< hello : $(OBJ) gcc -o $@ $^
  • 7. Make (1976) ● new! Dependency-based programming ● Uses system command to carry out tasks ● problem! Machine-dependent Q: How do I build this program?
  • 8. Autoconf/Automake (1991/1996) ● Generate configure script and Makefile templates o Configure generates header scripts and real makefile o Configure discovers what the machine has ● Use an even MORE arcane syntax o m4 macros o magic strings Q: How do I build on this machine?
  • 10. $ ant dist <project name="MyProject" default="dist" basedir="."> <description>example build file</description> <property name="src" location="src"/> <property name="build" location="build"/> <property name="dist" location="dist"/> <target name="compile" description="compile the source " > <javac srcdir="${src}" destdir="${build}"/> </target> <target name="dist" depends="compile" description="generate the distribution" > <mkdir dir="${dist}/lib"/> <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/> </target> </project>
  • 11. Ant (2000) Q: How do I build on this machine? ● new! Built-in tasks like mkdir, javac, and jar o Self-contained and platform-independent ● task plugins (like ant-contrib) ● problem! Hard to reuse build logic
  • 12. Package managers Q: How do I find library source/binary? ● new! Metadata to track library dependencies ● new! Repository to host source and binary ● CTAN (1993), Port (1994), RPM (1997), APT (1998)
  • 13. Maven (2004) Q: How do I find library source/binary? Q: How do I enforce consistent builds? ● Metadata to track library dependencies ● Repository to host source and binary ● new! Default build (Convention over Configuration) ● new! Plugins that allowed reuse of build logic ● problem! Difficult to customize
  • 14. Ivy (2004) Q: How do I find library source/binary? ● Metadata to track library dependencies ● Repository to host source and binary ● Maven integration on top of Ant
  • 15. Rake (2003) rule '.o' => ['.c'] do |t| sh "cc #{t.source} -c -o #{t.name}" end task :name, [:first_name, :last_name] do |t, args| puts "First name is #{args.first_name}" puts "Last name is #{args.last_name}" end
  • 16. Rake (2004) Q: How do I build on this machine? Q: How do I customize my build? ● new! Internal DSL o Leverage Ruby libraries rather than shell programs o Provide cross-platform ruby libraries for supported language tools ● Real programming language to write tasks
  • 17. O NOES XML! SAX parsing is declared uncool (immediately after inception) REST/JSON attempt to displace SOAP
  • 18. Buildr (2008)/Gradle (2009)/ Leningen(2009) ● Maven integration Q: How do I find library source/binary? Q: How do I customize my build? ● Use an internal DSL and a real program language
  • 19. sbt (2008) Q: How do I find library source/binary? Q: How do I customize my build? Q: How can I develop faster? ● new! Incremental compiler tracking source deps ● new! Interactive shell + library-aware REPL ● new! Test framework abstraction ● new! Parallel by default ● shabby-chic! ANSI colors ● Internal DSL + Maven integration
  • 20. Google Blaze (2009) Q: How can I develop faster? Q: How do I avoid version conflicts? ● new! Incremental build ● new! Cache builds remotely ● new! Clustered Building ● Abandon Maven. Check in all source to version control. Force everyone on the same version. ● 1 SCM repo for all projects ● Assume homogeneous-ish environment
  • 21. Pants (2014)/Buck (2014) Q: How can I develop faster? Q: How do I avoid version conflicts? ● Incremental build ● Cache builds remotely ● Force all dependencies to the same version for all projects ● Put everything in a mono-repository
  • 22. History make (1977) automake (1996)/ autoconf (1991) Rake (2003) Maven (2004) Ivy (2004) sbt (2008) Blaze (2009) Gradle (2009) Leiningen (2009) Pants (2014) Buck (2014) RPM (1997) Ant (2000) Buildr (2008) Jon Pretty's shell scripts (2004-2015)
  • 23. History Recap ● sbt has inherited: o dependency based programming (Make) o internal build DSL (Rake) o Package/Library Management (Maven) o Convention over configuration (Maven) o Re-usable build flow (Maven) ● sbt brings: o interactivity (on the shell) o parallel by default
  • 24. A roadmap to sbt 1.0 stability + sbt server => modularization
  • 25. Stability 1. Conceptual stability 2. Binary compatibility of sbt plugins 3. Source compatibility of build files
  • 26. Concepts (mostly stable) 1. Scala incremental compiler 2. Dependency manager (Scala-aware) 3. Task and plugin system (using Scala) 4. Test framework abstraction 5. Text-based interactive shell 5. sbt server + client(s)
  • 27. Plugin binary compatibility ● sbt 0.13 maintained 18 months of bincompat o Lots of hacks and effort. Unable to remove cruft. ● sbt 1.x.y should be bincompat with 1.0.0 ● Need to minimize surface API o able to add small features when requested
  • 28. Build source compatibility ● Source compatibility of your build.sbt ● sbt 1.x.y should be stable ● sbt 1.0 gives us opportunity to break DSL o Deprecate project/build.scala? o Unify sbt shell key syntax w/ Scala DSL syntax
  • 29. Modularization Componentize stable features, innovate new ideas 1. Pull out cohesive subprojects 2. Distinguish public API and internal details 3. Document usages 4. Clean up historical code 5. Cross publish for latest scala versions (if applicable) 6. Publish to Maven Central (or JCenter)
  • 30. Module candidates ● Launcher API ● Serialization API ● Compiler/REPL API ● Test framework API ● Dependency Management API ● Network API ● IO API ● Task DSL ● Completion API ● sbt client (sbt-server)
  • 32. The problem ● Many things want access to the build ● We need to centrally control build-related tasks to avoid breakage. o intellij auto-import + "sbt ~ test" o activator + "play run"
  • 33. sbt-server design sbt-server disk (target/) sbt client commands / watches changes Events (logs, status, custom)
  • 34. Before server - Command Engine CMD (compile) Engine (sequential) Task Engine (parallel) Read next command from stdin Next command Read previous log file Reload the build Terminal Client
  • 35. After server - Execution Queue CMD (compile) Engine TasksRead server Queue Next command previous log file Reload the build Server Event Loop Request Queue CommandQueue Client #1 Client #2 LatestState Next State
  • 36. Problem: Server discovery Who starts the sbt-server, how do we know it is running, how do we connect?
  • 37. sbt-launcher ● sbt 0.13.2 launcher had support for "servers" o launch config specifies "lock" file which prevents more than one service being started o "lock" file contains location (ip / port) of the service o server is tested (ping) for liveness by the launcher.
  • 38. Problem: Disconnects ● Client may not be the one to start sbt ● Client may disconnect from server, or server may crash
  • 39. Connect as an Event val connector = SbtConnector( "terminal", "Command Line Terminal", configuration.baseDirectory) def onConnect(client: SbtClient): Unit = { client handleEvents { … } client watch ... } connector.open(onConnect, onError)(<execution context>)
  • 40. Connect as an Event val connector = SbtConnector( "terminal", "Command Line Terminal", configuration.baseDirectory) def onConnect(client: SbtClient): Unit = { client handleEvents { … } client watch ... } connector.open(onConnect, onError)(<execution context>) Clients reconstruct their watches and restore their view of the build on any reconnect
  • 41. Problem: protocol We needed a good mechanism for client + server to communicate. ● Something that can evolve and maintain compatibility ● Something that is easy for plugin authors to extend.
  • 42. sbt-serialization ● New library based on Scala Pickling o JSON - currently supported format. ● sbt-remote-control has versioned protocol and tests. ● (coming) plugin *Keys as protocol o remote clients can watch/get values o require pickler/unpickler when creating *Key o ??? release plugin "client" jar separate from impl
  • 43. Problem: Input sbt tasks may want the user to type input
  • 44. Example Client (input) client.requestExecution( "run", Some(TerminalInteraction -> TerminalThread) ) client server ExecutionRequest
  • 45. Example task (input) readInput := { val context = (interactionService in Global).value context.readLine("> ", mask=false) }
  • 46. Problem: commands block When running the `run` task, all other build commands are blocked.
  • 47. Background Jobs ● tasks can "fork" background jobs in server ● clients can discover/connect/stop with background jobs. server background job service Forked "run" of application scala REPL ensime server? not implemented
  • 48. Input/Interaction Design ● Commands o The requesting client provides the means for terminal interaction o Logs and stderr/stdout are sent to all clients. ● Background Jobs (Not Completed Yet) o Any client can take terminal interaction for a background task o opt-in for getting stdout/stderr events
  • 49. Problem: Existing plugins Current plugins + sbt should be able to try out sbt server, without breaking anything
  • 50. sbt-core-next A new, optional, plugin for sbt 0.13.x series which provides the new services for sbt-server ● BackgroundRunService ● InteractionServicePlugin ● SendEventServicePlugin ● SerializersService In use in Play 2.4
  • 52. sbt-server TODOS ● Interaction Improvements o readline abstraction (a.k.a. Scala REPL support) o Background Job hooks ● meta-project as first class citizen o replace `reload plugins` command for first-class support o ~ as first-class citizen in server ● kill-on-bad-state watchdog
  • 53. How can I help? http://www.scala-sbt.org/community.html#how-can-I-help ● Follow @scala_sbt ● Contribute to StackOverflow sbt tag ● Report bugs ● Create plugins o Try/migrate your plugins to remote APIs: https://github.com/sbt/sbt- core-next ● Patch the core o Github Community labeled issues o Subscribe to sbt-dev list o Join the discussion on Gitter sbt/sbt

Notes de l'éditeur

  1. This is one of the earliest build script known to human history, which builds System V on PDP-11.
  2. The grandfather of all build tools. In April, 1976, Stuart Feldman found a precious golden ring, and the tab key. He used these to conjure forth Make, a tool of arcane syntax and great power.
  3. Internet happens. Most of the credit is given to HTML.
  4. XML naturally takes over. This is the 2nd generation build tool.
  5. Adds metadata on top of Makefile. Takes advantage of Internet. Not "build tool" in the strict sense but becomes inspiration.
  6. 2004 is a major inflection point in the history of build tools. Combines the ideas from package managers + self-contained tasks. XML.
  7. In 2003 Jim Weirich creates Rake. A Make-like build tool using Ruby.
  8. 4th generation of build tools. Rake revolution hits JVM.
  9. Internal build tool of Google.
  10. 5th generation of build tools. Inspired by Google Blaze Buck is focused on Android development and optimising hot-paths in android dexing Pants is a Twitter/Foursquare project, aimed at Java/Scala and written in python.
  11. Stability from the user experience perspective. No need to learn and re-learn.
  12. sbt plugin is a huge asset to the ecosystem. We care a lot of the binary compatibility of the plugins.
  13. Scala Process API have moved to standard lib We'll be using more external libraries like Scala Pickling and Scala ARM.