Skip to content

Commit

Permalink
ScalafmtReflect: lazily load obsolete class
Browse files Browse the repository at this point in the history
Also, restore that same class in the repository so older versions of the
dynamic ScalafmtReflect will continue functioning even if they won't be
using the class.
  • Loading branch information
kitbellew committed Nov 12, 2023
1 parent ffad07f commit 75669c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package org.scalafmt.config

// this class is used in older versions of scalafmt-dynamic, keep it here
object Config {}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ case class ScalafmtReflect(
private val formattedCls = loadClass("org.scalafmt.Formatted")
private val scalaSetCls = loadClass("scala.collection.immutable.Set")
private val optionCls = loadClass("scala.Option")
private val configCls = loadClass("org.scalafmt.config.Config")
private lazy val configCls = loadClass("org.scalafmt.config.Config")
private val scalafmtCls = loadClass("org.scalafmt.Scalafmt")

private val parseExceptionCls =
Expand Down

0 comments on commit 75669c3

Please sign in to comment.