SlideShare a Scribd company logo
@NSilnitsky
@NSilnitsky
5 Takeaways from
migrating a library to Scala 3
Natan Silnitsky Backend Infra TL, Wix.com
natansil.com twitter@NSilnitsky linkedin/natansilnitsky github.com/natansil
@NSilnitsky
Migrating a library to Scala 3
Greyhound
A Scala/Java high-level SDK
for Apache Kafka.
Powered by ZIO
Takeaways from
migrating a library
@NSilnitsky
Migrating a library to Scala 3
Upgrade
build tool
Migrating a library to Scala 3
Scala
2.13
Scala
3.1
Migrating a library
* code base
SBT
Migrating a library to Scala 3
Scala 2.12
Bazel
Scala
2.13
Scala
3.1
Migrating Greyhound library
Migrating a library to Scala 3
SBT
Scala 2.12
Bazel
Scala
2.13
Scala
3.1
Migrating Greyhound library
Step 1:
Make SBT Work
Migrating a library to Scala 3
Bazel does not support
Scala 3 yet.
And SBT has…
→ a Nice Migration Plugin
→ dedicated syntax
SBT
Scala 2.12
Bazel
Why?
Step 1:
Make SBT Work
Making
SBT Work
1. Change project
directory layout
2. Compile &
Test
@NSilnitsky
@NSilnitsky
lazy val root = project
.in(file("."))
.settings(
name := "greyhound-sbt",
version := "0.1.0-SNAPSHOT",
scalaVersion := "2.12.12",
libraryDependencies ++= Seq(
"com.novocode" % "junit-interface" % "0.11" % "test",
"org.specs2" %% "specs2-junit" % "4.8.3" % "test",
"dev.zio" %% "zio-test-junit" % "1.0.9" % "test",
"org.specs2" %% "specs2-mock" % "4.8.3" % "test",
"dev.zio" %% "zio" % "1.0.9",
"dev.zio" %% "zio-streams" % "1.0.9",
"org.apache.kafka" % "kafka-clients" % "2.4.1",
"org.apache.kafka" %% "kafka" % "2.4.1",
"org.apache.curator" % "curator-test" % "2.12.0",
"com.h2database" % "h2" % "1.4.197"
)
)
build.sbt
Migrating a library to Scala 3
SBT
Scala 2.12
Bazel
Scala
2.13
Scala
3.1
Step 1:
Make SBT Work
Step 2:
Switch to Scala 2.13
Migrating a library to Scala 3
Why?
Scala
2.13
Scala
3.1
compiler
options &
SBT plugins
interoperable
with 2.13 only
!!
from
SBT
to
Scala 2.13
1. Compile it with
scala Version := "2.13.8"
2. Fix errors in our 3rd-party
library dependencies
@NSilnitsky
@NSilnitsky
lazy val root = project
.in(file("."))
.settings(
name := "greyhound-sbt",
version := "0.1.0-SNAPSHOT",
scalaVersion := "2.13.8",
libraryDependencies ++= Seq(
"com.novocode" % "junit-interface" % "0.11" % "test",
"org.specs2" %% "specs2-junit" % "4.8.3" % "test",
"dev.zio" %% "zio-test-junit" % "1.0.9" % "test",
"org.specs2" %% "specs2-mock" % "4.8.3" % "test",
"dev.zio" %% "zio" % "1.0.9",
"dev.zio" %% "zio-streams" % "1.0.9",
"org.apache.kafka" % "kafka-clients" % "2.4.1",
"org.apache.kafka" %% "kafka" % "2.4.1",
"org.apache.curator" % "curator-test" % "2.12.0",
"com.h2database" % "h2" % "1.4.197"
)
Makes sure that libraries are built with Scala 2.13
build.sbt
@NSilnitsky
@NSilnitsky
lazy val root = project
.in(file("."))
.settings(
name := "greyhound-sbt",
version := "0.1.0-SNAPSHOT",
scalaVersion := "2.13.8",
libraryDependencies ++= Seq(
"com.novocode" % "junit-interface" % "0.11" % "test",
"org.specs2" %% "specs2-junit" % "4.8.3" % "test",
"dev.zio" %% "zio-test-junit" % "1.0.9" % "test",
"org.specs2" %% "specs2-mock" % "4.8.3" % "test",
"dev.zio" %% "zio" % "1.0.9",
"dev.zio" %% "zio-streams" % "1.0.9",
"org.apache.kafka" % "kafka-clients" % "2.4.1",
"org.apache.kafka" %% "kafka" % "2.4.1",
"org.apache.curator" % "curator-test" % "2.12.0",
"com.h2database" % "h2" % "1.4.197"
)
build.sbt
"org.specs2" % "specs2-junit_2.13" % "4.8.3" % "test"
from
SBT
to
Scala 2.13
1. Compile it with
scala Version := "2.13.8"
3. Fix errors in our source code
Scalafix!
2. Fix errors in our 3rd-party
library dependencies
👉 addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.34")
To Your
Codebase
Applies
semantic rules
e.g., migrate to
Scala2.13!
Use Scalafix.
Migrating a library to Scala 3
To Your
Codebase
Applies
semantic rules
e.g., migrate to
Scala2.13!
Compiler
Use Scalafix.
Uses a
semantic DB
Migrating a library to Scala 3
* model, decouples
@NSilnitsky
@NSilnitsky
[error] found : scala.collection.MapView[com.wixpress.dst.greyhound.core.TopicPartition,Long]
[error] required: Map[com.wixpress.dst.greyhound.core.TopicPartition,com.wixpress.dst.greyhound.core.Offset]
@NSilnitsky
@NSilnitsky
[error] found : scala.collection.MapView[com.wixpress.dst.greyhound.core.TopicPartition,Long]
[error] required: Map[com.wixpress.dst.greyhound.core.TopicPartition,com.wixpress.dst.greyhound.core.Offset]
mapValues
2.12 → Map
2.13 → MapView
val offsets = records.groupBy(RecordTopicPartition(_)).mapValues(_.maxBy(_.offset).offset + 1)
@NSilnitsky
@NSilnitsky
[error] found : scala.collection.MapView[com.wixpress.dst.greyhound.core.TopicPartition,Long]
[error] required: Map[com.wixpress.dst.greyhound.core.TopicPartition,com.wixpress.dst.greyhound.core.Offset]
mapValues
2.12 → Map
2.13 → MapView
val offsets = records.groupBy(RecordTopicPartition(_)).mapValues(_.maxBy(_.offset).offset + 1)
val offsets = records.groupBy(RecordTopicPartition(_)).mapValues(...).toMap
@NSilnitsky
@NSilnitsky
Allow semantic rules
ThisBuild / scalafixDependencies += "org.scala-lang.modules" %% "scala-collection-migrations" % "2.6.0"
lazy val root = project
.in(file("."))
.settings(
name := "greyhound-sbt",
version := "0.1.0-SNAPSHOT",
scalaVersion := "2.12.12",
addCompilerPlugin(scalafixSemanticdb),
scalacOptions ++= List("-Yrangepos", "-P:semanticdb:synthetics:on"),
libraryDependencies ++= Seq(...)
)
2.13 Migration rules
build.sbt
@NSilnitsky
@NSilnitsky
> scalafix Collection213Roughly
[info] Running scalafix on 69 Scala sources
[success] Total time: 24 s, completed 16 Feb 2022, 22:22:18
Didn’t work!
@NSilnitsky
@NSilnitsky
val offsets = records.groupBy(RecordTopicPartition(_)).mapValues(_.maxBy(_.offset).offset + 1)
val offsets = records.groupBy(RecordTopicPartition(_)).mapValues(...).toMap
> scalafix Collection213Roughly
[info] Running scalafix on 69 Scala sources
[success] Total time: 24 s, completed 16 Feb 2022, 22:22:18
Ended up fixing it manually:
Migrating a library to Scala 3
SBT
Scala 2.12
Bazel
Scala
2.13
Scala
3.1
Step 1:
Make SBT Work
Step 2:
Switch to Scala 2.13
Step 3:
Switch to Scala 3
from
Scala 2.13
to
Scala 3 Scala 3
compiler
Scala 2.13
compiler
3rd-party
library dep
Scala 2.13 TASTy Reader can read TASTy format
Scala3 Unpickler
Classpath
Interoperability
can read Pickle format
Just use the migration tool
from
Scala 2.13
to
Scala 3
SBT migration
plugin
@NSilnitsky
helps you migrate your build & code
to Scala3.
Use SBT Migration Plugin.
Migrating a library to Scala 3
👉 addSbtPlugin("ch.epfl.scala" % "sbt-scala3-migrate" % "0.5.0")
migrate-libs
migrate-scalacOptions
migrate-syntax
migrate
@NSilnitsky
> migrate-libs root
Migrating a library to Scala 3
@NSilnitsky
@NSilnitsky
lazy val root = project
...
scalaVersion := "3.1.0",
libraryDependencies ++= Seq(
"com.novocode" % "junit-interface" % "0.11" % "test",
("org.specs2" %% "specs2-junit" % "4.8.3" % "test").cross(CrossVersion.for3Use2_13),
"dev.zio" %% "zio-test-junit" % "1.0.9" % "test",
("org.specs2" %% "specs2-mock" % "4.8.3" % "test").cross(CrossVersion.for3Use2_13),
)
)
This crossVersion feature allows to
depend on libraries compiled with 2.13
"org.specs2" % "specs2-mock_2.13" % "4.8.3" % "test"
@NSilnitsky
> migrate-syntax root
Migrating a library to Scala 3
@NSilnitsky
> migrate-syntax root
Migrating a library to Scala 3
These changes are not mandatory, and caused many new 2.13 compiler
errors → Rolled back
[error] /…/src/main/scala/future-interop/com/wixpress/dst/greyhound/future/GreyhoundRuntime.scala:27:19: type mismatch;
[error] found : zio.clock.Clock.Service.live.type (with underlying type zio.clock.Clock.Service)
[error] required: zio.blocking.Blocking.Service with zio.random.Random.Service with zio.system.System.Service with
zio.console.Console.Service with zio.clock.Clock.Service
[error] Clock.Service.live,
[error] ^
val zenv: Has[Clock.Service] with Has[Console.Service] with Has[System.Service] with Has[Random.Service] with
Has[Blocking.Service]
compiles in scala 3 with options:
> migrate root
Migrating a library to Scala 3
-source:3.0-migration
-rewrite
@NSilnitsky
@NSilnitsky
scalacOptions ++= Seq(
"-source:3.0-migration"
),
migration mode:
Compiler forgives on most of the dropped features,
printing warnings in place of errors
Scala compiler options
@NSilnitsky
@NSilnitsky
rewrite mode:
Once your code compiles in the migration mode,
Warnings are resolved by the compiler itself
scalacOptions ++= Seq(
"-source:3.0-migration", “-rewrite”
),
➔ Rewrites are NOT applied if the code compiles in error.
➔ You cannot choose which rules are applied (compiler runs all of them).
Scala compiler options
@NSilnitsky
> migrate root
Migrating a library to Scala 3
[warn]
[warn] Note: Unresolved dependencies path:
[error] stack trace is suppressed; run last update for the full output
[error] (update) sbt.librarymanagement.ResolveException: Error downloading org.scalameta:semanticdb-scalac_2.13.8:4.4.31
[error] Not found
[error] Not found
[error] not found: /Users/natans/.ivy2/localorg.scalameta/semanticdb-scalac_2.13.8/4.4.31/ivys/ivy.xml
[error] not found:
https://repo1.maven.org/maven2/org/scalameta/semanticdb-scalac_2.13.8/4.4.31/semanticdb-scalac_2.13.8-4.4.31.pom
@NSilnitsky
> migrate root
Migrating a library to Scala 3
[warn]
[warn] Note: Unresolved dependencies path:
[error] stack trace is suppressed; run last update for the full output
[error] (update) sbt.librarymanagement.ResolveException: Error downloading org.scalameta:semanticdb-scalac_2.13.8:4.4.31
[error] Not found
[error] Not found
[error] not found: /Users/natans/.ivy2/localorg.scalameta/semanticdb-scalac_2.13.8/4.4.31/ivys/ivy.xml
[error] not found:
https://repo1.maven.org/maven2/org/scalameta/semanticdb-scalac_2.13.8/4.4.31/semanticdb-scalac_2.13.8-4.4.31.pom
Failed for 2.13.8
@NSilnitsky
> migrate root
Migrating a library to Scala 3
Downgraded to 2.13.7
@NSilnitsky
Migrating a library to Scala 3
35 | assert(logged)(equalTo(List(
| ^
| Exception occurred while executing macro expansion.
| java.lang.NullPointerException
| at zio.test.Macros$.location(Macros.scala:159)
| at zio.test.Macros$.assert_impl(Macros.scala:175)
"dev.zio" %% "zio-test-junit" % "1.0.9",
"dev.zio" %% "zio-test-junit" % "1.0.13",
@NSilnitsky
@NSilnitsky
> migrate root
Migrating a library to Scala 3
Switched to 3.1
> You can now commit the change ❤
@NSilnitsky
5 other build tools for support
➔ Bazel - work in progress - ETA - end of Q1
➔ Gradle - Scala 3 supported version 7.3
➔ Mill - support in 0.9.x
➔ Maven - 4.5.x (scala-maven-plugin)
➔ Native Cross compilation for your library
Migrating a library to Scala 3
@NSilnitsky
@NSilnitsky
Takeaways
from
migrating a
library to
Scala3
Migrating a library to Scala 3
#1
Use migration tools,
don't do it manually -
it will save you a lot of
time.
* SBT clean
@NSilnitsky
@NSilnitsky
Takeaways
from
migrating a
library to
Scala3
Migrating a library to Scala 3
#2
First switch to 2.13.
2.13 is highly compatible -
Unlike the Python 2/3
situation.
@NSilnitsky
@NSilnitsky
Takeaways
from
migrating a
library to
Scala3
Migrating a library to Scala 3
#3
Switch syntax lazily.
Take your time with syntax
changes.
“Migrate-syntax” plugin step
would have made migration
much harder
@NSilnitsky
@NSilnitsky
Takeaways
from
migrating a
library to
Scala3
Migrating a library to Scala 3
#4
Better to be on SBT,
with other build tools
you’ll have more
manual work.
@NSilnitsky
@NSilnitsky
Takeaways
from
migrating a
library to
Scala3
Migrating a library to Scala 3
#5
You can use your
favourite library as
long as it was compiled
with 2.13.
Side note: No macros in Greyhound….
@NSilnitsky
Migrating a library to Scala 3
Resources
➔ github.com/natansil/greyhound-sbt
➔ Scalafix installation
➔ 2.13 Migration official documentation
➔ SCALA 2.13’S COLLECTIONS by Julien Richard-Foy
➔ SCALA 3 MIGRATION GUIDE
@NSilnitsky
A Scala ZIO high-level functional SDK for Apache Kafka.
github.com/wix/greyhound
Migrating a library to Scala 3
0.2 is out!
@NSilnitsky
@NSilnitsky
Thank
You!
natansil.com twitter@NSilnitsky linkedin/natansilnitsky github.com/natansil
👉 slideshare.net/NatanSilnitsky
Any questions?
Migrating a library to Scala 3
@NSilnitsky
@NSilnitsky
Q&A
natansil.com twitter@NSilnitsky linkedin/natansilnitsky github.com/natansil
👉 slideshare.net/NatanSilnitsky
Any questions?
Migrating a library to Scala 3

More Related Content

What's hot

Deep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingDeep dive into Kubernetes Networking
Deep dive into Kubernetes Networking
Sreenivas Makam
 
Kubernetes Networking 101
Kubernetes Networking 101Kubernetes Networking 101
Kubernetes Networking 101
Weaveworks
 
Performance Troubleshooting Using Apache Spark Metrics
Performance Troubleshooting Using Apache Spark MetricsPerformance Troubleshooting Using Apache Spark Metrics
Performance Troubleshooting Using Apache Spark Metrics
Databricks
 
Release With Maven
Release With MavenRelease With Maven
Release With Maveneugenn
 
DoK Talks #91- Leveraging Druid Operator to manage Apache Druid on Kubernetes
DoK Talks #91- Leveraging Druid Operator to manage Apache Druid on KubernetesDoK Talks #91- Leveraging Druid Operator to manage Apache Druid on Kubernetes
DoK Talks #91- Leveraging Druid Operator to manage Apache Druid on Kubernetes
DoKC
 
Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...
Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...
Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...
Edureka!
 
Flink Batch Processing and Iterations
Flink Batch Processing and IterationsFlink Batch Processing and Iterations
Flink Batch Processing and Iterations
Sameer Wadkar
 
Tuning Apache Kafka Connectors for Flink.pptx
Tuning Apache Kafka Connectors for Flink.pptxTuning Apache Kafka Connectors for Flink.pptx
Tuning Apache Kafka Connectors for Flink.pptx
Flink Forward
 
Kubernetes extensibility: CRDs & Operators
Kubernetes extensibility: CRDs & OperatorsKubernetes extensibility: CRDs & Operators
Kubernetes extensibility: CRDs & Operators
SIGHUP
 
Extending Spark's Ingestion: Build Your Own Java Data Source with Jean George...
Extending Spark's Ingestion: Build Your Own Java Data Source with Jean George...Extending Spark's Ingestion: Build Your Own Java Data Source with Jean George...
Extending Spark's Ingestion: Build Your Own Java Data Source with Jean George...
Databricks
 
Loki - like prometheus, but for logs
Loki - like prometheus, but for logsLoki - like prometheus, but for logs
Loki - like prometheus, but for logs
Juraj Hantak
 
Java JVM Memory Cheat Sheet
Java JVM Memory Cheat SheetJava JVM Memory Cheat Sheet
Java JVM Memory Cheat Sheet
Mark Papis
 
Kubernetes Sealed secrets
Kubernetes Sealed secretsKubernetes Sealed secrets
Kubernetes Sealed secrets
Sebastien Goasguen
 
Kafka Tutorial - introduction to the Kafka streaming platform
Kafka Tutorial - introduction to the Kafka streaming platformKafka Tutorial - introduction to the Kafka streaming platform
Kafka Tutorial - introduction to the Kafka streaming platform
Jean-Paul Azar
 
Google jib: Building Java containers without Docker
Google jib: Building Java containers without DockerGoogle jib: Building Java containers without Docker
Google jib: Building Java containers without Docker
Maarten Smeets
 
Galera Cluster - Node Recovery - Webinar slides
Galera Cluster - Node Recovery - Webinar slidesGalera Cluster - Node Recovery - Webinar slides
Galera Cluster - Node Recovery - Webinar slides
Severalnines
 
Apache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native EraApache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native Era
Flink Forward
 
[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf
[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf
[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf
Jo Hoon
 
Apache Kafka at LinkedIn
Apache Kafka at LinkedInApache Kafka at LinkedIn
Apache Kafka at LinkedIn
Discover Pinterest
 
Common issues with Apache Kafka® Producer
Common issues with Apache Kafka® ProducerCommon issues with Apache Kafka® Producer
Common issues with Apache Kafka® Producer
confluent
 

What's hot (20)

Deep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingDeep dive into Kubernetes Networking
Deep dive into Kubernetes Networking
 
Kubernetes Networking 101
Kubernetes Networking 101Kubernetes Networking 101
Kubernetes Networking 101
 
Performance Troubleshooting Using Apache Spark Metrics
Performance Troubleshooting Using Apache Spark MetricsPerformance Troubleshooting Using Apache Spark Metrics
Performance Troubleshooting Using Apache Spark Metrics
 
Release With Maven
Release With MavenRelease With Maven
Release With Maven
 
DoK Talks #91- Leveraging Druid Operator to manage Apache Druid on Kubernetes
DoK Talks #91- Leveraging Druid Operator to manage Apache Druid on KubernetesDoK Talks #91- Leveraging Druid Operator to manage Apache Druid on Kubernetes
DoK Talks #91- Leveraging Druid Operator to manage Apache Druid on Kubernetes
 
Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...
Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...
Kibana Tutorial | Kibana Dashboard Tutorial | Kibana Elasticsearch | ELK Stac...
 
Flink Batch Processing and Iterations
Flink Batch Processing and IterationsFlink Batch Processing and Iterations
Flink Batch Processing and Iterations
 
Tuning Apache Kafka Connectors for Flink.pptx
Tuning Apache Kafka Connectors for Flink.pptxTuning Apache Kafka Connectors for Flink.pptx
Tuning Apache Kafka Connectors for Flink.pptx
 
Kubernetes extensibility: CRDs & Operators
Kubernetes extensibility: CRDs & OperatorsKubernetes extensibility: CRDs & Operators
Kubernetes extensibility: CRDs & Operators
 
Extending Spark's Ingestion: Build Your Own Java Data Source with Jean George...
Extending Spark's Ingestion: Build Your Own Java Data Source with Jean George...Extending Spark's Ingestion: Build Your Own Java Data Source with Jean George...
Extending Spark's Ingestion: Build Your Own Java Data Source with Jean George...
 
Loki - like prometheus, but for logs
Loki - like prometheus, but for logsLoki - like prometheus, but for logs
Loki - like prometheus, but for logs
 
Java JVM Memory Cheat Sheet
Java JVM Memory Cheat SheetJava JVM Memory Cheat Sheet
Java JVM Memory Cheat Sheet
 
Kubernetes Sealed secrets
Kubernetes Sealed secretsKubernetes Sealed secrets
Kubernetes Sealed secrets
 
Kafka Tutorial - introduction to the Kafka streaming platform
Kafka Tutorial - introduction to the Kafka streaming platformKafka Tutorial - introduction to the Kafka streaming platform
Kafka Tutorial - introduction to the Kafka streaming platform
 
Google jib: Building Java containers without Docker
Google jib: Building Java containers without DockerGoogle jib: Building Java containers without Docker
Google jib: Building Java containers without Docker
 
Galera Cluster - Node Recovery - Webinar slides
Galera Cluster - Node Recovery - Webinar slidesGalera Cluster - Node Recovery - Webinar slides
Galera Cluster - Node Recovery - Webinar slides
 
Apache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native EraApache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native Era
 
[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf
[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf
[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf
 
Apache Kafka at LinkedIn
Apache Kafka at LinkedInApache Kafka at LinkedIn
Apache Kafka at LinkedIn
 
Common issues with Apache Kafka® Producer
Common issues with Apache Kafka® ProducerCommon issues with Apache Kafka® Producer
Common issues with Apache Kafka® Producer
 

Similar to 5 Takeaways from Migrating a Library to Scala 3 - Scala Love

Real-time streaming and data pipelines with Apache Kafka
Real-time streaming and data pipelines with Apache KafkaReal-time streaming and data pipelines with Apache Kafka
Real-time streaming and data pipelines with Apache Kafka
Joe Stein
 
How to start using Scala
How to start using ScalaHow to start using Scala
How to start using ScalaNgoc Dao
 
Boost your productivity with Scala tooling!
Boost your productivity  with Scala tooling!Boost your productivity  with Scala tooling!
Boost your productivity with Scala tooling!
MeriamLachkar1
 
Gradle
GradleGradle
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
Fabio Akita
 
Ruby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developerRuby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developer
gicappa
 
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011Nick Sieger
 
Create a new project in ROR
Create a new project in RORCreate a new project in ROR
Create a new project in ROR
akankshita satapathy
 
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
Srijan Technologies
 
Play vs Rails
Play vs RailsPlay vs Rails
Play vs Rails
Daniel Cukier
 
Speedy TDD with Rails
Speedy TDD with RailsSpeedy TDD with Rails
Speedy TDD with Rails
PatchSpace Ltd
 
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...
Shirshanka Das
 
Connecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRubyConnecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRuby
Nick Sieger
 
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Zabbix
 
Pragmatic sbt
Pragmatic sbtPragmatic sbt
Pragmatic sbt
Hermann Hueck
 
Spark Streaming Info
Spark Streaming InfoSpark Streaming Info
Spark Streaming InfoDoug Chang
 

Similar to 5 Takeaways from Migrating a Library to Scala 3 - Scala Love (20)

Real-time streaming and data pipelines with Apache Kafka
Real-time streaming and data pipelines with Apache KafkaReal-time streaming and data pipelines with Apache Kafka
Real-time streaming and data pipelines with Apache Kafka
 
How to start using Scala
How to start using ScalaHow to start using Scala
How to start using Scala
 
Boost your productivity with Scala tooling!
Boost your productivity  with Scala tooling!Boost your productivity  with Scala tooling!
Boost your productivity with Scala tooling!
 
Gradle
GradleGradle
Gradle
 
Play framework
Play frameworkPlay framework
Play framework
 
Deployment de Rails
Deployment de RailsDeployment de Rails
Deployment de Rails
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
 
Scala+data
Scala+dataScala+data
Scala+data
 
Ruby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developerRuby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developer
 
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
 
Create a new project in ROR
Create a new project in RORCreate a new project in ROR
Create a new project in ROR
 
Scala active record
Scala active recordScala active record
Scala active record
 
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
 
Play vs Rails
Play vs RailsPlay vs Rails
Play vs Rails
 
Speedy TDD with Rails
Speedy TDD with RailsSpeedy TDD with Rails
Speedy TDD with Rails
 
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...
 
Connecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRubyConnecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRuby
 
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
 
Pragmatic sbt
Pragmatic sbtPragmatic sbt
Pragmatic sbt
 
Spark Streaming Info
Spark Streaming InfoSpark Streaming Info
Spark Streaming Info
 

More from Natan Silnitsky

Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
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
Natan Silnitsky
 
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
 
Workflow Engines & Event Streaming Brokers - Can they work together? [Current...
Workflow Engines & Event Streaming Brokers - Can they work together? [Current...Workflow Engines & Event Streaming Brokers - Can they work together? [Current...
Workflow Engines & Event Streaming Brokers - Can they work together? [Current...
Natan Silnitsky
 
DevSum - Lessons Learned from 2000 microservices
DevSum - Lessons Learned from 2000 microservicesDevSum - Lessons Learned from 2000 microservices
DevSum - Lessons Learned from 2000 microservices
Natan Silnitsky
 
GeeCon - Lessons Learned from 2000 microservices
GeeCon - Lessons Learned from 2000 microservicesGeeCon - Lessons Learned from 2000 microservices
GeeCon - Lessons Learned from 2000 microservices
Natan Silnitsky
 
Migrating to Multi Cluster Managed Kafka - ApacheKafkaIL
Migrating to Multi Cluster Managed Kafka - ApacheKafkaILMigrating to Multi Cluster Managed Kafka - ApacheKafkaIL
Migrating to Multi Cluster Managed Kafka - ApacheKafkaIL
Natan Silnitsky
 
Wix+Confluent Meetup - Lessons Learned from 2000 Event Driven Microservices
Wix+Confluent Meetup - Lessons Learned from 2000 Event Driven MicroservicesWix+Confluent Meetup - Lessons Learned from 2000 Event Driven Microservices
Wix+Confluent Meetup - Lessons Learned from 2000 Event Driven Microservices
Natan Silnitsky
 
BuildStuff - Lessons Learned from 2000 Event Driven Microservices
BuildStuff - Lessons Learned from 2000 Event Driven MicroservicesBuildStuff - Lessons Learned from 2000 Event Driven Microservices
BuildStuff - Lessons Learned from 2000 Event Driven Microservices
Natan Silnitsky
 
Lessons Learned from 2000 Event Driven Microservices - Reversim
Lessons Learned from 2000 Event Driven Microservices - ReversimLessons Learned from 2000 Event Driven Microservices - Reversim
Lessons Learned from 2000 Event Driven Microservices - Reversim
Natan Silnitsky
 
Devoxx Ukraine - Kafka based Global Data Mesh
Devoxx Ukraine - Kafka based Global Data MeshDevoxx Ukraine - Kafka based Global Data Mesh
Devoxx Ukraine - Kafka based Global Data Mesh
Natan Silnitsky
 
Devoxx UK - Migrating to Multi Cluster Managed Kafka
Devoxx UK - Migrating to Multi Cluster Managed KafkaDevoxx UK - Migrating to Multi Cluster Managed Kafka
Devoxx UK - Migrating to Multi Cluster Managed Kafka
Natan Silnitsky
 
Dev Days Europe - Kafka based Global Data Mesh at Wix
Dev Days Europe - Kafka based Global Data Mesh at WixDev Days Europe - Kafka based Global Data Mesh at Wix
Dev Days Europe - Kafka based Global Data Mesh at Wix
Natan Silnitsky
 
Kafka Summit London - Kafka based Global Data Mesh at Wix
Kafka Summit London - Kafka based Global Data Mesh at WixKafka Summit London - Kafka based Global Data Mesh at Wix
Kafka Summit London - Kafka based Global Data Mesh at Wix
Natan Silnitsky
 
Migrating to Multi Cluster Managed Kafka - Conf42 - CloudNative
Migrating to Multi Cluster Managed Kafka - Conf42 - CloudNative Migrating to Multi Cluster Managed Kafka - Conf42 - CloudNative
Migrating to Multi Cluster Managed Kafka - Conf42 - CloudNative
Natan Silnitsky
 
Migrating to Multi Cluster Managed Kafka - DevopStars 2022
Migrating to Multi Cluster Managed Kafka - DevopStars 2022Migrating to Multi Cluster Managed Kafka - DevopStars 2022
Migrating to Multi Cluster Managed Kafka - DevopStars 2022
Natan Silnitsky
 
Open sourcing a successful internal project - Reversim 2021
Open sourcing a successful internal project - Reversim 2021Open sourcing a successful internal project - Reversim 2021
Open sourcing a successful internal project - Reversim 2021
Natan Silnitsky
 
How to successfully manage a ZIO fiber’s lifecycle - Functional Scala 2021
How to successfully manage a ZIO fiber’s lifecycle - Functional Scala 2021How to successfully manage a ZIO fiber’s lifecycle - Functional Scala 2021
How to successfully manage a ZIO fiber’s lifecycle - Functional Scala 2021
Natan Silnitsky
 
Advanced Caching Patterns used by 2000 microservices - Code Motion
Advanced Caching Patterns used by 2000 microservices - Code MotionAdvanced Caching Patterns used by 2000 microservices - Code Motion
Advanced Caching Patterns used by 2000 microservices - Code Motion
Natan Silnitsky
 
Advanced Caching Patterns used by 2000 microservices - Devoxx Ukraine
Advanced Caching Patterns used by 2000 microservices - Devoxx UkraineAdvanced Caching Patterns used by 2000 microservices - Devoxx Ukraine
Advanced Caching Patterns used by 2000 microservices - Devoxx Ukraine
Natan Silnitsky
 

More from Natan Silnitsky (20)

Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
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
 
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 - ...
 
Workflow Engines & Event Streaming Brokers - Can they work together? [Current...
Workflow Engines & Event Streaming Brokers - Can they work together? [Current...Workflow Engines & Event Streaming Brokers - Can they work together? [Current...
Workflow Engines & Event Streaming Brokers - Can they work together? [Current...
 
DevSum - Lessons Learned from 2000 microservices
DevSum - Lessons Learned from 2000 microservicesDevSum - Lessons Learned from 2000 microservices
DevSum - Lessons Learned from 2000 microservices
 
GeeCon - Lessons Learned from 2000 microservices
GeeCon - Lessons Learned from 2000 microservicesGeeCon - Lessons Learned from 2000 microservices
GeeCon - Lessons Learned from 2000 microservices
 
Migrating to Multi Cluster Managed Kafka - ApacheKafkaIL
Migrating to Multi Cluster Managed Kafka - ApacheKafkaILMigrating to Multi Cluster Managed Kafka - ApacheKafkaIL
Migrating to Multi Cluster Managed Kafka - ApacheKafkaIL
 
Wix+Confluent Meetup - Lessons Learned from 2000 Event Driven Microservices
Wix+Confluent Meetup - Lessons Learned from 2000 Event Driven MicroservicesWix+Confluent Meetup - Lessons Learned from 2000 Event Driven Microservices
Wix+Confluent Meetup - Lessons Learned from 2000 Event Driven Microservices
 
BuildStuff - Lessons Learned from 2000 Event Driven Microservices
BuildStuff - Lessons Learned from 2000 Event Driven MicroservicesBuildStuff - Lessons Learned from 2000 Event Driven Microservices
BuildStuff - Lessons Learned from 2000 Event Driven Microservices
 
Lessons Learned from 2000 Event Driven Microservices - Reversim
Lessons Learned from 2000 Event Driven Microservices - ReversimLessons Learned from 2000 Event Driven Microservices - Reversim
Lessons Learned from 2000 Event Driven Microservices - Reversim
 
Devoxx Ukraine - Kafka based Global Data Mesh
Devoxx Ukraine - Kafka based Global Data MeshDevoxx Ukraine - Kafka based Global Data Mesh
Devoxx Ukraine - Kafka based Global Data Mesh
 
Devoxx UK - Migrating to Multi Cluster Managed Kafka
Devoxx UK - Migrating to Multi Cluster Managed KafkaDevoxx UK - Migrating to Multi Cluster Managed Kafka
Devoxx UK - Migrating to Multi Cluster Managed Kafka
 
Dev Days Europe - Kafka based Global Data Mesh at Wix
Dev Days Europe - Kafka based Global Data Mesh at WixDev Days Europe - Kafka based Global Data Mesh at Wix
Dev Days Europe - Kafka based Global Data Mesh at Wix
 
Kafka Summit London - Kafka based Global Data Mesh at Wix
Kafka Summit London - Kafka based Global Data Mesh at WixKafka Summit London - Kafka based Global Data Mesh at Wix
Kafka Summit London - Kafka based Global Data Mesh at Wix
 
Migrating to Multi Cluster Managed Kafka - Conf42 - CloudNative
Migrating to Multi Cluster Managed Kafka - Conf42 - CloudNative Migrating to Multi Cluster Managed Kafka - Conf42 - CloudNative
Migrating to Multi Cluster Managed Kafka - Conf42 - CloudNative
 
Migrating to Multi Cluster Managed Kafka - DevopStars 2022
Migrating to Multi Cluster Managed Kafka - DevopStars 2022Migrating to Multi Cluster Managed Kafka - DevopStars 2022
Migrating to Multi Cluster Managed Kafka - DevopStars 2022
 
Open sourcing a successful internal project - Reversim 2021
Open sourcing a successful internal project - Reversim 2021Open sourcing a successful internal project - Reversim 2021
Open sourcing a successful internal project - Reversim 2021
 
How to successfully manage a ZIO fiber’s lifecycle - Functional Scala 2021
How to successfully manage a ZIO fiber’s lifecycle - Functional Scala 2021How to successfully manage a ZIO fiber’s lifecycle - Functional Scala 2021
How to successfully manage a ZIO fiber’s lifecycle - Functional Scala 2021
 
Advanced Caching Patterns used by 2000 microservices - Code Motion
Advanced Caching Patterns used by 2000 microservices - Code MotionAdvanced Caching Patterns used by 2000 microservices - Code Motion
Advanced Caching Patterns used by 2000 microservices - Code Motion
 
Advanced Caching Patterns used by 2000 microservices - Devoxx Ukraine
Advanced Caching Patterns used by 2000 microservices - Devoxx UkraineAdvanced Caching Patterns used by 2000 microservices - Devoxx Ukraine
Advanced Caching Patterns used by 2000 microservices - Devoxx Ukraine
 

Recently uploaded

Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 

Recently uploaded (20)

Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 

5 Takeaways from Migrating a Library to Scala 3 - Scala Love

  • 1. @NSilnitsky @NSilnitsky 5 Takeaways from migrating a library to Scala 3 Natan Silnitsky Backend Infra TL, Wix.com natansil.com twitter@NSilnitsky linkedin/natansilnitsky github.com/natansil
  • 2. @NSilnitsky Migrating a library to Scala 3 Greyhound A Scala/Java high-level SDK for Apache Kafka. Powered by ZIO Takeaways from migrating a library
  • 4. Upgrade build tool Migrating a library to Scala 3 Scala 2.13 Scala 3.1 Migrating a library * code base
  • 5. SBT Migrating a library to Scala 3 Scala 2.12 Bazel Scala 2.13 Scala 3.1 Migrating Greyhound library
  • 6. Migrating a library to Scala 3 SBT Scala 2.12 Bazel Scala 2.13 Scala 3.1 Migrating Greyhound library Step 1: Make SBT Work
  • 7. Migrating a library to Scala 3 Bazel does not support Scala 3 yet. And SBT has… → a Nice Migration Plugin → dedicated syntax SBT Scala 2.12 Bazel Why? Step 1: Make SBT Work
  • 8. Making SBT Work 1. Change project directory layout 2. Compile & Test
  • 9. @NSilnitsky @NSilnitsky lazy val root = project .in(file(".")) .settings( name := "greyhound-sbt", version := "0.1.0-SNAPSHOT", scalaVersion := "2.12.12", libraryDependencies ++= Seq( "com.novocode" % "junit-interface" % "0.11" % "test", "org.specs2" %% "specs2-junit" % "4.8.3" % "test", "dev.zio" %% "zio-test-junit" % "1.0.9" % "test", "org.specs2" %% "specs2-mock" % "4.8.3" % "test", "dev.zio" %% "zio" % "1.0.9", "dev.zio" %% "zio-streams" % "1.0.9", "org.apache.kafka" % "kafka-clients" % "2.4.1", "org.apache.kafka" %% "kafka" % "2.4.1", "org.apache.curator" % "curator-test" % "2.12.0", "com.h2database" % "h2" % "1.4.197" ) ) build.sbt
  • 10. Migrating a library to Scala 3 SBT Scala 2.12 Bazel Scala 2.13 Scala 3.1 Step 1: Make SBT Work Step 2: Switch to Scala 2.13
  • 11. Migrating a library to Scala 3 Why? Scala 2.13 Scala 3.1 compiler options & SBT plugins interoperable with 2.13 only !!
  • 12. from SBT to Scala 2.13 1. Compile it with scala Version := "2.13.8" 2. Fix errors in our 3rd-party library dependencies
  • 13. @NSilnitsky @NSilnitsky lazy val root = project .in(file(".")) .settings( name := "greyhound-sbt", version := "0.1.0-SNAPSHOT", scalaVersion := "2.13.8", libraryDependencies ++= Seq( "com.novocode" % "junit-interface" % "0.11" % "test", "org.specs2" %% "specs2-junit" % "4.8.3" % "test", "dev.zio" %% "zio-test-junit" % "1.0.9" % "test", "org.specs2" %% "specs2-mock" % "4.8.3" % "test", "dev.zio" %% "zio" % "1.0.9", "dev.zio" %% "zio-streams" % "1.0.9", "org.apache.kafka" % "kafka-clients" % "2.4.1", "org.apache.kafka" %% "kafka" % "2.4.1", "org.apache.curator" % "curator-test" % "2.12.0", "com.h2database" % "h2" % "1.4.197" ) Makes sure that libraries are built with Scala 2.13 build.sbt
  • 14. @NSilnitsky @NSilnitsky lazy val root = project .in(file(".")) .settings( name := "greyhound-sbt", version := "0.1.0-SNAPSHOT", scalaVersion := "2.13.8", libraryDependencies ++= Seq( "com.novocode" % "junit-interface" % "0.11" % "test", "org.specs2" %% "specs2-junit" % "4.8.3" % "test", "dev.zio" %% "zio-test-junit" % "1.0.9" % "test", "org.specs2" %% "specs2-mock" % "4.8.3" % "test", "dev.zio" %% "zio" % "1.0.9", "dev.zio" %% "zio-streams" % "1.0.9", "org.apache.kafka" % "kafka-clients" % "2.4.1", "org.apache.kafka" %% "kafka" % "2.4.1", "org.apache.curator" % "curator-test" % "2.12.0", "com.h2database" % "h2" % "1.4.197" ) build.sbt "org.specs2" % "specs2-junit_2.13" % "4.8.3" % "test"
  • 15. from SBT to Scala 2.13 1. Compile it with scala Version := "2.13.8" 3. Fix errors in our source code Scalafix! 2. Fix errors in our 3rd-party library dependencies 👉 addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.34")
  • 16. To Your Codebase Applies semantic rules e.g., migrate to Scala2.13! Use Scalafix. Migrating a library to Scala 3
  • 17. To Your Codebase Applies semantic rules e.g., migrate to Scala2.13! Compiler Use Scalafix. Uses a semantic DB Migrating a library to Scala 3 * model, decouples
  • 18. @NSilnitsky @NSilnitsky [error] found : scala.collection.MapView[com.wixpress.dst.greyhound.core.TopicPartition,Long] [error] required: Map[com.wixpress.dst.greyhound.core.TopicPartition,com.wixpress.dst.greyhound.core.Offset]
  • 19. @NSilnitsky @NSilnitsky [error] found : scala.collection.MapView[com.wixpress.dst.greyhound.core.TopicPartition,Long] [error] required: Map[com.wixpress.dst.greyhound.core.TopicPartition,com.wixpress.dst.greyhound.core.Offset] mapValues 2.12 → Map 2.13 → MapView val offsets = records.groupBy(RecordTopicPartition(_)).mapValues(_.maxBy(_.offset).offset + 1)
  • 20. @NSilnitsky @NSilnitsky [error] found : scala.collection.MapView[com.wixpress.dst.greyhound.core.TopicPartition,Long] [error] required: Map[com.wixpress.dst.greyhound.core.TopicPartition,com.wixpress.dst.greyhound.core.Offset] mapValues 2.12 → Map 2.13 → MapView val offsets = records.groupBy(RecordTopicPartition(_)).mapValues(_.maxBy(_.offset).offset + 1) val offsets = records.groupBy(RecordTopicPartition(_)).mapValues(...).toMap
  • 21. @NSilnitsky @NSilnitsky Allow semantic rules ThisBuild / scalafixDependencies += "org.scala-lang.modules" %% "scala-collection-migrations" % "2.6.0" lazy val root = project .in(file(".")) .settings( name := "greyhound-sbt", version := "0.1.0-SNAPSHOT", scalaVersion := "2.12.12", addCompilerPlugin(scalafixSemanticdb), scalacOptions ++= List("-Yrangepos", "-P:semanticdb:synthetics:on"), libraryDependencies ++= Seq(...) ) 2.13 Migration rules build.sbt
  • 22. @NSilnitsky @NSilnitsky > scalafix Collection213Roughly [info] Running scalafix on 69 Scala sources [success] Total time: 24 s, completed 16 Feb 2022, 22:22:18 Didn’t work!
  • 23. @NSilnitsky @NSilnitsky val offsets = records.groupBy(RecordTopicPartition(_)).mapValues(_.maxBy(_.offset).offset + 1) val offsets = records.groupBy(RecordTopicPartition(_)).mapValues(...).toMap > scalafix Collection213Roughly [info] Running scalafix on 69 Scala sources [success] Total time: 24 s, completed 16 Feb 2022, 22:22:18 Ended up fixing it manually:
  • 24. Migrating a library to Scala 3 SBT Scala 2.12 Bazel Scala 2.13 Scala 3.1 Step 1: Make SBT Work Step 2: Switch to Scala 2.13 Step 3: Switch to Scala 3
  • 25. from Scala 2.13 to Scala 3 Scala 3 compiler Scala 2.13 compiler 3rd-party library dep Scala 2.13 TASTy Reader can read TASTy format Scala3 Unpickler Classpath Interoperability can read Pickle format
  • 26. Just use the migration tool from Scala 2.13 to Scala 3 SBT migration plugin
  • 27. @NSilnitsky helps you migrate your build & code to Scala3. Use SBT Migration Plugin. Migrating a library to Scala 3 👉 addSbtPlugin("ch.epfl.scala" % "sbt-scala3-migrate" % "0.5.0") migrate-libs migrate-scalacOptions migrate-syntax migrate
  • 29. @NSilnitsky @NSilnitsky lazy val root = project ... scalaVersion := "3.1.0", libraryDependencies ++= Seq( "com.novocode" % "junit-interface" % "0.11" % "test", ("org.specs2" %% "specs2-junit" % "4.8.3" % "test").cross(CrossVersion.for3Use2_13), "dev.zio" %% "zio-test-junit" % "1.0.9" % "test", ("org.specs2" %% "specs2-mock" % "4.8.3" % "test").cross(CrossVersion.for3Use2_13), ) ) This crossVersion feature allows to depend on libraries compiled with 2.13 "org.specs2" % "specs2-mock_2.13" % "4.8.3" % "test"
  • 31. @NSilnitsky > migrate-syntax root Migrating a library to Scala 3 These changes are not mandatory, and caused many new 2.13 compiler errors → Rolled back [error] /…/src/main/scala/future-interop/com/wixpress/dst/greyhound/future/GreyhoundRuntime.scala:27:19: type mismatch; [error] found : zio.clock.Clock.Service.live.type (with underlying type zio.clock.Clock.Service) [error] required: zio.blocking.Blocking.Service with zio.random.Random.Service with zio.system.System.Service with zio.console.Console.Service with zio.clock.Clock.Service [error] Clock.Service.live, [error] ^ val zenv: Has[Clock.Service] with Has[Console.Service] with Has[System.Service] with Has[Random.Service] with Has[Blocking.Service]
  • 32. compiles in scala 3 with options: > migrate root Migrating a library to Scala 3 -source:3.0-migration -rewrite
  • 33. @NSilnitsky @NSilnitsky scalacOptions ++= Seq( "-source:3.0-migration" ), migration mode: Compiler forgives on most of the dropped features, printing warnings in place of errors Scala compiler options
  • 34. @NSilnitsky @NSilnitsky rewrite mode: Once your code compiles in the migration mode, Warnings are resolved by the compiler itself scalacOptions ++= Seq( "-source:3.0-migration", “-rewrite” ), ➔ Rewrites are NOT applied if the code compiles in error. ➔ You cannot choose which rules are applied (compiler runs all of them). Scala compiler options
  • 35. @NSilnitsky > migrate root Migrating a library to Scala 3 [warn] [warn] Note: Unresolved dependencies path: [error] stack trace is suppressed; run last update for the full output [error] (update) sbt.librarymanagement.ResolveException: Error downloading org.scalameta:semanticdb-scalac_2.13.8:4.4.31 [error] Not found [error] Not found [error] not found: /Users/natans/.ivy2/localorg.scalameta/semanticdb-scalac_2.13.8/4.4.31/ivys/ivy.xml [error] not found: https://repo1.maven.org/maven2/org/scalameta/semanticdb-scalac_2.13.8/4.4.31/semanticdb-scalac_2.13.8-4.4.31.pom
  • 36. @NSilnitsky > migrate root Migrating a library to Scala 3 [warn] [warn] Note: Unresolved dependencies path: [error] stack trace is suppressed; run last update for the full output [error] (update) sbt.librarymanagement.ResolveException: Error downloading org.scalameta:semanticdb-scalac_2.13.8:4.4.31 [error] Not found [error] Not found [error] not found: /Users/natans/.ivy2/localorg.scalameta/semanticdb-scalac_2.13.8/4.4.31/ivys/ivy.xml [error] not found: https://repo1.maven.org/maven2/org/scalameta/semanticdb-scalac_2.13.8/4.4.31/semanticdb-scalac_2.13.8-4.4.31.pom Failed for 2.13.8
  • 37. @NSilnitsky > migrate root Migrating a library to Scala 3 Downgraded to 2.13.7
  • 38. @NSilnitsky Migrating a library to Scala 3 35 | assert(logged)(equalTo(List( | ^ | Exception occurred while executing macro expansion. | java.lang.NullPointerException | at zio.test.Macros$.location(Macros.scala:159) | at zio.test.Macros$.assert_impl(Macros.scala:175) "dev.zio" %% "zio-test-junit" % "1.0.9", "dev.zio" %% "zio-test-junit" % "1.0.13",
  • 40. @NSilnitsky > migrate root Migrating a library to Scala 3 Switched to 3.1 > You can now commit the change ❤
  • 41. @NSilnitsky 5 other build tools for support ➔ Bazel - work in progress - ETA - end of Q1 ➔ Gradle - Scala 3 supported version 7.3 ➔ Mill - support in 0.9.x ➔ Maven - 4.5.x (scala-maven-plugin) ➔ Native Cross compilation for your library Migrating a library to Scala 3
  • 42. @NSilnitsky @NSilnitsky Takeaways from migrating a library to Scala3 Migrating a library to Scala 3 #1 Use migration tools, don't do it manually - it will save you a lot of time. * SBT clean
  • 43. @NSilnitsky @NSilnitsky Takeaways from migrating a library to Scala3 Migrating a library to Scala 3 #2 First switch to 2.13. 2.13 is highly compatible - Unlike the Python 2/3 situation.
  • 44. @NSilnitsky @NSilnitsky Takeaways from migrating a library to Scala3 Migrating a library to Scala 3 #3 Switch syntax lazily. Take your time with syntax changes. “Migrate-syntax” plugin step would have made migration much harder
  • 45. @NSilnitsky @NSilnitsky Takeaways from migrating a library to Scala3 Migrating a library to Scala 3 #4 Better to be on SBT, with other build tools you’ll have more manual work.
  • 46. @NSilnitsky @NSilnitsky Takeaways from migrating a library to Scala3 Migrating a library to Scala 3 #5 You can use your favourite library as long as it was compiled with 2.13. Side note: No macros in Greyhound….
  • 47. @NSilnitsky Migrating a library to Scala 3 Resources ➔ github.com/natansil/greyhound-sbt ➔ Scalafix installation ➔ 2.13 Migration official documentation ➔ SCALA 2.13’S COLLECTIONS by Julien Richard-Foy ➔ SCALA 3 MIGRATION GUIDE
  • 48. @NSilnitsky A Scala ZIO high-level functional SDK for Apache Kafka. github.com/wix/greyhound Migrating a library to Scala 3 0.2 is out!
  • 49. @NSilnitsky @NSilnitsky Thank You! natansil.com twitter@NSilnitsky linkedin/natansilnitsky github.com/natansil 👉 slideshare.net/NatanSilnitsky Any questions? Migrating a library to Scala 3
  • 50. @NSilnitsky @NSilnitsky Q&A natansil.com twitter@NSilnitsky linkedin/natansilnitsky github.com/natansil 👉 slideshare.net/NatanSilnitsky Any questions? Migrating a library to Scala 3