scalafix icon indicating copy to clipboard operation
scalafix copied to clipboard

Upstream `dependency:` syntax from sbt-scalafix to scalafix

Open bjaglin opened this issue 9 months ago • 1 comments
trafficstars

Even though docs do mention that the scalafix dependency:RULE@GROUP::ARTIFACT:VERSION syntax is only usable within sbt, it's easy to miss that. See https://github.com/scala-steward-org/scala-steward/issues/3486#issuecomment-2628649445 for example.

As more build tools support scalafix (most recently https://github.com/VirtusLab/scala-cli/pull/2968) and sbt no longer is the canonical way to run scalafix, it's a shame that this logic must be reimplemented.

Upstreaming the feature as-is is not trivial as support for fetching and loading external rules is currently handled in scalafix-interfaces, so scalafix-cli (where rule parsing happens) would have to re-run with a wider classpath somehow.

bjaglin avatar Feb 01 '25 21:02 bjaglin