From 560d8519038f3d9281098a36e9273aad8288b0db Mon Sep 17 00:00:00 2001 From: Albert Meltzer Date: Tue, 9 Nov 2021 16:27:59 -0800 Subject: [PATCH] Dependency: update scalafmt-dynamic to 3.1.1 This new version requires an explicit version and fails on usage of `.withRespectVersion(false)`. --- build.sbt | 2 +- plugin/src/main/scala/org/scalafmt/sbt/ScalafmtPlugin.scala | 1 - plugin/src/sbt-test/scalafmt-sbt/sbt/.scalafmt12.conf | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index e8ad0b8..0123e40 100644 --- a/build.sbt +++ b/build.sbt @@ -39,7 +39,7 @@ lazy val plugin = project .settings( moduleName := "sbt-scalafmt", libraryDependencies ++= List( - "org.scalameta" %% "scalafmt-dynamic" % "3.0.8" + "org.scalameta" %% "scalafmt-dynamic" % "3.1.1" ), scriptedBufferLog := false, scriptedLaunchOpts += s"-Dplugin.version=${version.value}" diff --git a/plugin/src/main/scala/org/scalafmt/sbt/ScalafmtPlugin.scala b/plugin/src/main/scala/org/scalafmt/sbt/ScalafmtPlugin.scala index 6d38d94..c2b89bb 100644 --- a/plugin/src/main/scala/org/scalafmt/sbt/ScalafmtPlugin.scala +++ b/plugin/src/main/scala/org/scalafmt/sbt/ScalafmtPlugin.scala @@ -118,7 +118,6 @@ object ScalafmtPlugin extends AutoPlugin { globalInstance .withReporter(reporter) .withMavenRepositories(repositories: _*) - .withRespectVersion(false) .withRespectProjectFilters(true) match { case t: ScalafmtSessionFactory => val session = t.createSession(config.toAbsolutePath) diff --git a/plugin/src/sbt-test/scalafmt-sbt/sbt/.scalafmt12.conf b/plugin/src/sbt-test/scalafmt-sbt/sbt/.scalafmt12.conf index 84f1365..25c7cce 100644 --- a/plugin/src/sbt-test/scalafmt-sbt/sbt/.scalafmt12.conf +++ b/plugin/src/sbt-test/scalafmt-sbt/sbt/.scalafmt12.conf @@ -1 +1,3 @@ +version = 3.1.0 +runner.dialect = scala213 style = IntelliJ