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
Shade Scalameta v1 in sbt-scalafmt #1113
Comments
@alexarchambault TL;DR if |
scala-meta shoudn't rely much on reflection, so I guess that should work… There's an example of how to do that in coursier, see around here and here. Note that the |
This is one of the cases where separate classloader (e.g. the approach of https://github.com/lucidsoftware/neo-sbt-scalafmt) helps. |
That brings is own problems, the multiple classloaders are unusable on large projects because of memory. |
I am leaning towards biting the bullet and upgrade to meta v3. I already take the first steps in this direction in #1145. Shading the dependency is not a long term solution |
that's awesome news! |
Scalafmt is currently using Scalameta v1 and Scalafix uses v2. See #975 for the ticket on upgrading Scalafmt to v2. However,
As a temporary relief, we could publish sbt-scalafmt with the following packages shaded
Additionally, we may need to exclude scalapb from the scalafmt's transitive dependencies. Scalafmt doesn't use it but it's brought in transitively. This workaround would allow sbt-scalafix and sbt-scalafmt to live happily together on the same classpath without doing classloading hacks in sbt-scalafix.
The text was updated successfully, but these errors were encountered: