scalafmt icon indicating copy to clipboard operation
scalafmt copied to clipboard

Publish Scala 3 artifacts

Open guizmaii opened this issue 3 years ago • 1 comments

Hi,

Caliban (https://github.com/ghostdogpr/caliban) is using scalafmt-dynamic as a dependency of some of its modules and because scalafmt is not published for Scala 3 it creates issues (https://github.com/ghostdogpr/caliban/issues/1239)

Do you think it would be possible for you to publish scalafmt artifacts for Scala3?

Cheers, Jules :)

guizmaii avatar Jan 07 '22 01:01 guizmaii

@guizmaii thank you for reporting! As a workaround, it should be possible to only depend on scalafmt-interfaces and dynamically classload scalafmt-dynamic. I believe this is what the Gradle spotless integration does to avoid a direct dependency on scalafmt-dynamic. You can use coursier-interface to dynamically download scalafmt-dynamic.

I haven’t looked at what is needed to cross-compile scalafmt-dynamic with Scala 3 but it should be relatively easy since it doesn’t depend on Scalameta (which has no Scala 3 artifact)

olafurpg avatar Jan 07 '22 07:01 olafurpg