https://pantsbuild.org/ logo
m

microscopic-application-29816

12/12/2019, 11:18 PM
Hi we are using pants on a scala repo and also using the pants fmt.scalafmt target using our .scalafmt.conf however we noticed that the scalafmt cli that pants is using is locked at version 1.5.1 which does not respect many of our scalafmt conf options which is on version 2.3.2. Is there any way to override this jar dependency of the scalafmt CLI to use the latest in 2.3.2? Thanks everyone
h

happy-kitchen-89482

12/12/2019, 11:53 PM
Try adding something like this in your root-level BUILD.tools:
Copy code
jar_library(
  name='scalafmt',
  jars = [
    jar('org.scalameta', name = 'scalafmt_cli_2.11', rev='2.3.2'),
  ],
)
(Or set the coordinates appropriately, I didn't check the org and name)
m

microscopic-application-29816

12/13/2019, 12:40 AM
thanks...for anyone else the fix is like Benjy said with this one change
Copy code
jar_library(name = 'scalafmt',  jars = [    jar(org = 'org.scalameta', name = 'scalafmt-cli_{}'.format(SCALA_REV), rev = '2.3.2'),  ])
6 Views