Skip to content
This repository has been archived by the owner on Mar 11, 2023. It is now read-only.

Add Scala 2.13 support #275

Merged

Commits on Oct 20, 2019

  1. Tweaks to sbt resolvers (https for JGit & predefined resolver for Son…

    …atype OSS releases)
    
    Use https instead of http for JGit resolver, otherwise sbt gives security warnings.
    
    See also:
    
    https://www.scala-sbt.org/1.x/docs/Resolvers.html#Predefined+resolvers
    rtyley committed Oct 20, 2019
    Configuration menu
    Copy the full SHA
    30923b5 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2019

  1. Add Scala 2.13 support

    This project now compiles with Scala 2.13 by default, while still
    cross-compiling to Scala 2.12 & 2.11.
    
    Although Scala 2.13.1 has been released, this change sticks with 2.13.0,
    as `scoverage` has not yet released an update compatible with 2.13.1:
    
    scoverage/sbt-scoverage#295
    scoverage/scalac-scoverage-plugin#283
    scoverage/sbt-scoverage#299
    
    
    Migration issues addressed with the update to Scala 2.13:
    
    ### 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
    rtyley committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    34571e8 View commit details
    Browse the repository at this point in the history