mlachkar on gh-pages
Deploy website Deploy website … (compare)
bjaglin on main
Update scalameta, semanticdb-sc… Merge pull request #1605 from s… (compare)
mlachkar on gh-pages
Deploy website Deploy website … (compare)
bjaglin on main
Update scalameta, semanticdb-sc… Merge pull request #1604 from s… (compare)
classAnnotations
is empty? it looks like a quick fix.
metaconfig.generic.Surface
was already loaded by the scalafix-cli classloader (with an old version) to parse the configuration, so the one in the --toolclasspath
(newer, required by the classloaded community rule) is effectively ignored. Assuming security is not a concern here, we could let toolclasspath evict dependencies from the internal classpath when using the high-level withToolClasspath
overloads using coursier coordinates? Some IDE/build-tool integrations might lag behind community rules (see https://github.com/evis/scalafix-maven-plugin/commits/master for example). Related note: https://github.com/scalacenter/scalafix/commit/3694af653dde8c6c05a2af5051540a3f7f7870a6#diff-26de4adbd0ac932a910d1ec9c7b8a8784e07dc15a96313961a927194d96eef00R57-R61.
Although it's unfortunate so much investment is needed to work around this bincompat issue
macros make harder a problem already hard enough :)
scalafix.v1.*
(or something like that) with the scalafix-cli classloader. But after looking at the code, I realized some scalameta/metaconfig types are exposed through scalafix.v1.*
, so that lack of clear boundaries makes it impossible to get both sandboxing AND class unicity across classloaders.
.sbt
files? I wanted to apply https://github.com/liancheng/scalafix-organize-imports on these files as well.
Thanks @olafurpg , I understand that it might be a bit of a strange thing to want to do. A simplified example of what I'm trying to do is something similar to this-
trait Level {
def level = 1
}
class Example extends Level
Rewrite as-
class Example {
def level = 1
}
To do this, I would need to have access to the AST for Level
and Level
could be defined in another file. If Level
was defined in a dependency, all bets are off and I would not be able to get the AST.
Rule.afterComplete()
https://github.com/scalacenter/scalafix/blob/1c0ba35cc71f28551f98ea607d47f4db7147d802/scalafix-core/src/main/scala/scalafix/v1/Rule.scala#L46
ExplicitResultTypes
has logic like that but you can look at the implementation to see that it's not that trivial to do correctly
OrganizeImports
external rule? i got scalafix the same way we do with scalafmt (via coursier standalone bootstrap). ideally, the external jar is also downloaded in advance as build servers are behind firewall and might not be able to.
error: The ExplicitResultTypes rule needs to run with the same Scala binary version as the one used to compile target sources (2.13). To fix this problem, either remove ExplicitResultTypes from .scalafix.conf or make sure the scalafixScalaBinaryVersion setting key matches 2.13.
, But I'm using scala 2.13.4. I tried to upgrade to 2.13.6, even downgrade to 2.13.0, but it still not working.