-
Notifications
You must be signed in to change notification settings - Fork 19
Description
I am using scala-rewrites 0.1.1 with Scala 2.13, sbt 1.3.13, sbt-scalafix 0.9.18.
My SBT_OPTS is -Xms512M -Xmx8G -Xss2M -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=1024M -XX:+CMSClassUnloadingEnabled
To address new warnings on Scala 2.13.3, I am trying to usefix.scala213.ExplicitNonNullaryApply on my codebases.
And I thought ExplicitNonNullaryApply is very slow:
sbt:myProject> commonJVM/scalafixAll fix.scala213.ExplicitNonNullaryApply
[info] Compiling 59 Scala sources to /home/vagrant/IdeaProjects/myProject/common/jvm/target/scala-2.13/classes ...
[info] Running scalafix on 59 Scala sources
[info] Compiling 17 Scala sources to /home/vagrant/IdeaProjects/myProject/common/jvm/target/scala-2.13/test-classes ...
[info] Running scalafix on 17 Scala sources
[success] Total time: 349 s (05:49), completed 2020/07/06 9:15:31
sbt:myProject> commonJVM/scalafixAll fix.scala213.ExplicitNonNullaryApply
[info] Running scalafix on 59 Scala sources
[info] Running scalafix on 17 Scala sources
[success] Total time: 302 s (05:02), completed 2020/07/06 9:20:38
sbt:myProject> commonJVM/scalafixAll fix.scala213.ExplicitNonNullaryApply
[info] Running scalafix on 17 Scala sources
[info] Running scalafix on 59 Scala sources
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "classloader-cache-cleanup-0"
1st run took about 6 minutes, then 2nd run took 6 minutes, finally 3rd run causes OutOfMemoryError.
My commonJVM project has about 12,000 lines of Scala code.
My other projects has 100,000+ lines of Scala code, so I am afraid that running ExplicitNonNullaryApply on large Scala project is very time-consuming/not stable.
I prefer using scalafix with CI to enfoce coding standard to improve code quality, so it would be great if ExplicitNonNullaryApply become fast enough for daily usage.
Taking long on 1st run is accpetable, but I expect 2nd-or-later run should be fast since no code changes...
It is fine to close this issue as wontfix if ExplicitNonNullaryApply is intended for one-time migration, and not for daily use.
Migrating huge existing code base to prepare for Scala 3 is heavylifting, so even one-time usage is highly valuable.
After migratiion using one-time ExplicitNonNullaryApply, programmers can manually fix when they forgot to add () to new code, by following scala compiler warning.