From f097a12f7e5fa88087042f8df3f6f4522173b4ba Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Tue, 25 Nov 2025 23:06:46 -0500 Subject: [PATCH] fix: Fixes JLine history **Problem** JLine history disappears if we change the Scala version. **Solution** Put it back into a non-crossed path. --- main/src/main/scala/sbt/Defaults.scala | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index 87ee441c4..da087764f 100644 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -544,12 +544,7 @@ object Defaults extends BuildCommon { def paths: Seq[Setting[?]] = Seq( baseDirectory := thisProject.value.base, target := rootOutputDirectory.value.resolve(outputPath.value).toFile(), - // Use a different history path for jline3 because the jline2 format is - // incompatible. By sbt 1.4.0, we should consider revering this to t / ".history" - // and possibly rewriting the jline2 history in a jline3 compatible format if the - // history file is incompatible. For now, just use a different file to facilitate - // going back and forth between 1.3.x and 1.4.x. - historyPath := (historyPath or target(t => Option(t / ".history3"))).value, + historyPath := (historyPath or rootOutputDirectory(t => Option(t.toFile() / ".history"))).value, sourceDirectory := baseDirectory.value / "src", sourceManaged := target.value / "src_managed", resourceManaged := target.value / "resource_managed",