-
Notifications
You must be signed in to change notification settings - Fork 185
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
Scalafix does not work on Windows: illegal/unsupported escape sequence #583
Comments
Thank you for reporting! I have tracked down the error to this location scalafix/scalafix-cli/src/main/scala/scalafix/cli/CliRunner.scala Lines 406 to 415 in 325ad57
It seems we are using the filenames as a filter to include/exclude files. This looks very weird to me, fix is likely simple. We should first setup CI on appveyor to reproduce the bug. |
I got the CI setup: #585 The next step is to find a Windows machine :). |
Is there any known workaround for this issue? |
First time I tried running scalafix I ran right into this problem. Not a superb initial experience with the (potentially great?) tool :) |
😭 I know... The reason I'm pushing this back is because the upcoming scalafix release will be so much better than the current 0.5.10, but I'm blocked by a couple more critical changes. I would prefer if you hold onto trying scalafix until v0.6.0 is out 😊 I'm sorry! |
Even if I fixed this in master today you'd have to wait a couple more weeks until a stable release is out. |
As a workaround I can run |
Thanks for the workaround! The user experience is still pretty rough in v0.5 (memory consumption is way too high, for example), I'm working towards making it smoother. There's been a lot of R&D for the past ~1.5 year in how to deliver semantic tooling outside of the compiler and I'm finally happy with what we have in scalafix, I will make more noise once I think it's proper good :) |
Was able to run Cats 1.0.0 migration with Scalafix using WSL workaround. But looking forward into using scalafix as a linting tool and for that I need it to work in Windows directly. Can wait a few weeks though 😃 |
Sweet, glad it worked out for the cats 1.0 migration, hope it was helpful! This ticket will be my first priority as I'm done the refactoring of our APIs. |
It seems the best solution to fix this is to use java.nio Scalafix already requires JDK 8. |
Scalafix v0.6.0-M7 is out and I suspect this bug is now fixed. To try it out, it is necessary to add the following to your build
sbt-scalafix used to add those settings automatically but not work for all builds so this manual step is now required instead. Note that the website docs are for 0.5.10. v0.6 will remain in milestone phase for about a month longer, you should not encounter a regression by upgrading unless you use ExplicitResultTypes. |
I believe the Windows-related issues have now been fixed. Our CI runs both unit tests and full integration tests for the sbt plugin scalacenter/sbt-scalafix#10 I hope to release Scalafix v0.6 stable before the end of August! |
Looking forward to the 0.6 release! |
@melezov it is already released as scalafix v0.9.0. Please give it a try and let me know how it works :) |
It works phenomenally. I can finally toss away the nux VBox which I kept around for the purpose of scalafixing. Also, it takes approx 10 minutes to run RemoveUnused while it previously took ~ 60 mins for RemoveUnusedImports on 0.5.10 - great work |
using sbt 1.1.0 on windows
scalafixSettings
scalafixConfigure(Compile, Test)
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.5.10")
The text was updated successfully, but these errors were encountered: