This room is no longer active, please join the rest of the scalameta community on https://discord.gg/8AHaqGx3Qj
mlachkar on gh-pages
Deploy website Deploy website … (compare)
mlachkar on gh-pages
Deploy website Deploy website … (compare)
bjaglin on main
remote gitter shield Merge pull request #1655 from s… (compare)
bjaglin on main
Update scalafmt-core to 3.5.9 Merge pull request #1656 from s… (compare)
mlachkar on gh-pages
Deploy website Deploy website … (compare)
bjaglin on main
Fix small issues with the docs Merge pull request #1654 from s… (compare)
bjaglin on gitter2discord
remote gitter shield (compare)
mlachkar on gh-pages
Deploy website Deploy website … (compare)
bjaglin on main
Use scalameta's Discord rather … Merge pull request #1653 from b… (compare)
metaconfig.generic.Surface
will not run on Scalafix<0.9.28, which is as concerning, if not more.
NoSuchMethodError
- does https://github.com/scalameta/metaconfig/commit/df7731d981619837e88eb7c9e48913bc58f53622#diff-bb8e899325e39d9a28fc668670cf053128dd777a526390667b26fd7f83ceb047R15 get inlined? Interestingly, MiMa was added in that commit, but I guess it does not check for this kind of forward-compatibility?
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.