pull requests I sent to scala/scala (ny-scala 2019)

Eugene Yokota
Eugene YokotaSoftware Engineer at Lightbend
pull requests I sent to
scala/scala
eugene yokota (@eed3si9n)
Lightbend
ecosystem
goal
1. become an active participant in the Scala
ecosystem
contributions
1. help adoption
2. assist other users
3. report issues
4. garden the issue tracker
5. contribute to docs
6. expand ecosystem
7. patch the core
help adoption
• help the adoption of Scala at work
• help the adoption of Lightbend Platform
Subscription at work
assist other users
• assist other users at work, Stackoverflow, Gitter
chat etc.
• blog
• give talks at a meetup :)
reporting issues
art of reporting issues
• good bug reports are more likely to be fixed.
• some bad bug reports can be irritating.
• Joel Spolsky: Painless Bug Tracking
problem space solution space
problem space solution space
• observations (sometimes
with lower confidence)
• requirements
problem space solution space
• observations (sometimes
with lower confidence)
• requirements
• many possible answers
• design decisions
good bug report:
3 + 1 things
• steps: steps to reproduce your problem.
• problems. what you think is the problem. include full
error message, stack trace, etc.
• expectations. describe what you think should've
happen.
• (notes). your analysis of what's going on.
gardening the issue tracker
• summarize discussions from other channels
• capture problems
• organize observations, opinions, and analyses
• reproduce reported issues
• link to relevant source code
• leave breadcrumbs for contributors (previous discussions, 

language spec, precedence in other languages)
• review pull requests
• triage
gardening the issue tracker
• scala/docs.scala-lang Scala documentation
• scala/scala ScalaDocs for standard library, language
spec
• sbt/website sbt documentation
• sbt/sbt ScalaDocs for sbt
contribute docs
• Scala libraries, tooling, upgrade to 2.13.0-M*
• sbt plugins, tooling, upgrade to sbt 1.x
expand ecosystem
patching the core
• before 2018, I had sent 2 pull requests to
scala/scala
• in 2018, I sent 28 pull requests in my own
time, starting with easy looking ones
• by no means I am an expert
#50
1. engineering patch (zombie robot patch)
• pick up an approved problem, and deliver solution.
2. activist patch (cowboy patch)
• propose a problem and its solution.
patching the core
• for (engineering) contribution ideas, go to scala/bug
or sbt/sbt issue tracker
• channel your inner core dev team
scala/bug
• Gitter chat scala/contributors, sbt/sbt-contrib
• discourse forum
• contributors.scala-lang.org
• Lightbend Discuss: Tooling
• meeting SIP meeting, weekly sbt meeting
• pull request
communication channels
Document how to run tests
#6369
• CONTRIBUTING.md#tests
• JUnit (typically for library)

> junit/testQuick
• ScalaCheck 

> scalacheck/testOnly ByOneRangeTest
• Partest (integration testing)

Pos (compiles), Neg (errors), Run (prints something)

> partest --grep range
Deprecate scala.Predef.any2stringadd
#6315
• in Scala 2.12
• Some(true) + "what" uses Predef.any2stringadd
• "what" + Some(true) uses special String_+
method
• #6315 deprecates the former, and removes it under 

-Xsource:2.14 flag
Remove octal escape literals

#6324
• in Scala 2.11, octal escape literal "10" was
deprecated, and removed under -Xfuture #2342
• I grepped for -Xfuture usages and came across this
one (gardening)
• #6324 removes it
• change is mostly contained in Scanner (converts
stream of characters into tokens)
datatypes
• trees data structure representing the source code
• types type information, which holds on to members
• symbols unique reference to entities like classes and
methods
compiler phases
• scalac -Xshow-phases
• parser (parse source into ASTs)
• namer (resolves names, attach symbols)
• packageobjects (load package objects)
• typer (type the trees)
• patmat (translate match expressions)
• blabla (superaccessors, extmethods, pickler)
• refchecks (reference/override checking)
• blabla (uncurry, fields, tailscalls, specialize, explicitouter, erasure, posterasure,
lambdalift, constructors, flatten, mixin, cleanup, delambdafy)
• jvm (generate JVM bytecode)
-Xprint:all
• scalac -Xprint:all src/main/scala/Hello.scala
[[syntax trees at end of typer]] // Hello.scala
package <empty> {
object Hello extends AnyRef with App {
def <init>(): Hello.type = {
Hello.super.<init>();
()
};
"foo" match {
case "bar" => scala.Predef.println("bar")
case _ => scala.Predef.println("hello1")
}
}
}
[[syntax trees at end of patmat]] // Hello.scala
package <empty> {
object Hello extends AnyRef with App {
def <init>(): Hello.type = {
Hello.super.<init>();
()
};
{
case <synthetic> val x1: String = "foo";
case5(){
if ("bar".==(x1))
matchEnd4(scala.Predef.println("bar"))
else
case6()
};
case6(){
matchEnd4(scala.Predef.println("hello1"))
};
Deprecate procedure syntax without -Xfuture

#6325
• in Scala 2.11, procedure syntax was deprecated
under -Xfuture #3076
• #6325 deprecates it without -Xfuture, and removes it
under -Xsource:2.14
• actual change is in Parser, but 932 files were
changed because code in test, library, compiler were
updated using Scalafix
Remove val in for comprehension under -Xsource:14

#6348
• in Scala 2.10, val inside for comprehension was
deprecated

for {

x <- 1 to 5

val y = x

} yield x+y
• #6348 removes it under -Xsource:2.14
• change contained in Parser
Fix error message for overriding type alias

#6350
• Fixes scala/bug#6001 "Confusing first error message
that overriding type members is possible", which was
marked help wanted
• #6350 implements error message suggested by
DaveScala in #6001:

overriding concrete type alias type A1 is not allowed
except when equivalent
• change contained in RefChecks
Scala Language Spec clarification on extractor
and null
def nullMatch[A](xs: Array[A]): Boolean = xs match {

case Array(xs @_*) => false

case _ => true

}


nullMatch(null)
Scala Language Spec clarification on extractor
and null
• def nullMatch[A](xs: Array[A]): Boolean = xs match {

case Array(xs @_*) => false

case _ => true

}

nullMatch(null)
• in Scala 2.12, pattern matcher would pass null into Array's unapplySeq.
scala/bug#4364 asks to clarify SLS.
• I sent two competing pull requests to solve this two ways:
1. status quo: just change SLS and let each extractors handle null #6374
2. progressive: change SLS, change pattern matcher to automatically
treat null as no match #6485
Remove Float range and Double range

#6468
• in Scala 2.12 there are number of issues reported around
Double ranges, like scala/bug#8518



scala> (1.0 to 2.0 by 0.1).take(3).toList

res0: List[Double] = List(1.0, 1.1)



scala> (1.0 to 2.0 by 0.1).take(4).toList

res1: List[Double] = List(1.0, 1.1, 1.2000000000000002,
1.3000000000000003)
• initially I attempted to fix this by using BigDecimal internally, but
was convinced by Rex Kerr it's a bad idea scala/collection-
strawman#489
• #6468 removes them from the standard library.
Deprecate view bounds without -Xfuture

#6500
• in Scala 2.11, view bounds was deprecated under -
Xfuture #2909
• #6500 deprecates it without -Xfuture, and removes it
under -Xsource:2.14
• change contained in Parser
Suggest typo corrections for "not a member"

#6711
• fixes scala/bug#10181, labelled help wanted
• in Scala 2.10.0-M1, Paul Phillips implemented 

-Ysuggest-idents, which suggested possible identifiers but it
was removed in M2 citing possible performance impact
• #6711 implements the suggestions only for "not a member" error



example.scala:20: error: object stdin is not a member of package io

did you mean StdIn?

import scala.io.stdin.{readLine => line}

^

Add tap and pipe methods to Any under import

#7007
• fixes scala/bug#5324, labelled help wanted
• import scala.util.chaining._

val xs = List(1, 2, 3)

.tap(ys => println("debug " + ys.toString))



val times6 = (_: Int) * 6

(1 - 2 - 3)

.pipe(times6)
• I initially sent #6767, made it into a macro based on a
review, which then was rejected by other reviews

Emit bridge method forwarders with BRIDGE flag

#7035
• attempted to fix scala/bug#11061 "JDK 11 gets confused about
override methods: reference to X is ambiguous" in Scala 2.12.7



trait A { def f: Object }

object B extends A { def f: String = "b" }

• #7035 initially backported 2.13 behavior and didn't emit
forwarder in mirror class for bridge methods, but was
suggested to emit ACC_BRIDGE flag
• Scala 2.12.7 ended up creating more problems, so eventually
2.13 change was backported for 2.12.8 in #7469
Apache License Version 2.0

#7306
• #7306 changes the license to Apache v2
• applies header using sbt-header
pull requests I sent to scala/scala (ny-scala 2019)
reference
other talks
• Seth Tisue, You Are A Scala Contributor

(video, pdf)
• Chris Birchall, A Deep Dive into Scalac (video,
slides)
• Jason Zaugg, Scalac Survival Guide (video)
• ny-scala member since 2010
• Lightbend Tooling team since 2014
• Scala contributions were done in my own
1 of 42

Recommended

RxJava from the trenches by
RxJava from the trenchesRxJava from the trenches
RxJava from the trenchesPeter Hendriks
837 views35 slides
Scala @ TechMeetup Edinburgh by
Scala @ TechMeetup EdinburghScala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghStuart Roebuck
1.1K views28 slides
Scala For Java Programmers by
Scala For Java ProgrammersScala For Java Programmers
Scala For Java ProgrammersEnno Runne
4.6K views135 slides
Scala final ppt vinay by
Scala final ppt vinayScala final ppt vinay
Scala final ppt vinayViplav Jain
227 views66 slides
New Features in JDK 8 by
New Features in JDK 8New Features in JDK 8
New Features in JDK 8Martin Toshev
19.2K views58 slides
Java 5 and 6 New Features by
Java 5 and 6 New FeaturesJava 5 and 6 New Features
Java 5 and 6 New FeaturesJussi Pohjolainen
42.9K views36 slides

More Related Content

What's hot

Java 201 Intro to Test Driven Development in Java by
Java 201   Intro to Test Driven Development in JavaJava 201   Intro to Test Driven Development in Java
Java 201 Intro to Test Driven Development in Javaagorolabs
1.4K views33 slides
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013) by
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)DevelopIntelligence
1.9K views47 slides
Java SE 8 best practices by
Java SE 8 best practicesJava SE 8 best practices
Java SE 8 best practicesStephen Colebourne
100.8K views88 slides
Scala coated JVM by
Scala coated JVMScala coated JVM
Scala coated JVMStuart Roebuck
999 views24 slides
Functional java 8 by
Functional java 8Functional java 8
Functional java 8nick_maiorano
2K views75 slides
Java 101 Intro to Java Programming - Exercises by
Java 101   Intro to Java Programming - ExercisesJava 101   Intro to Java Programming - Exercises
Java 101 Intro to Java Programming - Exercisesagorolabs
6.4K views27 slides

What's hot(20)

Java 201 Intro to Test Driven Development in Java by agorolabs
Java 201   Intro to Test Driven Development in JavaJava 201   Intro to Test Driven Development in Java
Java 201 Intro to Test Driven Development in Java
agorolabs1.4K views
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013) by DevelopIntelligence
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
DevelopIntelligence1.9K views
Java 101 Intro to Java Programming - Exercises by agorolabs
Java 101   Intro to Java Programming - ExercisesJava 101   Intro to Java Programming - Exercises
Java 101 Intro to Java Programming - Exercises
agorolabs6.4K views
Static analysis: Around Java in 60 minutes by Andrey Karpov
Static analysis: Around Java in 60 minutesStatic analysis: Around Java in 60 minutes
Static analysis: Around Java in 60 minutes
Andrey Karpov75 views
Advanced Production Debugging by Takipi
Advanced Production DebuggingAdvanced Production Debugging
Advanced Production Debugging
Takipi135.6K views
Java 8 - Project Lambda by Rahman USTA
Java 8 - Project LambdaJava 8 - Project Lambda
Java 8 - Project Lambda
Rahman USTA5K views
An Introduction to Scala by Brent Lemons
An Introduction to ScalaAn Introduction to Scala
An Introduction to Scala
Brent Lemons1.7K views
Functional Thinking - Programming with Lambdas in Java 8 by Ganesh Samarthyam
Functional Thinking - Programming with Lambdas in Java 8Functional Thinking - Programming with Lambdas in Java 8
Functional Thinking - Programming with Lambdas in Java 8
Ganesh Samarthyam4.6K views
Scala Matsuri 2016: Japanese Text Mining with Scala and Spark by Eduardo Gonzalez
Scala Matsuri 2016: Japanese Text Mining with Scala and SparkScala Matsuri 2016: Japanese Text Mining with Scala and Spark
Scala Matsuri 2016: Japanese Text Mining with Scala and Spark
Eduardo Gonzalez3.9K views
Modern Programming in Java 8 - Lambdas, Streams and Date Time API by Ganesh Samarthyam
Modern Programming in Java 8 - Lambdas, Streams and Date Time APIModern Programming in Java 8 - Lambdas, Streams and Date Time API
Modern Programming in Java 8 - Lambdas, Streams and Date Time API
Ganesh Samarthyam9.4K views

Similar to pull requests I sent to scala/scala (ny-scala 2019)

The Road to Lambda - Mike Duigou by
The Road to Lambda - Mike DuigouThe Road to Lambda - Mike Duigou
The Road to Lambda - Mike Duigoujaxconf
410 views40 slides
Scala in the Wild by
Scala in the WildScala in the Wild
Scala in the WildTomer Gabel
2.8K views44 slides
Code for Startup MVP (Ruby on Rails) Session 2 by
Code for Startup MVP (Ruby on Rails) Session 2Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2Henry S
1.7K views59 slides
A brief tour of modern Java by
A brief tour of modern JavaA brief tour of modern Java
A brief tour of modern JavaSina Madani
188 views51 slides
Interactive Questions and Answers - London Information Retrieval Meetup by
Interactive Questions and Answers - London Information Retrieval MeetupInteractive Questions and Answers - London Information Retrieval Meetup
Interactive Questions and Answers - London Information Retrieval MeetupSease
359 views27 slides
Scala active record by
Scala active recordScala active record
Scala active record鉄平 土佐
6.3K views84 slides

Similar to pull requests I sent to scala/scala (ny-scala 2019)(20)

The Road to Lambda - Mike Duigou by jaxconf
The Road to Lambda - Mike DuigouThe Road to Lambda - Mike Duigou
The Road to Lambda - Mike Duigou
jaxconf410 views
Scala in the Wild by Tomer Gabel
Scala in the WildScala in the Wild
Scala in the Wild
Tomer Gabel2.8K views
Code for Startup MVP (Ruby on Rails) Session 2 by Henry S
Code for Startup MVP (Ruby on Rails) Session 2Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2
Henry S1.7K views
A brief tour of modern Java by Sina Madani
A brief tour of modern JavaA brief tour of modern Java
A brief tour of modern Java
Sina Madani188 views
Interactive Questions and Answers - London Information Retrieval Meetup by Sease
Interactive Questions and Answers - London Information Retrieval MeetupInteractive Questions and Answers - London Information Retrieval Meetup
Interactive Questions and Answers - London Information Retrieval Meetup
Sease359 views
Scala Frustrations by takezoe
Scala FrustrationsScala Frustrations
Scala Frustrations
takezoe3.7K views
Testing in Scala by Adform research by Vasil Remeniuk
Testing in Scala by Adform researchTesting in Scala by Adform research
Testing in Scala by Adform research
Vasil Remeniuk653 views
Testing in Scala. Adform Research by Vasil Remeniuk
Testing in Scala. Adform ResearchTesting in Scala. Adform Research
Testing in Scala. Adform Research
Vasil Remeniuk967 views
Exploring Clojurescript by Luke Donnet
Exploring ClojurescriptExploring Clojurescript
Exploring Clojurescript
Luke Donnet83 views
Archetype autoplugins by Mark Schaake
Archetype autopluginsArchetype autoplugins
Archetype autoplugins
Mark Schaake413 views
The Why and How of Scala at Twitter by Alex Payne
The Why and How of Scala at TwitterThe Why and How of Scala at Twitter
The Why and How of Scala at Twitter
Alex Payne40.6K views
Rails 3 (beta) Roundup by Wayne Carter
Rails 3 (beta) RoundupRails 3 (beta) Roundup
Rails 3 (beta) Roundup
Wayne Carter1.2K views
Scala, Play 2.0 & Cloud Foundry by Pray Desai
Scala, Play 2.0 & Cloud FoundryScala, Play 2.0 & Cloud Foundry
Scala, Play 2.0 & Cloud Foundry
Pray Desai3.3K views
Scala Abide: A lint tool for Scala by Iulian Dragos
Scala Abide: A lint tool for ScalaScala Abide: A lint tool for Scala
Scala Abide: A lint tool for Scala
Iulian Dragos2.7K views
Speaking Scala: Refactoring for Fun and Profit (Workshop) by Tomer Gabel
Speaking Scala: Refactoring for Fun and Profit (Workshop)Speaking Scala: Refactoring for Fun and Profit (Workshop)
Speaking Scala: Refactoring for Fun and Profit (Workshop)
Tomer Gabel765 views
Deploying MLlib for Scoring in Structured Streaming with Joseph Bradley by Databricks
Deploying MLlib for Scoring in Structured Streaming with Joseph BradleyDeploying MLlib for Scoring in Structured Streaming with Joseph Bradley
Deploying MLlib for Scoring in Structured Streaming with Joseph Bradley
Databricks1.4K views
Develop realtime web with Scala and Xitrum by Ngoc Dao
Develop realtime web with Scala and XitrumDevelop realtime web with Scala and Xitrum
Develop realtime web with Scala and Xitrum
Ngoc Dao42.5K views

More from Eugene Yokota

Equality in Scala (ScalaMatsuri 2020) by
Equality in Scala (ScalaMatsuri 2020)Equality in Scala (ScalaMatsuri 2020)
Equality in Scala (ScalaMatsuri 2020)Eugene Yokota
998 views61 slides
sbt: core concepts and updates (Scala Love 2020) by
sbt: core concepts and updates (Scala Love 2020)sbt: core concepts and updates (Scala Love 2020)
sbt: core concepts and updates (Scala Love 2020)Eugene Yokota
394 views50 slides
Analysis of Zinc (nescala 2020) by
Analysis of Zinc (nescala 2020)Analysis of Zinc (nescala 2020)
Analysis of Zinc (nescala 2020)Eugene Yokota
519 views35 slides
Analysis of Zinc (ScalaSphere 2019) by
Analysis of Zinc (ScalaSphere 2019)Analysis of Zinc (ScalaSphere 2019)
Analysis of Zinc (ScalaSphere 2019)Eugene Yokota
574 views50 slides
sbt core concepts (ScalaMatsuri 2019) by
sbt core concepts (ScalaMatsuri 2019)sbt core concepts (ScalaMatsuri 2019)
sbt core concepts (ScalaMatsuri 2019)Eugene Yokota
790 views56 slides
sbt 1 by
sbt 1sbt 1
sbt 1Eugene Yokota
842 views59 slides

More from Eugene Yokota(13)

Equality in Scala (ScalaMatsuri 2020) by Eugene Yokota
Equality in Scala (ScalaMatsuri 2020)Equality in Scala (ScalaMatsuri 2020)
Equality in Scala (ScalaMatsuri 2020)
Eugene Yokota998 views
sbt: core concepts and updates (Scala Love 2020) by Eugene Yokota
sbt: core concepts and updates (Scala Love 2020)sbt: core concepts and updates (Scala Love 2020)
sbt: core concepts and updates (Scala Love 2020)
Eugene Yokota394 views
Analysis of Zinc (nescala 2020) by Eugene Yokota
Analysis of Zinc (nescala 2020)Analysis of Zinc (nescala 2020)
Analysis of Zinc (nescala 2020)
Eugene Yokota519 views
Analysis of Zinc (ScalaSphere 2019) by Eugene Yokota
Analysis of Zinc (ScalaSphere 2019)Analysis of Zinc (ScalaSphere 2019)
Analysis of Zinc (ScalaSphere 2019)
Eugene Yokota574 views
sbt core concepts (ScalaMatsuri 2019) by Eugene Yokota
sbt core concepts (ScalaMatsuri 2019)sbt core concepts (ScalaMatsuri 2019)
sbt core concepts (ScalaMatsuri 2019)
Eugene Yokota790 views
sbt server (LSP discussion, 2018 Jan) by Eugene Yokota
sbt server (LSP discussion, 2018 Jan)sbt server (LSP discussion, 2018 Jan)
sbt server (LSP discussion, 2018 Jan)
Eugene Yokota293 views
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver) by Eugene Yokota
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
sbt, history of JSON libraries, microservices, and schema evolution (Tokyo ver)
Eugene Yokota1.3K views
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver) by Eugene Yokota
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaSphere ver)
Eugene Yokota10.1K views
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaMatsuri ver) by Eugene Yokota
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaMatsuri ver)The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaMatsuri ver)
The state of sbt 0.13, sbt server, and sbt 1.0 (ScalaMatsuri ver)
Eugene Yokota1.4K views
Road to sbt 1.0: Paved with server (2015 Amsterdam) by Eugene Yokota
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Eugene Yokota2.8K views
Road to sbt 1.0 paved with server by Eugene Yokota
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
Eugene Yokota4.9K views

Recently uploaded

Initiating and Advancing Your Strategic GIS Governance Strategy by
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance StrategySafe Software
176 views68 slides
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueShapeBlue
222 views7 slides
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueShapeBlue
218 views20 slides
CryptoBotsAI by
CryptoBotsAICryptoBotsAI
CryptoBotsAIchandureddyvadala199
40 views5 slides
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...ShapeBlue
119 views17 slides
DRBD Deep Dive - Philipp Reisner - LINBIT by
DRBD Deep Dive - Philipp Reisner - LINBITDRBD Deep Dive - Philipp Reisner - LINBIT
DRBD Deep Dive - Philipp Reisner - LINBITShapeBlue
180 views21 slides

Recently uploaded(20)

Initiating and Advancing Your Strategic GIS Governance Strategy by Safe Software
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software176 views
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue222 views
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue218 views
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue119 views
DRBD Deep Dive - Philipp Reisner - LINBIT by ShapeBlue
DRBD Deep Dive - Philipp Reisner - LINBITDRBD Deep Dive - Philipp Reisner - LINBIT
DRBD Deep Dive - Philipp Reisner - LINBIT
ShapeBlue180 views
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... by ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue161 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker54 views
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by ShapeBlue
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue194 views
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ by ShapeBlue
Confidence in CloudStack - Aron Wagner, Nathan Gleason - AmericConfidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
ShapeBlue130 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue166 views
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue238 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue135 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue203 views
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates by ShapeBlue
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesKeynote Talk: Open Source is Not Dead - Charles Schulz - Vates
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates
ShapeBlue252 views
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... by ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue173 views
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... by ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue139 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue180 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue198 views

pull requests I sent to scala/scala (ny-scala 2019)

  • 1. pull requests I sent to scala/scala eugene yokota (@eed3si9n) Lightbend
  • 3. goal 1. become an active participant in the Scala ecosystem
  • 4. contributions 1. help adoption 2. assist other users 3. report issues 4. garden the issue tracker 5. contribute to docs 6. expand ecosystem 7. patch the core
  • 5. help adoption • help the adoption of Scala at work • help the adoption of Lightbend Platform Subscription at work
  • 6. assist other users • assist other users at work, Stackoverflow, Gitter chat etc. • blog • give talks at a meetup :)
  • 8. art of reporting issues • good bug reports are more likely to be fixed. • some bad bug reports can be irritating. • Joel Spolsky: Painless Bug Tracking
  • 10. problem space solution space • observations (sometimes with lower confidence) • requirements
  • 11. problem space solution space • observations (sometimes with lower confidence) • requirements • many possible answers • design decisions
  • 12. good bug report: 3 + 1 things • steps: steps to reproduce your problem. • problems. what you think is the problem. include full error message, stack trace, etc. • expectations. describe what you think should've happen. • (notes). your analysis of what's going on.
  • 14. • summarize discussions from other channels • capture problems • organize observations, opinions, and analyses • reproduce reported issues • link to relevant source code • leave breadcrumbs for contributors (previous discussions, 
 language spec, precedence in other languages) • review pull requests • triage gardening the issue tracker
  • 15. • scala/docs.scala-lang Scala documentation • scala/scala ScalaDocs for standard library, language spec • sbt/website sbt documentation • sbt/sbt ScalaDocs for sbt contribute docs
  • 16. • Scala libraries, tooling, upgrade to 2.13.0-M* • sbt plugins, tooling, upgrade to sbt 1.x expand ecosystem
  • 18. • before 2018, I had sent 2 pull requests to scala/scala • in 2018, I sent 28 pull requests in my own time, starting with easy looking ones • by no means I am an expert #50
  • 19. 1. engineering patch (zombie robot patch) • pick up an approved problem, and deliver solution. 2. activist patch (cowboy patch) • propose a problem and its solution. patching the core
  • 20. • for (engineering) contribution ideas, go to scala/bug or sbt/sbt issue tracker • channel your inner core dev team scala/bug
  • 21. • Gitter chat scala/contributors, sbt/sbt-contrib • discourse forum • contributors.scala-lang.org • Lightbend Discuss: Tooling • meeting SIP meeting, weekly sbt meeting • pull request communication channels
  • 22. Document how to run tests #6369 • CONTRIBUTING.md#tests • JUnit (typically for library)
 > junit/testQuick • ScalaCheck 
 > scalacheck/testOnly ByOneRangeTest • Partest (integration testing)
 Pos (compiles), Neg (errors), Run (prints something)
 > partest --grep range
  • 23. Deprecate scala.Predef.any2stringadd #6315 • in Scala 2.12 • Some(true) + "what" uses Predef.any2stringadd • "what" + Some(true) uses special String_+ method • #6315 deprecates the former, and removes it under 
 -Xsource:2.14 flag
  • 24. Remove octal escape literals
 #6324 • in Scala 2.11, octal escape literal "10" was deprecated, and removed under -Xfuture #2342 • I grepped for -Xfuture usages and came across this one (gardening) • #6324 removes it • change is mostly contained in Scanner (converts stream of characters into tokens)
  • 25. datatypes • trees data structure representing the source code • types type information, which holds on to members • symbols unique reference to entities like classes and methods
  • 26. compiler phases • scalac -Xshow-phases • parser (parse source into ASTs) • namer (resolves names, attach symbols) • packageobjects (load package objects) • typer (type the trees) • patmat (translate match expressions) • blabla (superaccessors, extmethods, pickler) • refchecks (reference/override checking) • blabla (uncurry, fields, tailscalls, specialize, explicitouter, erasure, posterasure, lambdalift, constructors, flatten, mixin, cleanup, delambdafy) • jvm (generate JVM bytecode)
  • 27. -Xprint:all • scalac -Xprint:all src/main/scala/Hello.scala [[syntax trees at end of typer]] // Hello.scala package <empty> { object Hello extends AnyRef with App { def <init>(): Hello.type = { Hello.super.<init>(); () }; "foo" match { case "bar" => scala.Predef.println("bar") case _ => scala.Predef.println("hello1") } } } [[syntax trees at end of patmat]] // Hello.scala package <empty> { object Hello extends AnyRef with App { def <init>(): Hello.type = { Hello.super.<init>(); () }; { case <synthetic> val x1: String = "foo"; case5(){ if ("bar".==(x1)) matchEnd4(scala.Predef.println("bar")) else case6() }; case6(){ matchEnd4(scala.Predef.println("hello1")) };
  • 28. Deprecate procedure syntax without -Xfuture
 #6325 • in Scala 2.11, procedure syntax was deprecated under -Xfuture #3076 • #6325 deprecates it without -Xfuture, and removes it under -Xsource:2.14 • actual change is in Parser, but 932 files were changed because code in test, library, compiler were updated using Scalafix
  • 29. Remove val in for comprehension under -Xsource:14
 #6348 • in Scala 2.10, val inside for comprehension was deprecated
 for {
 x <- 1 to 5
 val y = x
 } yield x+y • #6348 removes it under -Xsource:2.14 • change contained in Parser
  • 30. Fix error message for overriding type alias
 #6350 • Fixes scala/bug#6001 "Confusing first error message that overriding type members is possible", which was marked help wanted • #6350 implements error message suggested by DaveScala in #6001:
 overriding concrete type alias type A1 is not allowed except when equivalent • change contained in RefChecks
  • 31. Scala Language Spec clarification on extractor and null def nullMatch[A](xs: Array[A]): Boolean = xs match {
 case Array(xs @_*) => false
 case _ => true
 } 
 nullMatch(null)
  • 32. Scala Language Spec clarification on extractor and null • def nullMatch[A](xs: Array[A]): Boolean = xs match {
 case Array(xs @_*) => false
 case _ => true
 }
 nullMatch(null) • in Scala 2.12, pattern matcher would pass null into Array's unapplySeq. scala/bug#4364 asks to clarify SLS. • I sent two competing pull requests to solve this two ways: 1. status quo: just change SLS and let each extractors handle null #6374 2. progressive: change SLS, change pattern matcher to automatically treat null as no match #6485
  • 33. Remove Float range and Double range
 #6468 • in Scala 2.12 there are number of issues reported around Double ranges, like scala/bug#8518
 
 scala> (1.0 to 2.0 by 0.1).take(3).toList
 res0: List[Double] = List(1.0, 1.1)
 
 scala> (1.0 to 2.0 by 0.1).take(4).toList
 res1: List[Double] = List(1.0, 1.1, 1.2000000000000002, 1.3000000000000003) • initially I attempted to fix this by using BigDecimal internally, but was convinced by Rex Kerr it's a bad idea scala/collection- strawman#489 • #6468 removes them from the standard library.
  • 34. Deprecate view bounds without -Xfuture
 #6500 • in Scala 2.11, view bounds was deprecated under - Xfuture #2909 • #6500 deprecates it without -Xfuture, and removes it under -Xsource:2.14 • change contained in Parser
  • 35. Suggest typo corrections for "not a member"
 #6711 • fixes scala/bug#10181, labelled help wanted • in Scala 2.10.0-M1, Paul Phillips implemented 
 -Ysuggest-idents, which suggested possible identifiers but it was removed in M2 citing possible performance impact • #6711 implements the suggestions only for "not a member" error
 
 example.scala:20: error: object stdin is not a member of package io
 did you mean StdIn?
 import scala.io.stdin.{readLine => line}
 ^

  • 36. Add tap and pipe methods to Any under import
 #7007 • fixes scala/bug#5324, labelled help wanted • import scala.util.chaining._
 val xs = List(1, 2, 3)
 .tap(ys => println("debug " + ys.toString))
 
 val times6 = (_: Int) * 6
 (1 - 2 - 3)
 .pipe(times6) • I initially sent #6767, made it into a macro based on a review, which then was rejected by other reviews

  • 37. Emit bridge method forwarders with BRIDGE flag
 #7035 • attempted to fix scala/bug#11061 "JDK 11 gets confused about override methods: reference to X is ambiguous" in Scala 2.12.7
 
 trait A { def f: Object }
 object B extends A { def f: String = "b" }
 • #7035 initially backported 2.13 behavior and didn't emit forwarder in mirror class for bridge methods, but was suggested to emit ACC_BRIDGE flag • Scala 2.12.7 ended up creating more problems, so eventually 2.13 change was backported for 2.12.8 in #7469
  • 38. Apache License Version 2.0
 #7306 • #7306 changes the license to Apache v2 • applies header using sbt-header
  • 41. other talks • Seth Tisue, You Are A Scala Contributor
 (video, pdf) • Chris Birchall, A Deep Dive into Scalac (video, slides) • Jason Zaugg, Scalac Survival Guide (video)
  • 42. • ny-scala member since 2010 • Lightbend Tooling team since 2014 • Scala contributions were done in my own