SlideShare uma empresa Scribd logo
1 de 50
Baixar para ler offline
@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

Mais conteúdo relacionado

Mais procurados

44CON 2014 - I Hunt TR-069 Admins: Pwning ISPs Like a Boss, Shahar Tal
44CON 2014 - I Hunt TR-069 Admins: Pwning ISPs Like a Boss, Shahar Tal44CON 2014 - I Hunt TR-069 Admins: Pwning ISPs Like a Boss, Shahar Tal
44CON 2014 - I Hunt TR-069 Admins: Pwning ISPs Like a Boss, Shahar Tal44CON
 
Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in LinuxAnu Chaudhry
 
OpenStack Ironic - Bare Metal-as-a-Service
OpenStack Ironic - Bare Metal-as-a-ServiceOpenStack Ironic - Bare Metal-as-a-Service
OpenStack Ironic - Bare Metal-as-a-ServiceRamon Acedo Rodriguez
 
[KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui...
 [KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui... [KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui...
[KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui...Akihiro Suda
 
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)Linaro
 
XDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @CloudflareXDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @CloudflareC4Media
 
Edito a1guidepdagogique
Edito a1guidepdagogiqueEdito a1guidepdagogique
Edito a1guidepdagogiquePereHormigos
 
Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...
Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...
Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...Amazon Web Services
 
syzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzersyzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzerDmitry Vyukov
 
Kernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at FacebookKernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at FacebookAnne Nicolas
 
How Linux Processes Your Network Packet - Elazar Leibovich
How Linux Processes Your Network Packet - Elazar LeibovichHow Linux Processes Your Network Packet - Elazar Leibovich
How Linux Processes Your Network Packet - Elazar LeibovichDevOpsDays Tel Aviv
 
Linux monitoring and Troubleshooting for DBA's
Linux monitoring and Troubleshooting for DBA'sLinux monitoring and Troubleshooting for DBA's
Linux monitoring and Troubleshooting for DBA'sMydbops
 
DAT202_Getting started with Amazon Aurora
DAT202_Getting started with Amazon AuroraDAT202_Getting started with Amazon Aurora
DAT202_Getting started with Amazon AuroraAmazon Web Services
 
Monitoring IO performance with iostat and pt-diskstats
Monitoring IO performance with iostat and pt-diskstatsMonitoring IO performance with iostat and pt-diskstats
Monitoring IO performance with iostat and pt-diskstatsBen Mildren
 
Software update for embedded systems
Software update for embedded systemsSoftware update for embedded systems
Software update for embedded systemsSZ Lin
 
How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)Gavin Guo
 

Mais procurados (20)

RPM (LINUX)
RPM (LINUX)RPM (LINUX)
RPM (LINUX)
 
44CON 2014 - I Hunt TR-069 Admins: Pwning ISPs Like a Boss, Shahar Tal
44CON 2014 - I Hunt TR-069 Admins: Pwning ISPs Like a Boss, Shahar Tal44CON 2014 - I Hunt TR-069 Admins: Pwning ISPs Like a Boss, Shahar Tal
44CON 2014 - I Hunt TR-069 Admins: Pwning ISPs Like a Boss, Shahar Tal
 
Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in Linux
 
OpenStack Ironic - Bare Metal-as-a-Service
OpenStack Ironic - Bare Metal-as-a-ServiceOpenStack Ironic - Bare Metal-as-a-Service
OpenStack Ironic - Bare Metal-as-a-Service
 
[KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui...
 [KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui... [KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui...
[KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui...
 
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
 
XDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @CloudflareXDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @Cloudflare
 
Edito a1guidepdagogique
Edito a1guidepdagogiqueEdito a1guidepdagogique
Edito a1guidepdagogique
 
Linux Kernel Live Patching
Linux Kernel Live PatchingLinux Kernel Live Patching
Linux Kernel Live Patching
 
Duel of Two Libraries: Cairo & Skia
Duel of Two Libraries: Cairo & SkiaDuel of Two Libraries: Cairo & Skia
Duel of Two Libraries: Cairo & Skia
 
Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...
Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...
Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...
 
syzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzersyzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzer
 
Kernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at FacebookKernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at Facebook
 
How Linux Processes Your Network Packet - Elazar Leibovich
How Linux Processes Your Network Packet - Elazar LeibovichHow Linux Processes Your Network Packet - Elazar Leibovich
How Linux Processes Your Network Packet - Elazar Leibovich
 
Linux monitoring and Troubleshooting for DBA's
Linux monitoring and Troubleshooting for DBA'sLinux monitoring and Troubleshooting for DBA's
Linux monitoring and Troubleshooting for DBA's
 
DAT202_Getting started with Amazon Aurora
DAT202_Getting started with Amazon AuroraDAT202_Getting started with Amazon Aurora
DAT202_Getting started with Amazon Aurora
 
Monitoring IO performance with iostat and pt-diskstats
Monitoring IO performance with iostat and pt-diskstatsMonitoring IO performance with iostat and pt-diskstats
Monitoring IO performance with iostat and pt-diskstats
 
Software update for embedded systems
Software update for embedded systemsSoftware update for embedded systems
Software update for embedded systems
 
How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)
 
Introduction to SLURM
Introduction to SLURMIntroduction to SLURM
Introduction to SLURM
 

Semelhante a 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 KafkaJoe 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
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - DeploymentFabio 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 developergicappa
 
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
 
[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
 
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 JRubyNick 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 | ZabConf2016Zabbix
 
Spark Streaming Info
Spark Streaming InfoSpark Streaming Info
Spark Streaming InfoDoug Chang
 

Semelhante a 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
 

Mais de 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 microservicesNatan Silnitsky
 
GeeCon - Lessons Learned from 2000 microservices
GeeCon - Lessons Learned from 2000 microservicesGeeCon - Lessons Learned from 2000 microservices
GeeCon - Lessons Learned from 2000 microservicesNatan 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 - ApacheKafkaILNatan 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 MicroservicesNatan 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 MicroservicesNatan 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 - ReversimNatan 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 MeshNatan 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 KafkaNatan 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 WixNatan 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 WixNatan 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 2022Natan 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 2021Natan 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 2021Natan 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 MotionNatan 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 UkraineNatan Silnitsky
 
Advanced Microservices Caching Patterns - Devoxx UK
Advanced Microservices Caching Patterns - Devoxx UKAdvanced Microservices Caching Patterns - Devoxx UK
Advanced Microservices Caching Patterns - Devoxx UKNatan Silnitsky
 
Battle-tested event-driven patterns for your microservices architecture - Sca...
Battle-tested event-driven patterns for your microservices architecture - Sca...Battle-tested event-driven patterns for your microservices architecture - Sca...
Battle-tested event-driven patterns for your microservices architecture - Sca...Natan Silnitsky
 

Mais de Natan Silnitsky (20)

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
 
Advanced Microservices Caching Patterns - Devoxx UK
Advanced Microservices Caching Patterns - Devoxx UKAdvanced Microservices Caching Patterns - Devoxx UK
Advanced Microservices Caching Patterns - Devoxx UK
 
Battle-tested event-driven patterns for your microservices architecture - Sca...
Battle-tested event-driven patterns for your microservices architecture - Sca...Battle-tested event-driven patterns for your microservices architecture - Sca...
Battle-tested event-driven patterns for your microservices architecture - Sca...
 

Último

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 

Último (20)

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 

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