From 6c4261680bb95c88c9dcf681a1e4eef1c3d82cc9 Mon Sep 17 00:00:00 2001 From: Lorenzo Gabriele Date: Sat, 5 Oct 2024 17:35:37 +0200 Subject: [PATCH] Fix `semanticDbData` for mill-build (#3673) When we override `scalacPluginClasspath` we need to remeber to also override `semanticDbPluginClasspath` Fixes #3666 Pull Request: https://github.com/com-lihaoyi/mill/pull/3673 --- .../plugin-classpath/src/MillPluginClasspathTest.scala | 7 +++++++ runner/src/mill/runner/MillBuildRootModule.scala | 3 +++ 2 files changed, 10 insertions(+) diff --git a/integration/feature/plugin-classpath/src/MillPluginClasspathTest.scala b/integration/feature/plugin-classpath/src/MillPluginClasspathTest.scala index e6589c451a3..84a236bc4e8 100644 --- a/integration/feature/plugin-classpath/src/MillPluginClasspathTest.scala +++ b/integration/feature/plugin-classpath/src/MillPluginClasspathTest.scala @@ -69,6 +69,13 @@ object MillPluginClasspathTest extends UtestIntegrationTestSuite { )) } } + test("semanticDbData") - integrationTest { tester => + import tester._ + retry(3) { + val res1 = eval(("--meta-level", "1", "semanticDbData")) + assert(res1.isSuccess) + } + } } } diff --git a/runner/src/mill/runner/MillBuildRootModule.scala b/runner/src/mill/runner/MillBuildRootModule.scala index 672953fe708..10ae284a0af 100644 --- a/runner/src/mill/runner/MillBuildRootModule.scala +++ b/runner/src/mill/runner/MillBuildRootModule.scala @@ -253,6 +253,9 @@ abstract class MillBuildRootModule()(implicit override def scalacPluginClasspath: T[Agg[PathRef]] = super.scalacPluginClasspath() ++ lineNumberPluginClasspath() + override protected def semanticDbPluginClasspath: T[Agg[PathRef]] = + super.semanticDbPluginClasspath() ++ lineNumberPluginClasspath() + def lineNumberPluginClasspath: T[Agg[PathRef]] = Task { millProjectModule("mill-runner-linenumbers", repositoriesTask()) }