From 478d57a65fa0363464769e142165078d6b0bc1b5 Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Fri, 15 Dec 2023 18:14:47 +0100 Subject: [PATCH] Make the sbt tests pass --- tests/slow/src/test/scala/tests/sbt/SbtStepDapSuite.scala | 7 ++++++- .../unit/src/main/scala/tests/debug/BaseStepDapSuite.scala | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/slow/src/test/scala/tests/sbt/SbtStepDapSuite.scala b/tests/slow/src/test/scala/tests/sbt/SbtStepDapSuite.scala index dbdc3beee47..600c3132c11 100644 --- a/tests/slow/src/test/scala/tests/sbt/SbtStepDapSuite.scala +++ b/tests/slow/src/test/scala/tests/sbt/SbtStepDapSuite.scala @@ -3,10 +3,15 @@ package tests.sbt import tests.SbtBuildLayout import tests.SbtServerInitializer import tests.debug.BaseStepDapSuite +import scala.meta.internal.metals.BuildInfo class SbtStepDapSuite extends BaseStepDapSuite( s"sbt-debug-step", SbtServerInitializer, SbtBuildLayout, - ) + ) { + + // otherwise we get both Scala 2.12 and 2.13 dependencies, whchich is more tricky for the tests + override def scalaVersion: String = BuildInfo.scala212 +} diff --git a/tests/unit/src/main/scala/tests/debug/BaseStepDapSuite.scala b/tests/unit/src/main/scala/tests/debug/BaseStepDapSuite.scala index a598c8ae062..44d897de5be 100644 --- a/tests/unit/src/main/scala/tests/debug/BaseStepDapSuite.scala +++ b/tests/unit/src/main/scala/tests/debug/BaseStepDapSuite.scala @@ -109,7 +109,7 @@ abstract class BaseStepDapSuite( .at("a/src/main/scala/Main.scala", line = 5)(StepIn) .atDependency( server.toPathFromSymbol("scala.Predef", "scala/Predef.scala"), - line = 427, + line = if (scalaVersion.startsWith("2.13")) 427 else 405, )(Continue) }, )