From dfb72d5748e82ca9a4621eb5b5090bd516ca4dad Mon Sep 17 00:00:00 2001 From: Marcus Lagergren <1062473+lagergren@users.noreply.github.com> Date: Wed, 18 Nov 2026 11:34:11 +0100 Subject: [PATCH] Declare the core library sources that two lang test tasks read LanguageModelTest and DslPowerShowcaseTest in lang/dsl, and LspIntegrationTest in lang/lsp-server, read sources under lib_ecstasy/src/main/x that their test tasks did not declare. After a change to such a source, :lang:dsl:test stayed UP-TO-DATE (checked with a comment added to Boolean.x), and its result could come back from the build cache. :lang:lsp-server:test ran again only because the compiler stamps each ecstasy.xtc with the time of the compile, which changes its compiled test modules; once the compiler's output depends only on its input, it would stay up to date as well. --- lang/dsl/build.gradle.kts | 6 ++++++ lang/lsp-server/build.gradle.kts | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/lang/dsl/build.gradle.kts b/lang/dsl/build.gradle.kts index f04ca525016..638fdd08eab 100644 --- a/lang/dsl/build.gradle.kts +++ b/lang/dsl/build.gradle.kts @@ -23,6 +23,12 @@ dependencies { tasks.test { useJUnitPlatform() + // LanguageModelTest and DslPowerShowcaseTest check the model against the core library's sources, which they find + // above the working directory: without this input, a change to those sources would not run them again. + inputs + .dir(rootDir.resolve("../lib_ecstasy/src/main/x")) + .withPropertyName("ecstasySources") + .withPathSensitivity(PathSensitivity.RELATIVE) } // ============================================================================= diff --git a/lang/lsp-server/build.gradle.kts b/lang/lsp-server/build.gradle.kts index 257fee42795..532b82280fa 100644 --- a/lang/lsp-server/build.gradle.kts +++ b/lang/lsp-server/build.gradle.kts @@ -239,6 +239,12 @@ tasks.test { dir = dir.parentFile } systemProperty("xtc.composite.root", dir.absolutePath) + // LspIntegrationTest opens sources of the core library under that root: without this input, a change to them + // would not run it again. + inputs + .dir(File(dir, "lib_ecstasy/src/main/x")) + .withPropertyName("ecstasySources") + .withPathSensitivity(PathSensitivity.RELATIVE) } tasks.jar {