Skip to content

Conversation

dependabot-preview[bot]
Copy link
Contributor

Bumps scala-library from 2.12.4 to 2.13.4.

Release notes

Sourced from scala-library's releases.

Scala 2.13.4:

  • Restores default global ExecutionContext to 2.12 behavior
  • Improves pattern matching, especially in exhaustivity checking
  • Adds experimental support for consuming some libraries built by Scala 3

and more! Details below.

Concurrency

NOTE The following change affects parallelism and performance. If you use scala.concurrent.ExecutionContext.global you may want to adapt your code. (But note that Akka is unaffected, because it uses its own execution contexts.)

In 2.13.0 we made ExecutionContext.global "opportunistic". This enabled "batching" of nested tasks to execute on the same thread, avoiding an expensive context switch. That strategy requires user code to wrap long-running and/or blocking tasks with blocking { ... } to maintain parallel execution.

For 2.13.4, we restore 2.12's default non-batching behavior, which is safer for arbitrary user code. Users wanting increased performance may override the default, if they believe their code uses blocking correctly. We make that choice available via ExecutionContext.opportunistic.

Using ExecutionContext.opportunistic requires a bit of extra boilerplate, made necessary by binary compatibility constraints on the standard library. Detailed instructions are in ExecutionContext.global's Scaladoc.

Further detail: #9270/#9296/scala/bug#12089,

Pattern matching

The pattern matcher is now much better at warning you if a match isn't exhaustive.

The following types of matches no longer disable exhaustivity checking:

  • guards (case <pattern> if <condition> => ...) #9140[]
  • custom extractors (user-defined unapply or unapplySeq) #9140[]/#9162[]
  • unsealed types, if you opt in via -Xlint or -Xlint:strict-unsealed-patmat #9140[]/#9299[]

Additionally,

  • private classes are now treated as if sealed #9211
  • singleton types no longer prematurely widen #9209
  • tuples are handled properly #9147/#9163/#9147

New warnings reported can be resolved by:

  1. adding any missing cases
  2. in the case of complementary guards (e.g. if n > 0 and if n <= 0) by dropping the last guard
  3. for custom extractors: demarking irrefutable extractors as such, by defining the return type as Some
  4. for sealed types: marking traits or parent classes sealed, parent classes abstract, and classes final
Commits
  • 39148e4 mailmap updates
  • 74cffdd Merge pull request #9318 from retronym/ticket/12227
  • ca1cc4d Fix regressions in immutable.TreeMap merge errors from 2.12.x
  • 1df410a Merge pull request #9296 from viktorklang/wip-opportunistic-√
  • 0044904 Update scaladocs
  • 8507cf0 Merge pull request #9312 from dwijnand/exhaust-nested-in-irrefutable
  • 855b2a8 Patterns under irrefutable extractors are fixed
  • a8d3741 Merge pull request #9308 from lrytz/merge-2.12-to-2.13-nov-9
  • 2105dc7 Merge pull request #9306 from scalacenter/tasty/block-tuple
  • 9ace1b1 Merge pull request #9307 from dotty-staging/fix-fun-sig
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Bumps [scala-library](https://github.com/scala/scala) from 2.12.4 to 2.13.4.
- [Release notes](https://github.com/scala/scala/releases)
- [Commits](scala/scala@v2.12.4...v2.13.4)

Signed-off-by: dependabot-preview[bot] <[email protected]>
@dependabot-preview dependabot-preview bot added the dependencies Pull requests that update a dependency file label Nov 20, 2020
@dependabot-preview
Copy link
Contributor Author

Superseded by #121.

@dependabot-preview dependabot-preview bot deleted the dependabot/maven/org.scala-lang-scala-library-2.13.4 branch February 23, 2021 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants