From c466f2f101bac473fa109e61279f402332e0e2ff Mon Sep 17 00:00:00 2001 From: Jamie Thompson Date: Fri, 11 Oct 2024 13:50:57 +0200 Subject: [PATCH] fix integration.feature[bsp-server] tests --- .../snapshots/workspace-build-targets.json | 21 +++++++++++++------ .../ide/bsp-server/src/BspServerTests.scala | 21 ++++++++++++++----- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/integration/ide/bsp-server/resources/snapshots/workspace-build-targets.json b/integration/ide/bsp-server/resources/snapshots/workspace-build-targets.json index 41a59014648..9cfdb9390d2 100644 --- a/integration/ide/bsp-server/resources/snapshots/workspace-build-targets.json +++ b/integration/ide/bsp-server/resources/snapshots/workspace-build-targets.json @@ -118,13 +118,22 @@ "dataKind": "scala", "data": { "scalaOrganization": "org.scala-lang", - "scalaVersion": "", - "scalaBinaryVersion": "2.13", + "scalaVersion": "", + "scalaBinaryVersion": "3", "platform": 1, "jars": [ - "file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/scala-compiler//scala-compiler-.jar", - "file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/scala-reflect//scala-reflect-.jar", - "file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/scala-library//scala-library-.jar" + "file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3//scala3-compiler_3-.jar", + "file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/scala3-library_3//scala3-library_3-.jar", + "file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/scala3-interfaces//scala3-interfaces-.jar", + "file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/tasty-core_3//tasty-core_3-.jar", + "file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-asm//scala-asm-.jar", + "file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-sbt/compiler-interface//compiler-interface-.jar", + "file:///coursier-cache/https/repo1.maven.org/maven2/org/jline/jline-reader//jline-reader-.jar", + "file:///coursier-cache/https/repo1.maven.org/maven2/org/jline/jline-terminal//jline-terminal-.jar", + "file:///coursier-cache/https/repo1.maven.org/maven2/org/jline/jline-terminal-jna//jline-terminal-jna-.jar", + "file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/scala-library//scala-library-.jar", + "file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-sbt/util-interface//util-interface-.jar", + "file:///coursier-cache/https/repo1.maven.org/maven2/org/jline/jline-native//jline-native-.jar" ], "jvmBuildTarget": { "javaHome": "file:///java-home/", @@ -151,4 +160,4 @@ } } ] -} \ No newline at end of file +} diff --git a/integration/ide/bsp-server/src/BspServerTests.scala b/integration/ide/bsp-server/src/BspServerTests.scala index ead165ffecc..b280a16eb7e 100644 --- a/integration/ide/bsp-server/src/BspServerTests.scala +++ b/integration/ide/bsp-server/src/BspServerTests.scala @@ -50,12 +50,21 @@ object BspServerTests extends UtestIntegrationTestSuite { workspacePath, millTestSuiteEnv ) { (buildServer, initRes) => - val scalaVersion = sys.props.getOrElse("TEST_SCALA_2_13_VERSION", ???) - val scalaTransitiveSubstitutions = transitiveDependenciesSubstitutions( + val scala2Version = sys.props.getOrElse("TEST_SCALA_2_13_VERSION", ???) + val scala3Version = sys.props.getOrElse("MILL_SCALA_3_NEXT_VERSION", ???) + val scala2TransitiveSubstitutions = transitiveDependenciesSubstitutions( coursierapi.Dependency.of( "org.scala-lang", "scala-compiler", - scalaVersion + scala2Version + ), + _.getModule.getOrganization != "org.scala-lang" + ) + val scala3TransitiveSubstitutions = transitiveDependenciesSubstitutions( + coursierapi.Dependency.of( + "org.scala-lang", + "scala3-compiler_3", + scala3Version ), _.getModule.getOrganization != "org.scala-lang" ) @@ -71,10 +80,12 @@ object BspServerTests extends UtestIntegrationTestSuite { ) val normalizedLocalValues = normalizeLocalValuesForTesting(workspacePath) ++ - scalaTransitiveSubstitutions ++ + scala2TransitiveSubstitutions ++ + scala3TransitiveSubstitutions ++ kotlinTransitiveSubstitutions ++ Seq( - scalaVersion -> "", + scala2Version -> "", + scala3Version -> "", kotlinVersion -> "" )