From b144370fb66d89747d433676cf71da9b303f0fba Mon Sep 17 00:00:00 2001 From: Tobias Roeser Date: Wed, 12 Jan 2022 09:10:07 +0100 Subject: [PATCH 1/2] Re-added but deprecated old Main entry point --- amm/src/main/scala/ammonite/Main.scala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/amm/src/main/scala/ammonite/Main.scala b/amm/src/main/scala/ammonite/Main.scala index 54728d3d0..ae36ee05c 100644 --- a/amm/src/main/scala/ammonite/Main.scala +++ b/amm/src/main/scala/ammonite/Main.scala @@ -266,3 +266,7 @@ case class Main(predefCode: String = "", } } +object Main { + @deprecated("Use ammonite.AmmoniteMain.main instead", "2.5.0") + def main(args: Array[String]): Unit = AmmoniteMain.main(args) +} From 106f9a39fd75669017b686347ca11670f276462f Mon Sep 17 00:00:00 2001 From: Tobias Roeser Date: Wed, 12 Jan 2022 09:24:51 +0100 Subject: [PATCH 2/2] Disabled acyclic locally to allow backward compatible Main.main --- amm/src/main/scala/ammonite/AmmoniteMain.scala | 3 ++- amm/src/main/scala/ammonite/Main.scala | 2 ++ amm/src/main/scala/ammonite/MainRunner.scala | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/amm/src/main/scala/ammonite/AmmoniteMain.scala b/amm/src/main/scala/ammonite/AmmoniteMain.scala index 0d44200ec..d1311ad2e 100644 --- a/amm/src/main/scala/ammonite/AmmoniteMain.scala +++ b/amm/src/main/scala/ammonite/AmmoniteMain.scala @@ -20,7 +20,8 @@ import coursierapi.Dependency import scala.concurrent.Await import scala.concurrent.duration.Duration - +// needed to support deprecated Main.main +import acyclic.skipped object AmmoniteMain{ diff --git a/amm/src/main/scala/ammonite/Main.scala b/amm/src/main/scala/ammonite/Main.scala index ae36ee05c..720cf967c 100644 --- a/amm/src/main/scala/ammonite/Main.scala +++ b/amm/src/main/scala/ammonite/Main.scala @@ -20,6 +20,8 @@ import coursierapi.Dependency import scala.concurrent.Await import scala.concurrent.duration.Duration +// needed to support deprecated Main.main +import acyclic.skipped /** diff --git a/amm/src/main/scala/ammonite/MainRunner.scala b/amm/src/main/scala/ammonite/MainRunner.scala index fac8d24a3..3f00c8d3c 100644 --- a/amm/src/main/scala/ammonite/MainRunner.scala +++ b/amm/src/main/scala/ammonite/MainRunner.scala @@ -18,6 +18,8 @@ import scala.annotation.tailrec import scala.concurrent.Await import scala.concurrent.duration.Duration +// needed to support deprecated Main.main +import acyclic.skipped /** * Bundles together: