-
Notifications
You must be signed in to change notification settings - Fork 157
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
Build failure with Scala 2.13.1 #295
Comments
Needs scalac-scoverage-plugin with this pull request merged scoverage/scalac-scoverage-plugin#279 |
This issue and scoverage/scalac-scoverage-plugin#279 are two different issues. That one is with plugin test code. This one causes errors in runtime. The source of these two problems is the same - Scala compiler 2.13.1 is not backward compatible with 2.13.0. Scoverage plugin version compiled with Scala 2.13.0 does not work with Scala 2.13.1. I don't know if this incompatibility is accidental and should be considered a bug or on purpose and what will next version of compiler ( |
scoverage/scalac-scoverage-plugin#279 allows compiling the plugin against 2.13.1 (and it remains compileable with older Scala versions). The runtime failure is because the scala-compiler.jar of 2.13.1 is not binary compatible with the scala-compiler.jar of 2.13.0. This is not a bug, we only guarantee binary compatibility for the library. This means that compiler plugins have to be fully cross-versioned. Concretely, Note that this is true for all compiler plugins (see typelevel/kind-projector#15 for example). For reference, the changes to wartremover that were done by @xuwei-k to support full cross-versioning: wartremover/wartremover@5c59c86...acc56b8 |
Necessary until sbt-scoverage [gets fixed](scoverage/sbt-scoverage#295)
Necessary until sbt-scoverage [gets fixed](scoverage/sbt-scoverage#295)
Necessary until sbt-scoverage [gets fixed](scoverage/sbt-scoverage#295)
Necessary until sbt-scoverage [gets fixed](scoverage/sbt-scoverage#295)
Necessary until sbt-scoverage [gets fixed](scoverage/sbt-scoverage#295)
Just a 👍 , i'm encourtering this failure when attempting to upgrade bitcoin-s to 2.13.1 https://travis-ci.org/bitcoin-s/bitcoin-s/jobs/588220140#L352 |
Disable coverage until sbt-scoverage is fixed: scoverage/sbt-scoverage#295 Signed-off-by: 35V LG84 <[email protected]>
Beware of 2.13.1 issue regarding scoverage/sbt-scoverage#295
I have the same issue with scala 2.13.1 and scoverage 1.6.0 openjdk 11.0.4 2019-07-16
|
I'm also struggling with this issue. If there anything I can do to help getting it resolved? |
I'm not a maintainer but I would guess that if you want to help, you can open a PR that adds full cross-compilation down to the minor version number, as suggested here: #295 (comment) Basically, this plugin is only cross-compiled for scala 2.13 when it actually needs to be compiled for 2.13.0 and 2.13.1. Usually this isn't a problem but there appears to be an API change between 2.13.0 and 2.13.1. |
* Enable scoverage in 2.13 build Beware of 2.13.1 issue regarding scoverage/sbt-scoverage#295 * Enable apidoc generation for 2.13 * travis: Enable codecoverage for jvm build * Add flag to codecov to differentiate scala versions * Remove sbt keys that do nothing
There's another, quicker solution: the one that @olafurpg asked me to put together for Instead of changing the publication mechanism and publishing artifacts for every single version of Scala, keep publishing global ones for 2.11, 2.12 and 2.13, but only make them compatible with the latest Scala version. For example, if we were to do that to With the current state of Scala, that would mean:
If the reporter API stays stable from now on, problem sorted. If it doesn't, "just" fix the breakage and release a non-backwards compatible build for the latest versions. I can absolutely have a go at that if you feel this would be an acceptable solution. |
Speaking as a user, this is a totally acceptable solution. |
I have a working proof of concept - it's really very little work. Replace Load up whatever project you have that uses scoverage and 2.13.1, and set the appropriate property:
Done. You now have working code coverage. The clean thing to do would be to publish Happy to submit the corresponding PRs, but I'd love to get approval from a project maintainer first that this is the way they want to go. |
PRs submitted: Do let me know if there's anything else I can do to push this forward! |
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
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
scoverage is broken on 2.13.1 scoverage/sbt-scoverage#295
Just met this error, and finding this thread solved is beautiful Merci @nrinaudo et @D-Roch 🏆 |
This reverts commit 5e606eb.
Just met this error with Scala |
@asavelyev01 duplicate of #319 |
https://travis-ci.org/plokhotnyuk/expression-evaluator/jobs/586472890
https://travis-ci.org/plokhotnyuk/jsoniter-scala/jobs/586468216
The text was updated successfully, but these errors were encountered: