Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated pieces of code #567

Merged
merged 1 commit into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 0 additions & 69 deletions api/shared/src/main/scala/play/twirl/api/TemplateMagic.scala

This file was deleted.

3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import sbtcrossproject.CrossPlugin.autoImport.crossProject
import org.scalajs.jsenv.nodejs.NodeJSEnv

// Binary compatibility is this version
val previousVersion: Option[String] = Some("1.5.0")
val previousVersion: Option[String] = Some("1.5.1")

val ScalaTestVersion = "3.2.14"

Expand All @@ -31,6 +31,7 @@ val mimaSettings = Seq(
ProblemFilters.exclude[Problem]("play.twirl.parser.*"),
ProblemFilters.exclude[MissingClassProblem]("play.twirl.compiler.*"),
ProblemFilters.exclude[IncompatibleMethTypeProblem]("play.twirl.compiler.*"),
ProblemFilters.exclude[MissingClassProblem]("play.twirl.api.TemplateMagic*"),
)
)

Expand Down
5 changes: 0 additions & 5 deletions parser/src/main/scala/play/twirl/parser/TwirlParser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1040,9 +1040,4 @@ class TwirlParser(val shouldParseInclusiveDot: Boolean) {
val a = input.regressionStatistics.toArray.sortBy { case (_, (c, _)) => c }
a.mkString("\n")
}

// TODO - only for debugging purposes, remove before release
def setSource(source: String): Unit = {
input.reset(source)
}
}
2 changes: 0 additions & 2 deletions sbt-twirl/src/main/scala/play/twirl/sbt/SbtTwirl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ object Import {
"twirl-constructor-annotations",
"Annotations added to constructors in injectable templates"
)
@deprecated("No longer supported", "1.2.0")
val useOldParser = SettingKey[Boolean]("twirl-use-old-parser", "No longer supported")
val sourceEncoding =
TaskKey[String]("twirl-source-encoding", "Source encoding for template files and generated scala files")
val compileTemplates =
Expand Down
23 changes: 0 additions & 23 deletions sbt-twirl/src/main/scala/play/twirl/sbt/TemplateCompiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,6 @@ import scala.io.Codec
import sbt.internal.inc.LoggedReporter

object TemplateCompiler {
@deprecated("Use other compile method", "1.2.0")
def compile(
sourceDirectories: Seq[File],
targetDirectory: File,
templateFormats: Map[String, String],
templateImports: Seq[String],
includeFilter: FileFilter,
excludeFilter: FileFilter,
codec: Codec,
useOldParser: Boolean,
log: Logger
): Seq[File] =
compile(
sourceDirectories,
targetDirectory,
templateFormats,
templateImports,
Nil,
includeFilter,
excludeFilter,
codec,
log
)

def compile(
sourceDirectories: Seq[File],
Expand Down