Open ckipp01 opened 2 years ago
Actually hold on. Running this will mill foo.fix
doesn't actually apply the patch, but running it with Metals does. I wonder why there is a difference there. This might be something funky going on with Metals.
Thanks for reporting!
I guess there is something fishy in https://github.com/scalacenter/scalafix/blob/449a06a03d2595a1ec6f44201353881b3edc4aee/scalafix-rules/src/main/scala-2/scalafix/internal/rule/CompilerTypePrinter.scala#L299-L389
I wonder why there is a difference there. This might be something funky going on with Metals.
Probably related to https://github.com/scalacenter/scalafix/issues/1534?
Actually hold on. Running this will
mill foo.fix
doesn't actually apply the patch, but running it with Metals does. I wonder why there is a difference there. This might be something funky going on with Metals.
This might be an issue with mill-scalafix: https://github.com/joan38/mill-scalafix/issues/174
I encountered this when writing a Mill plugin. When creating an
ExternalModule
you'll have code that looks like this:If you run scalafix against this wanting
ExplicitResultTypes
you'll end up with broken code since the finallazy vall millDiscover
will turn into:Which will error with:
I'd expect running this rule not to break my code.
You can reproduce this with the Scala file up above placed in a
foo/src/Example.scala
and the following files:Then you can either run them ~via Mill or~ Metals.