This repository has been archived by the owner on Jun 28, 2022. It is now read-only.
forked from DanielaSfregola/twitter4s
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This project now compiles with Scala 2.13 by default, while still cross-compiling to Scala 2.12 & 2.11. Issues addressed with this upgrade: ### Underscore (`_`) is no longer a valid identifer for `val`s Using underscore like this is no longer allowed... ``` implicit val _ = ... ``` ...we have to give the `val` a valid name (even if it's just `v`): ``` implicit val v = ... ``` See also: * scala/bug#10384 * scala/bug#7691 * scala/scala#6218 ### `Map.mapValues()` now returns a `MapView` rather than a `Map` We usually want a `Map`, so we can just add in a `.toMap` to the end of the expression - it's harmless in Scala 2.12, and allows the code to compile in Scala 2.13. `Map.mapValues()` itself is deprecated in Scala 2.13, but using the new recommended alternative doesn't work in Scala 2.12. https://docs.scala-lang.org/overviews/core/collections-migration-213.html#what-are-the-breaking-changes See also: * scala/bug#10919 * scala/scala#7014 ### `.to` can no longer infer what resulting collection type you want This is all part of `CanBuildFrom` going away in Scala 2.13: https://www.scala-lang.org/blog/2018/06/13/scala-213-collections.html#life-without-canbuildfrom
- Loading branch information
Showing
5 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ enablePlugins(GhpagesPlugin, SiteScaladocPlugin) | |
name := "twitter4s" | ||
version := "6.2-SNAPSHOT" | ||
|
||
scalaVersion := "2.12.4" | ||
scalaVersion := "2.13.1" | ||
|
||
resolvers ++= Seq( | ||
Resolver.sonatypeRepo("releases"), | ||
|
@@ -53,7 +53,7 @@ lazy val standardSettings = Seq( | |
ScmInfo(url("https://github.com/DanielaSfregola/twitter4s"), | ||
"scm:git:[email protected]:DanielaSfregola/twitter4s.git")), | ||
apiURL := Some(url("http://DanielaSfregola.github.io/twitter4s/latest/api/")), | ||
crossScalaVersions := Seq("2.12.4", "2.11.12"), | ||
crossScalaVersions := Seq(scalaVersion.value, "2.12.10", "2.11.12"), | ||
pomExtra := ( | ||
<developers> | ||
<developer> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters