Skip to content

Bump Scala version to 2.13.0-M5 #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ addons:
scala:
- 2.11.12
- 2.12.6
- 2.13.0-M4
- 2.13.0-M5
jdk:
- openjdk6
- oraclejdk8
Expand All @@ -28,7 +28,7 @@ env:
- secure: "m0Fw/eH7RXJJoBTfqV6CMd7kaIN2pRPnQPNXJGb546UjqYAlYTkfjvVrWpsgpisRBptI1FEHn24yGbgAHjIes/4un/O62K66I0BffL8PbdeHeNcDjSrTesKEqage2mQfGOiqccVsmkgiKeXNYL8tPZRmPQQ3XZ97mS1SXWlqAJSMW6HfNnvqW14Gdb/snR6I8lQ2o5tRnLerWPnI96pp+xjZca2lD4XDvH2wLJXXLmYY61e23ZYzZMepxBxhGa7js3YTYzCWNrOfBLjFJ5nwRxbjR0WMuz5z5Gdy715WtguKS4Fffd/GJHycLROBU9LCAQDMTxMFvqzFqVFpfq0BuTmmkXFXj+a7dO+ABG0RfoDfoMjn7pHwyHNCZyMMuR1HCjMkbGFwC+Zme2UAYNivtcsuWWeMuypwjyqjfFfNns4FHJ0SXFtC/6+OJkAuUdbEJKReYWKWEsP5SnCH/8PLlc+uUl3tjQkFLc1sOAyx9cTWyBErwuJXhgTrjT9AWvO+fvhcm8z/p5+aaF/U9GIrzPqziX4hGjzc/WC+rsFJSiBDlFQl7br+m8WWs7/wuXqPGXmhf0BNQViDi7fZndDHcY3p3T0An05d/IMKjCUrgLDlJi6VYs9XN7S8ay6MH+XTwIsJGSxtGjfEO4rHGIjtR2GRr8TqdNfnpsI3ucbia1Y="
matrix:
- SCALAJS_VERSION=
- SCALAJS_VERSION=0.6.23
- SCALAJS_VERSION=0.6.25
- SCALAJS_VERSION=1.0.0-M3

matrix:
Expand All @@ -38,14 +38,14 @@ matrix:
scala: 2.12.6

- jdk: openjdk6
scala: 2.13.0-M4
scala: 2.13.0-M5

# ?
- jdk: oraclejdk8
scala: 2.11.12

# 2.13.0-M4 is not available in Scala.js 1.0.0-M3
- scala: 2.13.0-M4
# 2.13.0-M5 is not available in Scala.js 1.0.0-M3
- scala: 2.13.0-M5
env: SCALAJS_VERSION=1.0.0-M3
include:

Expand All @@ -72,8 +72,8 @@ matrix:
# | oraclejdk8 | 2.12.6 | jvm | | |
# | oraclejdk8 | 2.12.6 | js | 0.6.23 | |
# | oraclejdk8 | 2.12.6 | js | 1.0.0-M3 | |
# | oraclejdk8 | 2.13.0-M4 | jvm | | |
# | oraclejdk8 | 2.13.0-M4 | js | 0.6.23 | |
# | oraclejdk8 | 2.13.0-M5 | jvm | | |
# | oraclejdk8 | 2.13.0-M5 | js | 0.6.23 | |
# | oraclejdk8 | 2.12.6 | jvm | | true |

before_script: ./checkCLA.sh
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ lazy val junit = libraryDependencies += "com.novocode" % "junit-interface" % "0.

lazy val scala211 = "2.11.12"
lazy val scala212 = "2.12.6"
lazy val scalaJs213 = "2.13.0-M4" // Scala.js does no have -pre
lazy val scalaJs213 = "2.13.0-M5" // Scala.js does no have -pre

lazy val scala213 = "2.13.0-M4"
lazy val scala213 = "2.13.0-M5"
// lazy val scala213 = "2.13.0-pre-3ae6282" // use the sbt command `latest-213` to fetch the latest version

lazy val scala213Settings = Seq(
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ else
// see https://github.com/scala/sbt-scala-module/issues/35
Seq(addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.3"))

val scalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).filter(_.nonEmpty).getOrElse("0.6.23")
val scalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).filter(_.nonEmpty).getOrElse("0.6.25")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.5.0")
Expand Down
4 changes: 2 additions & 2 deletions scalafix/input/src/main/scala/fix/RoughlySrc213.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ object RoughlySrc213 {
s.append(List(4, 5, 6))
1 #:: 2 #:: 3 #:: Stream.Empty
val isEmpty: Stream[_] => Boolean = {
case Stream.Empty => true
case x #:: xs => false
case x #:: xs => false
case _ => true
}
}
6 changes: 3 additions & 3 deletions scalafix/output213/src/main/scala/fix/RoughlySrc213.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ package fix
object RoughlySrc213 {
val s = LazyList(1, 2, 3)
s.lazyAppendedAll(List(4, 5, 6))
1 #:: 2 #:: 3 #:: LazyList.Empty
1 #:: 2 #:: 3 #:: LazyList.empty
val isEmpty: LazyList[_] => Boolean = {
case LazyList.Empty => true
case x #:: xs => false
case x #:: xs => false
case _ => true
}
}
7 changes: 7 additions & 0 deletions scalafix/rules/src/main/scala/fix/Roughly.scala
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ final case class Roughly(index: SemanticdbIndex, config: RoughlyConfig)
Symbol("_root_.scala.collection.immutable.Stream.append.")
)

val streamEmpty = SymbolMatcher.exact(
Symbol("_root_.scala.collection.immutable.Stream.Empty.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add it to the scalafix 0.6 branch?

val streamEmpty = exact(
  "scala/collection/immutable/Stream#empty()."
)

https://github.com/scala/scala-collection-compat/blob/scalafix-0.6/scalafix/rules/src/main/scala/fix/Roughly.scala#L44-L46

)

def replaceSymbols(ctx: RuleCtx): Patch = {
if (config.withLazyList) {
ctx.replaceSymbols(
Expand Down Expand Up @@ -86,6 +90,9 @@ final case class Roughly(index: SemanticdbIndex, config: RoughlyConfig)
case streamAppend(t: Name) if withLazyAppendedAll =>
ctx.replaceTree(t, "lazyAppendedAll")

case streamEmpty(t: Name) if withLazyList =>
ctx.replaceTree(t, "empty")

}.asPatch

collectFixes + replaceSymbols(ctx)
Expand Down