-
Notifications
You must be signed in to change notification settings - Fork 14
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
Assess -Xsource:3
using community build
#769
Comments
This comment has been minimized.
This comment has been minimized.
https://scala-ci.typesafe.com/job/scala-2.13.x-jdk11-integrate-community-build/2703/ 42 green repos, but also lots of failures, most notably sampling of failure causes:
fixes for these could easily be submitted upstream, and then we could re-run and get more results this is one of those times where we don't primarily want a community build that rewires all the dependencies; we would primarily want to build each repo separately it would not be super hard for me (or somebody) to write a script that glues all the on the other hand, I don't have any further time for this either this week or next, but I could probably return to it after that |
I'll see if I can look into it. I think the compiler could also stop emitting errors on symbol sytnax since it's still supported in Scala 3 under a language feature. But for kind-projector at least, the error likely comes from a test exercising the
That would be great! No pressure though :). |
This commit lets scalatest compile with the Scala 2.13 flag `-Xsource:3` (but does not enable the flag in the build), this came up in scala/scala-dev#769. The changes needed were: - Add missing parens when overriding `Iterator#next()` - Remove usages of symbol literal syntax - Remove usages of procedure syntax - Fix code that relied on any2stringadd
Scala 3 still supports symbol literals even if they require a language import now (cf scala/scala3#11588), so don't emit an error if we find one under -Xsource:3 as that could unnecessarily impede cross-compilation as discovered in scala/scala-dev#769.
Scala 2.13.6 and 2.12.14 will interpret `?` as a wildcard when using the `-Xsource:3` flag (cf scala/scala#9560)). This means that the old kind-projector syntax will no longer work, so it seems like a good time to remove it. This will also allow us to compile more of the community-build with `-Xsource:3` enabled (cf scala/scala-dev#769). Sincet this is a breaking change, we also bump the version to 0.12.0-SNAPSHOT.
This commit lets scalatest compile with the Scala 2.13 flag `-Xsource:3` (but does not enable the flag in the build), this came up in scala/scala-dev#769. The changes needed were: - Add missing parens when overriding `Iterator#next()` - Remove usages of symbol literal syntax - Remove usages of procedure syntax - Fix code that relied on any2stringadd
This commit lets scalatest compile with the Scala 2.13 flag `-Xsource:3` (but does not enable the flag in the build), this came up in scala/scala-dev#769. The changes needed were: - Add missing parens when overriding `Iterator#next()` - Remove usages of symbol literal syntax - Remove usages of procedure syntax - Fix code that relied on any2stringadd
@SethTisue do you think you could try running this again now that all the known issues are fixed? |
@smarter sure, after scala/community-build#1418 lands |
Looks like kind-projector isn't up-to-date in the community build since that doesn't match the current sources: https://github.com/typelevel/kind-projector/blob/main/src/test/scala/test.scala#L17 |
Some observations:
Which are actually caused by the private on the definition of LensHelper: case class LensHelper[T] private () { which now also implies that the apply method is private. This can be fixed by explicitly declaring these methods as public: diff --git quicklens/src/main/scala-2.13+/com.softwaremill.quicklens/package.scala quicklens/src/main/scala-2.13+/com.softwaremill.quicklens/package.scala
index 9675d9d..ff647d3 100644
--- quicklens/src/main/scala-2.13+/com.softwaremill.quicklens/package.scala
+++ quicklens/src/main/scala-2.13+/com.softwaremill.quicklens/package.scala
@@ -127,14 +127,19 @@ package object quicklens {
def modifyAllLens[T]: MultiLensHelper[T] = MultiLensHelper[T]()
case class LensHelper[T] private () {
-
def apply[U](path: T => U): PathLazyModify[T, U] = macro QuicklensMacros.modifyLazy_impl[T, U]
}
+ object LensHelper {
+ def apply[T](): LensHelper[T] = new LensHelper[T]
+ }
case class MultiLensHelper[T] private () {
def apply[U](path1: T => U, paths: (T => U)*): PathLazyModify[T, U] = macro QuicklensMacros.modifyLazyAll_impl[T, U]
}
+ object MultiLensHelper {
+ def apply[T](): MultiLensHelper[T] = new MultiLensHelper[T]
+ }
case class PathLazyModify[T, U](doModify: (T, U => U) => T) { So overall this is looking good (except the specs2 and utest failures prevent a lot of projects from compiling). |
This syntax doesn't compile with `-Xsource:3` and thus prevents us from running utest in the Scala 2 community build with this flag enabled (scala/scala-dev#769).
This syntax doesn't compile with `-Xsource:3` and thus prevents us from running utest in the Scala 2 community build with this flag enabled (scala/scala-dev#769).
new run with fixes for specs2, fastparse, fastparse-scalameta, scalameta: https://scala-ci.typesafe.com/job/scala-2.13.x-jdk11-integrate-community-build/2887/ |
run 2887 shows: BLOCKING DOWNSTREAM: scalatest-3-0 (62), spray-json (53), wartremover (53), json4s (47), scodec-bits (45), fansi (22), akka-stream (21), acyclic (19), scalatags (11), http4s-parboiled2 (9), spire (7), scalamock (2), hasher (1), lift-json (1), decline (1), mainargs (1), tut (1) for scalatest-3-0 we could just use a JAR from Maven Central instead spray-json, wartremover, scodec-bits look to me like they probably just need trivial fixes json4s situation isn't clear to me at a glance |
That |
@smarter after scala/community-build#1456 is done, doing this sort of experiment will become easier |
that's done now, so I intend to return to this soon-ish |
there is a new full run here: https://scala-ci.typesafe.com/view/scala-2.13.x/job/scala-2.13.x-jdk11-integrate-community-build/3190/artifact/report.html (scroll down for links to per-repo failure logs) 181 repos are green, so that's good these are the failures where
we would need to dig deeper into the following failures to understand them:
|
Likely the same as #769 (comment), we should deprecate postfix |
The easily-nerd-sniped side of my personality wants to investigate the failures, but I think I've concluded that wouldn't be an ideal use of my time. Overall, the results of this experiment were good. I invite anyone disquieted by any of the failures to investigate and, if appropriate, open specific individual tickets on them in scala/bug. |
This syntax doesn't compile with `-Xsource:3` and thus prevents us from running utest in the Scala 2 community build with this flag enabled (scala/scala-dev#769).
This came up with @smarter at https://gitter.im/typelevel/general?at=6086d87e81866c680c48df4f
We should at least try it and see what happens.
The text was updated successfully, but these errors were encountered: