Repository navigation
Export each source set's build-tree path and xtcRun's and xtcTest's settings in the IDE's Gradle model - #813
Merged
Conversation
…DE's Gradle model The editors run a module in Gradle mode with a bare runXtc or testXtc at the workspace's root, which reaches no included build: in the XVM repository, whose root only aggregates its included builds, every Gradle-mode Run, Debug and test of an XDK module fails with "Task 'testXtc' not found in root project 'xvm'". The task's full path, :xdk:lib-json:testXtc, resolves with its options. The model's source-set entries now record buildTreePath, the project's path in the whole build tree, from Project.getBuildTreePath(): :xdk:lib-json for json in the XVM repository, and the project's own path in a build of its own. The import's init script already merges every included build's entries into the root's model, so the field reaches a composite's root with nothing else changed. Readers that do not know the field ignore it. Validated: this PR's branch at its tip, on master 4350e40: RUN_INTEGRATION_TESTS=true ./gradlew :plugin:validatePlugins :plugin:test :plugin:javadoc spotlessCheck, from fresh JUnit XML: 79 tests in 15 classes, 0 failures, 0 skipped, XtcLspModelTest 5 of 5. And the editors' import of manualTests, the fake consumer build: ./gradlew --init-script lang/gradle/compiler-model.init.gradle :manualTests:exportEcstasyWorkspaceModel, BUILD SUCCESSFUL with no runXtc, testXtc or compile task run; both of its source sets' entries have buildTreePath :manualTests, run.jvmArgs [-ea, --enable-native-access=ALL-UNNAMED, -showversion, --enable-preview], run.modules EchoTest (run, [Hello, World]), test.jvmArgs [-ea, --enable-native-access=ALL-UNNAMED] and no problems.
…ver's Gradle model
Embedded runs never read the project's Gradle run settings, so a
program could run differently embedded than with ./gradlew runXtc. This is the plugin's part: the model
that an editor's import writes (.gradle/xtc/lsp-model.json, and lsp-workspace.json through
compiler-model.init.gradle) now carries them, in each source set's entry:
- "run": "jvmArgs", the JVM options of the project's xtcRun; "modules", by module name, the
"methodName" and "moduleArgs" that it runs each module it names with; and "problems", what of it the
export could not read.
- "test": "jvmArgs", the JVM options of the project's xtcTest, and "problems".
The export reads the extensions, which runXtc and testXtc take their defaults from, and neither
realizes nor runs the tasks: a task's configuration block, however slow or failing, cannot affect an
import, as before. Settings made only on a task, tasks.runXtc { ... }, are therefore not seen.
The export never fails because of these settings (XtcLspRunSettings, read through project.provider
once the build is configured): a value that cannot be read, as a moduleArg from a Gradle property that
is not set, or a provider that throws, is left out, the module with it, and "problems" says what and
why, for the server to log and a run of the module to say. A module without a name, or a blank one, is
no module; a blank method is the default run. Where xtcRun names a module more than once, the first
time decides. XtcLspSourceSetTask takes the values as plain inputs (two MapProperty, four ListProperty),
so the configuration cache stores them. Every source set of a project has the same settings; a reader applies them to
the modules each one owns. The language server reads them in a later change; until then, nothing reads
the new fields, and readers that do not know them ignore them.
Not exported: xtcRun's modulePath, jit, verbose, showVersion, output paths, execution mode and debug
options, and the compile settings. The init script's aggregation passes the fields through unchanged.
Validated: this PR's branch at its tip, on master 4350e40: RUN_INTEGRATION_TESTS=true ./gradlew
:plugin:validatePlugins :plugin:test :plugin:javadoc spotlessCheck, from fresh JUnit XML: 79 tests in 15 classes,
0 failures, 0 skipped, XtcLspModelTest 5 of 5. And the editors' import of manualTests, the fake consumer build:
./gradlew --init-script lang/gradle/compiler-model.init.gradle :manualTests:exportEcstasyWorkspaceModel, BUILD
SUCCESSFUL with no runXtc, testXtc or compile task run; both of its source sets' entries have buildTreePath
:manualTests, run.jvmArgs [-ea, --enable-native-access=ALL-UNNAMED, -showversion, --enable-preview], run.modules
EchoTest (run, [Hello, World]), test.jvmArgs [-ea, --enable-native-access=ALL-UNNAMED] and no problems.
…at jvmArgs holds only the build script's Since #804, a launcher's jvmArgs hold only the build script's arguments; -ea (enableAssertions) and the plugin's own options, such as --enable-native-access=ALL-UNNAMED, go to the launched JVM apart from them. The Gradle model exported jvmArgs as the JVM options of xtcRun's and xtcTest's JVMs, so a reader running a module with them would run it without -ea and the plugin's options, where runXtc runs with them. The model now exports what the launched JVM gets, XtcLauncherDefaults.allJvmArgs of enableAssertions and jvmArgs, read as defensively as the rest: enableAssertions that cannot be read is named in problems and taken as the build's default; jvmArgs that cannot be read are left out, as before. Validated: this PR's branch at its tip, on master 4350e40: RUN_INTEGRATION_TESTS=true ./gradlew :plugin:validatePlugins :plugin:test :plugin:javadoc spotlessCheck, from fresh JUnit XML: 79 tests in 15 classes, 0 failures, 0 skipped, XtcLspModelTest 5 of 5. And the editors' import of manualTests, the fake consumer build: ./gradlew --init-script lang/gradle/compiler-model.init.gradle :manualTests:exportEcstasyWorkspaceModel, BUILD SUCCESSFUL with no runXtc, testXtc or compile task run; both of its source sets' entries have buildTreePath :manualTests, run.jvmArgs [-ea, --enable-native-access=ALL-UNNAMED, -showversion, --enable-preview], run.modules EchoTest (run, [Hello, World]), test.jvmArgs [-ea, --enable-native-access=ALL-UNNAMED] and no problems.
lagergren
added a commit
that referenced
this pull request
Nov 27, 2026
…uns, and record master PRs #811, #812 and #813 squash-693.md places 612 in P12's container group, and records the three PRs opened on master from #693's commits outside lang/, which each take their commits out of #693 when they merge: #811, a hasher map's spare key per thread (196) with 194's test fixtures (Await and Watchdog; 194's edits of #693's own tests stay); #812, Future callbacks and service shutdowns reported and completed (170, 198), on #811's branch; #813, the Gradle model's build-tree paths and run settings (407, 465, 470). The roadmap follows. Validated: the appendix runs 1-612 with #693's hashes, and all 790 number-hash references agree with it.
…whole: to a temporary file moved into place XtcLspModelTask writes .gradle/xtc/lsp-model.json through a temporary file in its directory that it then moves into place, so that a reader never finds it part written. The reports it reads, each source set's build/xtc/lsp/<sourceSet>.json from XtcLspSourceSetTask, were written in place. Two builds exporting one project at once, as IntelliJ's and VS Code's imports of the same folder, could then have one build's model task read the other's report part written, and that import fail. Both tasks now write through XtcLspModelTask.writeAtomically, the model task's own write, shared. Validated: on this PR's branch over master 4350e40, RUN_INTEGRATION_TESTS=true ./gradlew :plugin:validatePlugins :plugin:test :plugin:javadoc spotlessCheck, from fresh JUnit XML: 80 tests, 0 failures, 0 skipped. The new XtcLspModelTest.exportsReplaceTheirReportsWholeInsteadOfRewritingThemInPlace exports a project twice, a source file added between, and checks that both the report and the model are other files the second time (their file keys, the inode where the file system has one) and that no temporary file is left; against the in-place write it fails, "the source set's report is replaced whole". The editors' import of manualTests through lang/gradle/compiler-model.init.gradle passes, with no temporary file left. Limits: where a file system has no file keys, the test is skipped; where it cannot move atomically, the write falls back to a plain replacing move, as the model's always did.
lagergren
added a commit
that referenced
this pull request
Nov 27, 2026
…whole: to a temporary file moved into place XtcLspModelTask writes .gradle/xtc/lsp-model.json through a temporary file in its directory that it then moves into place, so that a reader never finds it part written. The reports it reads, each source set's build/xtc/lsp/<sourceSet>.json from XtcLspSourceSetTask, were written in place. Two builds exporting one project at once, as IntelliJ's and VS Code's imports of the same folder, could then have one build's model task read the other's report part written, and that import fail. Both tasks now write through XtcLspModelTask.writeAtomically, the model task's own write, shared. Validated: on master PR #813's branch over master 4350e40, RUN_INTEGRATION_TESTS=true ./gradlew :plugin:validatePlugins :plugin:test :plugin:javadoc spotlessCheck, from fresh JUnit XML: 80 tests, 0 failures, 0 skipped. The new XtcLspModelTest.exportsReplaceTheirReportsWholeInsteadOfRewritingThemInPlace exports a project twice, a source file added between, and checks that both the report and the model are other files the second time (their file keys, the inode where the file system has one) and that no temporary file is left; against the in-place write it fails, "the source set's report is replaced whole". The editors' import of manualTests through lang/gradle/compiler-model.init.gradle passes, with no temporary file left. On errs, the same gate: 85 plugin tests, 0 failures, 0 skipped. Limits: where a file system has no file keys, the test is skipped; where it cannot move atomically, the write falls back to a plain replacing move, as the model's always did.
lagergren
added a commit
that referenced
this pull request
Nov 27, 2026
…whole: to a temporary file moved into place XtcLspModelTask writes .gradle/xtc/lsp-model.json through a temporary file in its directory that it then moves into place, so that a reader never finds it part written. The reports it reads, each source set's build/xtc/lsp/<sourceSet>.json from XtcLspSourceSetTask, were written in place. Two builds exporting one project at once, as IntelliJ's and VS Code's imports of the same folder, could then have one build's model task read the other's report part written, and that import fail. Both tasks now write through XtcLspModelTask.writeAtomically, the model task's own write, shared. Validated: on master PR #813's branch over master 4350e40, RUN_INTEGRATION_TESTS=true ./gradlew :plugin:validatePlugins :plugin:test :plugin:javadoc spotlessCheck, from fresh JUnit XML: 80 tests, 0 failures, 0 skipped. The new XtcLspModelTest.exportsReplaceTheirReportsWholeInsteadOfRewritingThemInPlace exports a project twice, a source file added between, and checks that both the report and the model are other files the second time (their file keys, the inode where the file system has one) and that no temporary file is left; against the in-place write it fails, "the source set's report is replaced whole". The editors' import of manualTests through lang/gradle/compiler-model.init.gradle passes, with no temporary file left. On errs, the same gate: 85 plugin tests, 0 failures, 0 skipped. Limits: where a file system has no file keys, the test is skipped; where it cannot move atomically, the write falls back to a plain replacing move, as the model's always did.
ggleyzer
approved these changes
Nov 27, 2026
lagergren
added a commit
that referenced
this pull request
Nov 27, 2026
…uns, and record master PRs #811, #812 and #813 squash-693.md places 612 in P12's container group, and records the three PRs opened on master from #693's commits outside lang/, which each take their commits out of #693 when they merge: #811, a hasher map's spare key per thread (196) with 194's test fixtures (Await and Watchdog; 194's edits of #693's own tests stay); #812, Future callbacks and service shutdowns reported and completed (170, 198), on #811's branch; #813, the Gradle model's build-tree paths and run settings (407, 465, 470). The roadmap follows. Validated: the appendix runs 1-612 with #693's hashes, and all 790 number-hash references agree with it.
lagergren
added a commit
that referenced
this pull request
Nov 27, 2026
…rged: 643 commits, #813's four dropped #813 (the Gradle model's build-tree paths and run settings, and its reports written whole) merged to master as ede5667, and errs and #693 were rebased onto it without its four commits, 407, 465, 470 and 613 (errs' 1fc3e5e, 1a19ceb, 298026b and d4cfbb8), whose combined change is ede5667's byte for byte. The plan follows: the appendix runs 1-643 with #693's new hashes, every number-hash reference is renumbered and rehashed, the group "The Gradle model: each source set's project path, xtcRun's and xtcTest's settings" (only those four) is gone, P9 and X4 lose four commits, one group and their 166 main and 186 test lines added, #802's commits are now 458, 499 and 521, and #813 joins the merged PRs in the header and the note on open ones. The roadmap names the new head and master. Validated: the four commits applied to the old base 4350e40 give exactly ede5667's five files; after the rebase, #693's tree (5029fdc) and errs' tree are identical to their backed-up tips (backup/20261127-1930/...); the appendix runs 1-643 in #693's order with its hashes, all 836 number-hash references agree with it, and the topic and pull request counts match it.
lagergren
added a commit
that referenced
this pull request
Nov 28, 2026
…ncludes it, as its imported model says In VS Code, Run, Build, Debug and the Gradle test runs of a folder go where gradleRoot says (c76f19d): the nearest directory at or above the folder that has the Gradle wrapper or a build's settings. A folder that is an included build without a wrapper of its own stops at its own settings, where ./gradlew is not, and its runs ended with exit code 127. Nor is its root the root of the build tree that its modules' projects are named in: from there a task such as :included:app:runXtc, which the server's project paths give, would not have been found either. gradleBuild (gradle-root.ts) reads each workspace folder's imported Gradle model, as its report has it (.gradle/xtc/lsp-workspace.json or lsp-model.json). A source set's projectId names its build's root, and its buildTreePath, which the XTC plugin exports since #813, its project's path in the build tree; a build whose projects' buildTreePath is not their projectPath, as :included:app for :app, is an included build. A folder whose nearest such build is an included one runs its Gradle tasks at the root of the build that includes it: the first build root of a model that lists the included build among its build roots, as the init script's EcstasyWorkspaceModel puts the build it ran in first, and that is not itself an included build; without such a model, as in a window that has the included build alone, whose own report names no build above it, the included build's own root if it has a wrapper of its own, as its report may be left over from a build that no longer includes it, else the nearest directory above it that has the wrapper. The paths in the build tree of the included build's projects come with it, from the model of the including build's import where there is one, and only paths in a build tree, not a project's path in its build alone, as a left-over report of a run of the build on its own has; a root project's task is `:build`, as gradle-projects' taskOf has it. Without a model, with a model of an older plugin, which has no buildTreePath, or for a build that is no included one, the directory walk is as it was. Run, Debug and the Gradle test runs already address a module's task by its project's path in the build tree, which the server says (xtc/gradleProjects), so they needed only the directory. Build and Rebuild (xtc.build, xtc.rebuild) and the task provider's folder tasks ran ./gradlew build and clean, which from the including build's root build that build: for an included build they now name its projects' tasks, as ./gradlew :included:build :included:app:build. Ecstasy: Build and Rebuild in Gradle mode run the task that the folder's own Build is (gradleBuildTask, task-provider.ts), and the provider's tasks of each folder come from folderTasks, which takes the folder's build. The provider's Build, Test and Clean, which ran in their folder whatever its build, run where gradleBuild says, as Run and Build have since c76f19d, so a folder that is a project inside another folder's build reaches its wrapper there too; Test keeps its tasks, the testXtc of every module's project by its path in the build tree. realPath (embedded-execution.ts) is exported for it, as Gradle's directories are canonical, as /private/var for macOS's /var. The README's Building and running says where a folder's Gradle tasks run. Tests (run-task.test.ts), on folders of a temporary directory, with models as an import writes them: an included build in the including build's directory, and one beside it, run at the including build's root, Build's and Rebuild's tasks addressed to their projects; the including build and a project of it are no included builds; with the included builds' own models alone, the nearest wrapper above, and for the one beside, which has none above it, its own root, as without a model; an older plugin's model says nothing; a left-over report of a run of the build on its own adds no project, and a root project's task is `:build`; with a wrapper of its own and no model that says another build includes it, the build runs on its own, while a model that says outer includes it still runs it from outer. And the folder's tasks: Build and Rebuild, which Ecstasy: Build and Rebuild run, and the provider's Test and Clean run at the including build's root, Build's, Rebuild's and Clean's addressed to the included build's projects, and a folder without a Gradle build has no Gradle tasks. Validated, with the series uncommitted on errs at a28850e, as it is committed here: - :lang:vscode-extension:npmCompile; tsc and eslint (node_modules/.bin/eslint src/) on each commit's tree: no findings. :lang:spotlessCheck: no findings. - In the container: the extension suite, :lang:vscode-extension:testVscodeExtension, 116 passing, 0 failing, the new tests among them (extension-tests/run-BTd6kh). The VS Code playbook, X288, X289, X290, X303 and X361–X366: 10 of 10 passed in run-aAfbLu and run-FVJvz1, the harness's 28 tests first in each. Before an independent review's fixes (an included build's projects from the including build's model alone, and its own wrapper where no model says another build includes it; the shared Build task and the provider's tasks tested; Run Module's folder found among the folders it is given; the notice's folders forgotten as they leave the window; X366's terminals cleared before its Run): the suite 115 passing (run-C7Nzb3), and with X132, X138, X139, X249 and X250, 15 of 15 in run-0vZUGt and run-q8bKjn. Limits: - Without an imported model nothing says that a build is an included one, and such a folder runs at its own root as before. VS Code imports only a folder with a wrapper of its own (refreshCompilerBuild), so the model of a folder without one comes from the including build's import, in this window or elsewhere. - An included build beside the including build, not under it, in a window without the including build's folder: no model names the including build's root, and no wrapper is above it, so it runs at its own root. - A model whose own build has no Ecstasy projects, as an aggregating root's, is taken for the build its import ran in; an included build without Ecstasy projects of its own that includes others would be taken for that too. - Build of an included build builds the projects that the model names, its Ecstasy projects, not its other ones. - An included build with a wrapper of its own that no model says another build includes runs on its own: its Build and Clean work there, while a run of one of its modules names its project by the path in the build tree that its left-over report gives, which Gradle there does not find.
lagergren
added a commit
that referenced
this pull request
Nov 28, 2026
…ncludes it, as its imported model says In VS Code, Run, Build, Debug and the Gradle test runs of a folder go where gradleRoot says (c76f19d): the nearest directory at or above the folder that has the Gradle wrapper or a build's settings. A folder that is an included build without a wrapper of its own stops at its own settings, where ./gradlew is not, and its runs ended with exit code 127. Nor is its root the root of the build tree that its modules' projects are named in: from there a task such as :included:app:runXtc, which the server's project paths give, would not have been found either. gradleBuild (gradle-root.ts) reads each workspace folder's imported Gradle model, as its report has it (.gradle/xtc/lsp-workspace.json or lsp-model.json). A source set's projectId names its build's root, and its buildTreePath, which the XTC plugin exports since #813, its project's path in the build tree; a build whose projects' buildTreePath is not their projectPath, as :included:app for :app, is an included build. A folder whose nearest such build is an included one runs its Gradle tasks at the root of the build that includes it: the first build root of a model that lists the included build among its build roots, as the init script's EcstasyWorkspaceModel puts the build it ran in first, and that is not itself an included build; without such a model, as in a window that has the included build alone, whose own report names no build above it, the included build's own root if it has a wrapper of its own, as its report may be left over from a build that no longer includes it, else the nearest directory above it that has the wrapper. The paths in the build tree of the included build's projects come with it, from the model of the including build's import where there is one, and only paths in a build tree, not a project's path in its build alone, as a left-over report of a run of the build on its own has; a root project's task is `:build`, as gradle-projects' taskOf has it. Without a model, with a model of an older plugin, which has no buildTreePath, or for a build that is no included one, the directory walk is as it was. Run, Debug and the Gradle test runs already address a module's task by its project's path in the build tree, which the server says (xtc/gradleProjects), so they needed only the directory. Build and Rebuild (xtc.build, xtc.rebuild) and the task provider's folder tasks ran ./gradlew build and clean, which from the including build's root build that build: for an included build they now name its projects' tasks, as ./gradlew :included:build :included:app:build. Ecstasy: Build and Rebuild in Gradle mode run the task that the folder's own Build is (gradleBuildTask, task-provider.ts), and the provider's tasks of each folder come from folderTasks, which takes the folder's build. The provider's Build, Test and Clean, which ran in their folder whatever its build, run where gradleBuild says, as Run and Build have since c76f19d, so a folder that is a project inside another folder's build reaches its wrapper there too; Test keeps its tasks, the testXtc of every module's project by its path in the build tree. realPath (embedded-execution.ts) is exported for it, as Gradle's directories are canonical, as /private/var for macOS's /var. The README's Building and running says where a folder's Gradle tasks run. Tests (run-task.test.ts), on folders of a temporary directory, with models as an import writes them: an included build in the including build's directory, and one beside it, run at the including build's root, Build's and Rebuild's tasks addressed to their projects; the including build and a project of it are no included builds; with the included builds' own models alone, the nearest wrapper above, and for the one beside, which has none above it, its own root, as without a model; an older plugin's model says nothing; a left-over report of a run of the build on its own adds no project, and a root project's task is `:build`; with a wrapper of its own and no model that says another build includes it, the build runs on its own, while a model that says outer includes it still runs it from outer. And the folder's tasks: Build and Rebuild, which Ecstasy: Build and Rebuild run, and the provider's Test and Clean run at the including build's root, Build's, Rebuild's and Clean's addressed to the included build's projects, and a folder without a Gradle build has no Gradle tasks. Validated, with the series uncommitted on errs at a28850e, as it is committed here: - :lang:vscode-extension:npmCompile; tsc and eslint (node_modules/.bin/eslint src/) on each commit's tree: no findings. :lang:spotlessCheck: no findings. - In the container: the extension suite, :lang:vscode-extension:testVscodeExtension, 116 passing, 0 failing, the new tests among them (extension-tests/run-BTd6kh). The VS Code playbook, X288, X289, X290, X303 and X361–X366: 10 of 10 passed in run-aAfbLu and run-FVJvz1, the harness's 28 tests first in each. Before an independent review's fixes (an included build's projects from the including build's model alone, and its own wrapper where no model says another build includes it; the shared Build task and the provider's tasks tested; Run Module's folder found among the folders it is given; the notice's folders forgotten as they leave the window; X366's terminals cleared before its Run): the suite 115 passing (run-C7Nzb3), and with X132, X138, X139, X249 and X250, 15 of 15 in run-0vZUGt and run-q8bKjn. Limits: - Without an imported model nothing says that a build is an included one, and such a folder runs at its own root as before. VS Code imports only a folder with a wrapper of its own (refreshCompilerBuild), so the model of a folder without one comes from the including build's import, in this window or elsewhere. - An included build beside the including build, not under it, in a window without the including build's folder: no model names the including build's root, and no wrapper is above it, so it runs at its own root. - A model whose own build has no Ecstasy projects, as an aggregating root's, is taken for the build its import ran in; an included build without Ecstasy projects of its own that includes others would be taken for that too. - Build of an included build builds the projects that the model names, its Ecstasy projects, not its other ones. - An included build with a wrapper of its own that no model says another build includes runs on its own: its Build and Clean work there, while a run of one of its modules names its project by the path in the build tree that its left-over report gives, which Gradle there does not find.
lagergren
added a commit
that referenced
this pull request
Nov 28, 2026
…ncludes it, as its imported model says In VS Code, Run, Build, Debug and the Gradle test runs of a folder go where gradleRoot says (c76f19d): the nearest directory at or above the folder that has the Gradle wrapper or a build's settings. A folder that is an included build without a wrapper of its own stops at its own settings, where ./gradlew is not, and its runs ended with exit code 127. Nor is its root the root of the build tree that its modules' projects are named in: from there a task such as :included:app:runXtc, which the server's project paths give, would not have been found either. gradleBuild (gradle-root.ts) reads each workspace folder's imported Gradle model, as its report has it (.gradle/xtc/lsp-workspace.json or lsp-model.json). A source set's projectId names its build's root, and its buildTreePath, which the XTC plugin exports since #813, its project's path in the build tree; a build whose projects' buildTreePath is not their projectPath, as :included:app for :app, is an included build. A folder whose nearest such build is an included one runs its Gradle tasks at the root of the build that includes it: the first build root of a model that lists the included build among its build roots, as the init script's EcstasyWorkspaceModel puts the build it ran in first, and that is not itself an included build; without such a model, as in a window that has the included build alone, whose own report names no build above it, the included build's own root if it has a wrapper of its own, as its report may be left over from a build that no longer includes it, else the nearest directory above it that has the wrapper. The paths in the build tree of the included build's projects come with it, from the model of the including build's import where there is one, and only paths in a build tree, not a project's path in its build alone, as a left-over report of a run of the build on its own has; a root project's task is `:build`, as gradle-projects' taskOf has it. Without a model, with a model of an older plugin, which has no buildTreePath, or for a build that is no included one, the directory walk is as it was. Run, Debug and the Gradle test runs already address a module's task by its project's path in the build tree, which the server says (xtc/gradleProjects), so they needed only the directory. Build and Rebuild (xtc.build, xtc.rebuild) and the task provider's folder tasks ran ./gradlew build and clean, which from the including build's root build that build: for an included build they now name its projects' tasks, as ./gradlew :included:build :included:app:build. Ecstasy: Build and Rebuild in Gradle mode run the task that the folder's own Build is (gradleBuildTask, task-provider.ts), and the provider's tasks of each folder come from folderTasks, which takes the folder's build. The provider's Build, Test and Clean, which ran in their folder whatever its build, run where gradleBuild says, as Run and Build have since c76f19d, so a folder that is a project inside another folder's build reaches its wrapper there too; Test keeps its tasks, the testXtc of every module's project by its path in the build tree. realPath (embedded-execution.ts) is exported for it, as Gradle's directories are canonical, as /private/var for macOS's /var. The README's Building and running says where a folder's Gradle tasks run. Tests (run-task.test.ts), on folders of a temporary directory, with models as an import writes them: an included build in the including build's directory, and one beside it, run at the including build's root, Build's and Rebuild's tasks addressed to their projects; the including build and a project of it are no included builds; with the included builds' own models alone, the nearest wrapper above, and for the one beside, which has none above it, its own root, as without a model; an older plugin's model says nothing; a left-over report of a run of the build on its own adds no project, and a root project's task is `:build`; with a wrapper of its own and no model that says another build includes it, the build runs on its own, while a model that says outer includes it still runs it from outer. And the folder's tasks: Build and Rebuild, which Ecstasy: Build and Rebuild run, and the provider's Test and Clean run at the including build's root, Build's, Rebuild's and Clean's addressed to the included build's projects, and a folder without a Gradle build has no Gradle tasks. Validated, with the series uncommitted on errs at a28850e, as it is committed here: - :lang:vscode-extension:npmCompile; tsc and eslint (node_modules/.bin/eslint src/) on each commit's tree: no findings. :lang:spotlessCheck: no findings. - In the container: the extension suite, :lang:vscode-extension:testVscodeExtension, 116 passing, 0 failing, the new tests among them (extension-tests/run-BTd6kh). The VS Code playbook, X288, X289, X290, X303 and X361–X366: 10 of 10 passed in run-aAfbLu and run-FVJvz1, the harness's 28 tests first in each. Before an independent review's fixes (an included build's projects from the including build's model alone, and its own wrapper where no model says another build includes it; the shared Build task and the provider's tasks tested; Run Module's folder found among the folders it is given; the notice's folders forgotten as they leave the window; X366's terminals cleared before its Run): the suite 115 passing (run-C7Nzb3), and with X132, X138, X139, X249 and X250, 15 of 15 in run-0vZUGt and run-q8bKjn. Limits: - Without an imported model nothing says that a build is an included one, and such a folder runs at its own root as before. VS Code imports only a folder with a wrapper of its own (refreshCompilerBuild), so the model of a folder without one comes from the including build's import, in this window or elsewhere. - An included build beside the including build, not under it, in a window without the including build's folder: no model names the including build's root, and no wrapper is above it, so it runs at its own root. - A model whose own build has no Ecstasy projects, as an aggregating root's, is taken for the build its import ran in; an included build without Ecstasy projects of its own that includes others would be taken for that too. - Build of an included build builds the projects that the model names, its Ecstasy projects, not its other ones. - An included build with a wrapper of its own that no model says another build includes runs on its own: its Build and Clean work there, while a run of one of its modules names its project by the path in the build tree that its left-over report gives, which Gradle there does not find.
lagergren
added a commit
that referenced
this pull request
Nov 28, 2026
…uns, and record master PRs #811, #812 and #813 squash-693.md places 612 in P12's container group, and records the three PRs opened on master from #693's commits outside lang/, which each take their commits out of #693 when they merge: #811, a hasher map's spare key per thread (196) with 194's test fixtures (Await and Watchdog; 194's edits of #693's own tests stay); #812, Future callbacks and service shutdowns reported and completed (170, 198), on #811's branch; #813, the Gradle model's build-tree paths and run settings (407, 465, 470). The roadmap follows. Validated: the appendix runs 1-612 with #693's hashes, and all 790 number-hash references agree with it.
lagergren
added a commit
that referenced
this pull request
Nov 28, 2026
…rged: 643 commits, #813's four dropped #813 (the Gradle model's build-tree paths and run settings, and its reports written whole) merged to master as ede5667, and errs and #693 were rebased onto it without its four commits, 407, 465, 470 and 613 (errs' 1fc3e5e, 1a19ceb, 298026b and d4cfbb8), whose combined change is ede5667's byte for byte. The plan follows: the appendix runs 1-643 with #693's new hashes, every number-hash reference is renumbered and rehashed, the group "The Gradle model: each source set's project path, xtcRun's and xtcTest's settings" (only those four) is gone, P9 and X4 lose four commits, one group and their 166 main and 186 test lines added, #802's commits are now 458, 499 and 521, and #813 joins the merged PRs in the header and the note on open ones. The roadmap names the new head and master. Validated: the four commits applied to the old base 4350e40 give exactly ede5667's five files; after the rebase, #693's tree (5029fdc) and errs' tree are identical to their backed-up tips (backup/20261127-1930/...); the appendix runs 1-643 in #693's order with its hashes, all 836 number-hash references agree with it, and the topic and pull request counts match it.
lagergren
added a commit
that referenced
this pull request
Nov 28, 2026
…ncludes it, as its imported model says In VS Code, Run, Build, Debug and the Gradle test runs of a folder go where gradleRoot says (c76f19d): the nearest directory at or above the folder that has the Gradle wrapper or a build's settings. A folder that is an included build without a wrapper of its own stops at its own settings, where ./gradlew is not, and its runs ended with exit code 127. Nor is its root the root of the build tree that its modules' projects are named in: from there a task such as :included:app:runXtc, which the server's project paths give, would not have been found either. gradleBuild (gradle-root.ts) reads each workspace folder's imported Gradle model, as its report has it (.gradle/xtc/lsp-workspace.json or lsp-model.json). A source set's projectId names its build's root, and its buildTreePath, which the XTC plugin exports since #813, its project's path in the build tree; a build whose projects' buildTreePath is not their projectPath, as :included:app for :app, is an included build. A folder whose nearest such build is an included one runs its Gradle tasks at the root of the build that includes it: the first build root of a model that lists the included build among its build roots, as the init script's EcstasyWorkspaceModel puts the build it ran in first, and that is not itself an included build; without such a model, as in a window that has the included build alone, whose own report names no build above it, the included build's own root if it has a wrapper of its own, as its report may be left over from a build that no longer includes it, else the nearest directory above it that has the wrapper. The paths in the build tree of the included build's projects come with it, from the model of the including build's import where there is one, and only paths in a build tree, not a project's path in its build alone, as a left-over report of a run of the build on its own has; a root project's task is `:build`, as gradle-projects' taskOf has it. Without a model, with a model of an older plugin, which has no buildTreePath, or for a build that is no included one, the directory walk is as it was. Run, Debug and the Gradle test runs already address a module's task by its project's path in the build tree, which the server says (xtc/gradleProjects), so they needed only the directory. Build and Rebuild (xtc.build, xtc.rebuild) and the task provider's folder tasks ran ./gradlew build and clean, which from the including build's root build that build: for an included build they now name its projects' tasks, as ./gradlew :included:build :included:app:build. Ecstasy: Build and Rebuild in Gradle mode run the task that the folder's own Build is (gradleBuildTask, task-provider.ts), and the provider's tasks of each folder come from folderTasks, which takes the folder's build. The provider's Build, Test and Clean, which ran in their folder whatever its build, run where gradleBuild says, as Run and Build have since c76f19d, so a folder that is a project inside another folder's build reaches its wrapper there too; Test keeps its tasks, the testXtc of every module's project by its path in the build tree. realPath (embedded-execution.ts) is exported for it, as Gradle's directories are canonical, as /private/var for macOS's /var. The README's Building and running says where a folder's Gradle tasks run. Tests (run-task.test.ts), on folders of a temporary directory, with models as an import writes them: an included build in the including build's directory, and one beside it, run at the including build's root, Build's and Rebuild's tasks addressed to their projects; the including build and a project of it are no included builds; with the included builds' own models alone, the nearest wrapper above, and for the one beside, which has none above it, its own root, as without a model; an older plugin's model says nothing; a left-over report of a run of the build on its own adds no project, and a root project's task is `:build`; with a wrapper of its own and no model that says another build includes it, the build runs on its own, while a model that says outer includes it still runs it from outer. And the folder's tasks: Build and Rebuild, which Ecstasy: Build and Rebuild run, and the provider's Test and Clean run at the including build's root, Build's, Rebuild's and Clean's addressed to the included build's projects, and a folder without a Gradle build has no Gradle tasks. Validated, with the series uncommitted on errs at a28850e, as it is committed here: - :lang:vscode-extension:npmCompile; tsc and eslint (node_modules/.bin/eslint src/) on each commit's tree: no findings. :lang:spotlessCheck: no findings. - In the container: the extension suite, :lang:vscode-extension:testVscodeExtension, 116 passing, 0 failing, the new tests among them (extension-tests/run-BTd6kh). The VS Code playbook, X288, X289, X290, X303 and X361–X366: 10 of 10 passed in run-aAfbLu and run-FVJvz1, the harness's 28 tests first in each. Before an independent review's fixes (an included build's projects from the including build's model alone, and its own wrapper where no model says another build includes it; the shared Build task and the provider's tasks tested; Run Module's folder found among the folders it is given; the notice's folders forgotten as they leave the window; X366's terminals cleared before its Run): the suite 115 passing (run-C7Nzb3), and with X132, X138, X139, X249 and X250, 15 of 15 in run-0vZUGt and run-q8bKjn. Limits: - Without an imported model nothing says that a build is an included one, and such a folder runs at its own root as before. VS Code imports only a folder with a wrapper of its own (refreshCompilerBuild), so the model of a folder without one comes from the including build's import, in this window or elsewhere. - An included build beside the including build, not under it, in a window without the including build's folder: no model names the including build's root, and no wrapper is above it, so it runs at its own root. - A model whose own build has no Ecstasy projects, as an aggregating root's, is taken for the build its import ran in; an included build without Ecstasy projects of its own that includes others would be taken for that too. - Build of an included build builds the projects that the model names, its Ecstasy projects, not its other ones. - An included build with a wrapper of its own that no model says another build includes runs on its own: its Build and Clean work there, while a run of one of its modules names its project by the path in the build tree that its left-over report gives, which Gradle there does not find.
lagergren
added a commit
that referenced
this pull request
Nov 29, 2026
…ncludes it, as its imported model says In VS Code, Run, Build, Debug and the Gradle test runs of a folder go where gradleRoot says (c76f19d): the nearest directory at or above the folder that has the Gradle wrapper or a build's settings. A folder that is an included build without a wrapper of its own stops at its own settings, where ./gradlew is not, and its runs ended with exit code 127. Nor is its root the root of the build tree that its modules' projects are named in: from there a task such as :included:app:runXtc, which the server's project paths give, would not have been found either. gradleBuild (gradle-root.ts) reads each workspace folder's imported Gradle model, as its report has it (.gradle/xtc/lsp-workspace.json or lsp-model.json). A source set's projectId names its build's root, and its buildTreePath, which the XTC plugin exports since #813, its project's path in the build tree; a build whose projects' buildTreePath is not their projectPath, as :included:app for :app, is an included build. A folder whose nearest such build is an included one runs its Gradle tasks at the root of the build that includes it: the first build root of a model that lists the included build among its build roots, as the init script's EcstasyWorkspaceModel puts the build it ran in first, and that is not itself an included build; without such a model, as in a window that has the included build alone, whose own report names no build above it, the included build's own root if it has a wrapper of its own, as its report may be left over from a build that no longer includes it, else the nearest directory above it that has the wrapper. The paths in the build tree of the included build's projects come with it, from the model of the including build's import where there is one, and only paths in a build tree, not a project's path in its build alone, as a left-over report of a run of the build on its own has; a root project's task is `:build`, as gradle-projects' taskOf has it. Without a model, with a model of an older plugin, which has no buildTreePath, or for a build that is no included one, the directory walk is as it was. Run, Debug and the Gradle test runs already address a module's task by its project's path in the build tree, which the server says (xtc/gradleProjects), so they needed only the directory. Build and Rebuild (xtc.build, xtc.rebuild) and the task provider's folder tasks ran ./gradlew build and clean, which from the including build's root build that build: for an included build they now name its projects' tasks, as ./gradlew :included:build :included:app:build. Ecstasy: Build and Rebuild in Gradle mode run the task that the folder's own Build is (gradleBuildTask, task-provider.ts), and the provider's tasks of each folder come from folderTasks, which takes the folder's build. The provider's Build, Test and Clean, which ran in their folder whatever its build, run where gradleBuild says, as Run and Build have since c76f19d, so a folder that is a project inside another folder's build reaches its wrapper there too; Test keeps its tasks, the testXtc of every module's project by its path in the build tree. realPath (embedded-execution.ts) is exported for it, as Gradle's directories are canonical, as /private/var for macOS's /var. The README's Building and running says where a folder's Gradle tasks run. Tests (run-task.test.ts), on folders of a temporary directory, with models as an import writes them: an included build in the including build's directory, and one beside it, run at the including build's root, Build's and Rebuild's tasks addressed to their projects; the including build and a project of it are no included builds; with the included builds' own models alone, the nearest wrapper above, and for the one beside, which has none above it, its own root, as without a model; an older plugin's model says nothing; a left-over report of a run of the build on its own adds no project, and a root project's task is `:build`; with a wrapper of its own and no model that says another build includes it, the build runs on its own, while a model that says outer includes it still runs it from outer. And the folder's tasks: Build and Rebuild, which Ecstasy: Build and Rebuild run, and the provider's Test and Clean run at the including build's root, Build's, Rebuild's and Clean's addressed to the included build's projects, and a folder without a Gradle build has no Gradle tasks. Validated, with the series uncommitted on errs at a28850e, as it is committed here: - :lang:vscode-extension:npmCompile; tsc and eslint (node_modules/.bin/eslint src/) on each commit's tree: no findings. :lang:spotlessCheck: no findings. - In the container: the extension suite, :lang:vscode-extension:testVscodeExtension, 116 passing, 0 failing, the new tests among them (extension-tests/run-BTd6kh). The VS Code playbook, X288, X289, X290, X303 and X361–X366: 10 of 10 passed in run-aAfbLu and run-FVJvz1, the harness's 28 tests first in each. Before an independent review's fixes (an included build's projects from the including build's model alone, and its own wrapper where no model says another build includes it; the shared Build task and the provider's tasks tested; Run Module's folder found among the folders it is given; the notice's folders forgotten as they leave the window; X366's terminals cleared before its Run): the suite 115 passing (run-C7Nzb3), and with X132, X138, X139, X249 and X250, 15 of 15 in run-0vZUGt and run-q8bKjn. Limits: - Without an imported model nothing says that a build is an included one, and such a folder runs at its own root as before. VS Code imports only a folder with a wrapper of its own (refreshCompilerBuild), so the model of a folder without one comes from the including build's import, in this window or elsewhere. - An included build beside the including build, not under it, in a window without the including build's folder: no model names the including build's root, and no wrapper is above it, so it runs at its own root. - A model whose own build has no Ecstasy projects, as an aggregating root's, is taken for the build its import ran in; an included build without Ecstasy projects of its own that includes others would be taken for that too. - Build of an included build builds the projects that the model names, its Ecstasy projects, not its other ones. - An included build with a wrapper of its own that no model says another build includes runs on its own: its Build and Clean work there, while a run of one of its modules names its project by the path in the build tree that its left-over report gives, which Gradle there does not find.
lagergren
added a commit
that referenced
this pull request
Nov 29, 2026
…ncludes it, as its imported model says In VS Code, Run, Build, Debug and the Gradle test runs of a folder go where gradleRoot says (c76f19d): the nearest directory at or above the folder that has the Gradle wrapper or a build's settings. A folder that is an included build without a wrapper of its own stops at its own settings, where ./gradlew is not, and its runs ended with exit code 127. Nor is its root the root of the build tree that its modules' projects are named in: from there a task such as :included:app:runXtc, which the server's project paths give, would not have been found either. gradleBuild (gradle-root.ts) reads each workspace folder's imported Gradle model, as its report has it (.gradle/xtc/lsp-workspace.json or lsp-model.json). A source set's projectId names its build's root, and its buildTreePath, which the XTC plugin exports since #813, its project's path in the build tree; a build whose projects' buildTreePath is not their projectPath, as :included:app for :app, is an included build. A folder whose nearest such build is an included one runs its Gradle tasks at the root of the build that includes it: the first build root of a model that lists the included build among its build roots, as the init script's EcstasyWorkspaceModel puts the build it ran in first, and that is not itself an included build; without such a model, as in a window that has the included build alone, whose own report names no build above it, the included build's own root if it has a wrapper of its own, as its report may be left over from a build that no longer includes it, else the nearest directory above it that has the wrapper. The paths in the build tree of the included build's projects come with it, from the model of the including build's import where there is one, and only paths in a build tree, not a project's path in its build alone, as a left-over report of a run of the build on its own has; a root project's task is `:build`, as gradle-projects' taskOf has it. Without a model, with a model of an older plugin, which has no buildTreePath, or for a build that is no included one, the directory walk is as it was. Run, Debug and the Gradle test runs already address a module's task by its project's path in the build tree, which the server says (xtc/gradleProjects), so they needed only the directory. Build and Rebuild (xtc.build, xtc.rebuild) and the task provider's folder tasks ran ./gradlew build and clean, which from the including build's root build that build: for an included build they now name its projects' tasks, as ./gradlew :included:build :included:app:build. Ecstasy: Build and Rebuild in Gradle mode run the task that the folder's own Build is (gradleBuildTask, task-provider.ts), and the provider's tasks of each folder come from folderTasks, which takes the folder's build. The provider's Build, Test and Clean, which ran in their folder whatever its build, run where gradleBuild says, as Run and Build have since c76f19d, so a folder that is a project inside another folder's build reaches its wrapper there too; Test keeps its tasks, the testXtc of every module's project by its path in the build tree. realPath (embedded-execution.ts) is exported for it, as Gradle's directories are canonical, as /private/var for macOS's /var. The README's Building and running says where a folder's Gradle tasks run. Tests (run-task.test.ts), on folders of a temporary directory, with models as an import writes them: an included build in the including build's directory, and one beside it, run at the including build's root, Build's and Rebuild's tasks addressed to their projects; the including build and a project of it are no included builds; with the included builds' own models alone, the nearest wrapper above, and for the one beside, which has none above it, its own root, as without a model; an older plugin's model says nothing; a left-over report of a run of the build on its own adds no project, and a root project's task is `:build`; with a wrapper of its own and no model that says another build includes it, the build runs on its own, while a model that says outer includes it still runs it from outer. And the folder's tasks: Build and Rebuild, which Ecstasy: Build and Rebuild run, and the provider's Test and Clean run at the including build's root, Build's, Rebuild's and Clean's addressed to the included build's projects, and a folder without a Gradle build has no Gradle tasks. Validated, with the series uncommitted on errs at a28850e, as it is committed here: - :lang:vscode-extension:npmCompile; tsc and eslint (node_modules/.bin/eslint src/) on each commit's tree: no findings. :lang:spotlessCheck: no findings. - In the container: the extension suite, :lang:vscode-extension:testVscodeExtension, 116 passing, 0 failing, the new tests among them (extension-tests/run-BTd6kh). The VS Code playbook, X288, X289, X290, X303 and X361–X366: 10 of 10 passed in run-aAfbLu and run-FVJvz1, the harness's 28 tests first in each. Before an independent review's fixes (an included build's projects from the including build's model alone, and its own wrapper where no model says another build includes it; the shared Build task and the provider's tasks tested; Run Module's folder found among the folders it is given; the notice's folders forgotten as they leave the window; X366's terminals cleared before its Run): the suite 115 passing (run-C7Nzb3), and with X132, X138, X139, X249 and X250, 15 of 15 in run-0vZUGt and run-q8bKjn. Limits: - Without an imported model nothing says that a build is an included one, and such a folder runs at its own root as before. VS Code imports only a folder with a wrapper of its own (refreshCompilerBuild), so the model of a folder without one comes from the including build's import, in this window or elsewhere. - An included build beside the including build, not under it, in a window without the including build's folder: no model names the including build's root, and no wrapper is above it, so it runs at its own root. - A model whose own build has no Ecstasy projects, as an aggregating root's, is taken for the build its import ran in; an included build without Ecstasy projects of its own that includes others would be taken for that too. - Build of an included build builds the projects that the model names, its Ecstasy projects, not its other ones. - An included build with a wrapper of its own that no model says another build includes runs on its own: its Build and Clean work there, while a run of one of its modules names its project by the path in the build tree that its left-over report gives, which Gradle there does not find.
lagergren
added a commit
that referenced
this pull request
Nov 30, 2026
…ncludes it, as its imported model says In VS Code, Run, Build, Debug and the Gradle test runs of a folder go where gradleRoot says (c76f19d): the nearest directory at or above the folder that has the Gradle wrapper or a build's settings. A folder that is an included build without a wrapper of its own stops at its own settings, where ./gradlew is not, and its runs ended with exit code 127. Nor is its root the root of the build tree that its modules' projects are named in: from there a task such as :included:app:runXtc, which the server's project paths give, would not have been found either. gradleBuild (gradle-root.ts) reads each workspace folder's imported Gradle model, as its report has it (.gradle/xtc/lsp-workspace.json or lsp-model.json). A source set's projectId names its build's root, and its buildTreePath, which the XTC plugin exports since #813, its project's path in the build tree; a build whose projects' buildTreePath is not their projectPath, as :included:app for :app, is an included build. A folder whose nearest such build is an included one runs its Gradle tasks at the root of the build that includes it: the first build root of a model that lists the included build among its build roots, as the init script's EcstasyWorkspaceModel puts the build it ran in first, and that is not itself an included build; without such a model, as in a window that has the included build alone, whose own report names no build above it, the included build's own root if it has a wrapper of its own, as its report may be left over from a build that no longer includes it, else the nearest directory above it that has the wrapper. The paths in the build tree of the included build's projects come with it, from the model of the including build's import where there is one, and only paths in a build tree, not a project's path in its build alone, as a left-over report of a run of the build on its own has; a root project's task is `:build`, as gradle-projects' taskOf has it. Without a model, with a model of an older plugin, which has no buildTreePath, or for a build that is no included one, the directory walk is as it was. Run, Debug and the Gradle test runs already address a module's task by its project's path in the build tree, which the server says (xtc/gradleProjects), so they needed only the directory. Build and Rebuild (xtc.build, xtc.rebuild) and the task provider's folder tasks ran ./gradlew build and clean, which from the including build's root build that build: for an included build they now name its projects' tasks, as ./gradlew :included:build :included:app:build. Ecstasy: Build and Rebuild in Gradle mode run the task that the folder's own Build is (gradleBuildTask, task-provider.ts), and the provider's tasks of each folder come from folderTasks, which takes the folder's build. The provider's Build, Test and Clean, which ran in their folder whatever its build, run where gradleBuild says, as Run and Build have since c76f19d, so a folder that is a project inside another folder's build reaches its wrapper there too; Test keeps its tasks, the testXtc of every module's project by its path in the build tree. realPath (embedded-execution.ts) is exported for it, as Gradle's directories are canonical, as /private/var for macOS's /var. The README's Building and running says where a folder's Gradle tasks run. Tests (run-task.test.ts), on folders of a temporary directory, with models as an import writes them: an included build in the including build's directory, and one beside it, run at the including build's root, Build's and Rebuild's tasks addressed to their projects; the including build and a project of it are no included builds; with the included builds' own models alone, the nearest wrapper above, and for the one beside, which has none above it, its own root, as without a model; an older plugin's model says nothing; a left-over report of a run of the build on its own adds no project, and a root project's task is `:build`; with a wrapper of its own and no model that says another build includes it, the build runs on its own, while a model that says outer includes it still runs it from outer. And the folder's tasks: Build and Rebuild, which Ecstasy: Build and Rebuild run, and the provider's Test and Clean run at the including build's root, Build's, Rebuild's and Clean's addressed to the included build's projects, and a folder without a Gradle build has no Gradle tasks. Validated, with the series uncommitted on errs at a28850e, as it is committed here: - :lang:vscode-extension:npmCompile; tsc and eslint (node_modules/.bin/eslint src/) on each commit's tree: no findings. :lang:spotlessCheck: no findings. - In the container: the extension suite, :lang:vscode-extension:testVscodeExtension, 116 passing, 0 failing, the new tests among them (extension-tests/run-BTd6kh). The VS Code playbook, X288, X289, X290, X303 and X361–X366: 10 of 10 passed in run-aAfbLu and run-FVJvz1, the harness's 28 tests first in each. Before an independent review's fixes (an included build's projects from the including build's model alone, and its own wrapper where no model says another build includes it; the shared Build task and the provider's tasks tested; Run Module's folder found among the folders it is given; the notice's folders forgotten as they leave the window; X366's terminals cleared before its Run): the suite 115 passing (run-C7Nzb3), and with X132, X138, X139, X249 and X250, 15 of 15 in run-0vZUGt and run-q8bKjn. Limits: - Without an imported model nothing says that a build is an included one, and such a folder runs at its own root as before. VS Code imports only a folder with a wrapper of its own (refreshCompilerBuild), so the model of a folder without one comes from the including build's import, in this window or elsewhere. - An included build beside the including build, not under it, in a window without the including build's folder: no model names the including build's root, and no wrapper is above it, so it runs at its own root. - A model whose own build has no Ecstasy projects, as an aggregating root's, is taken for the build its import ran in; an included build without Ecstasy projects of its own that includes others would be taken for that too. - Build of an included build builds the projects that the model names, its Ecstasy projects, not its other ones. - An included build with a wrapper of its own that no model says another build includes runs on its own: its Build and Clean work there, while a run of one of its modules names its project by the path in the build tree that its left-over report gives, which Gradle there does not find.
lagergren
added a commit
that referenced
this pull request
Nov 30, 2026
…ncludes it, as its imported model says In VS Code, Run, Build, Debug and the Gradle test runs of a folder go where gradleRoot says (c76f19d): the nearest directory at or above the folder that has the Gradle wrapper or a build's settings. A folder that is an included build without a wrapper of its own stops at its own settings, where ./gradlew is not, and its runs ended with exit code 127. Nor is its root the root of the build tree that its modules' projects are named in: from there a task such as :included:app:runXtc, which the server's project paths give, would not have been found either. gradleBuild (gradle-root.ts) reads each workspace folder's imported Gradle model, as its report has it (.gradle/xtc/lsp-workspace.json or lsp-model.json). A source set's projectId names its build's root, and its buildTreePath, which the XTC plugin exports since #813, its project's path in the build tree; a build whose projects' buildTreePath is not their projectPath, as :included:app for :app, is an included build. A folder whose nearest such build is an included one runs its Gradle tasks at the root of the build that includes it: the first build root of a model that lists the included build among its build roots, as the init script's EcstasyWorkspaceModel puts the build it ran in first, and that is not itself an included build; without such a model, as in a window that has the included build alone, whose own report names no build above it, the included build's own root if it has a wrapper of its own, as its report may be left over from a build that no longer includes it, else the nearest directory above it that has the wrapper. The paths in the build tree of the included build's projects come with it, from the model of the including build's import where there is one, and only paths in a build tree, not a project's path in its build alone, as a left-over report of a run of the build on its own has; a root project's task is `:build`, as gradle-projects' taskOf has it. Without a model, with a model of an older plugin, which has no buildTreePath, or for a build that is no included one, the directory walk is as it was. Run, Debug and the Gradle test runs already address a module's task by its project's path in the build tree, which the server says (xtc/gradleProjects), so they needed only the directory. Build and Rebuild (xtc.build, xtc.rebuild) and the task provider's folder tasks ran ./gradlew build and clean, which from the including build's root build that build: for an included build they now name its projects' tasks, as ./gradlew :included:build :included:app:build. Ecstasy: Build and Rebuild in Gradle mode run the task that the folder's own Build is (gradleBuildTask, task-provider.ts), and the provider's tasks of each folder come from folderTasks, which takes the folder's build. The provider's Build, Test and Clean, which ran in their folder whatever its build, run where gradleBuild says, as Run and Build have since c76f19d, so a folder that is a project inside another folder's build reaches its wrapper there too; Test keeps its tasks, the testXtc of every module's project by its path in the build tree. realPath (embedded-execution.ts) is exported for it, as Gradle's directories are canonical, as /private/var for macOS's /var. The README's Building and running says where a folder's Gradle tasks run. Tests (run-task.test.ts), on folders of a temporary directory, with models as an import writes them: an included build in the including build's directory, and one beside it, run at the including build's root, Build's and Rebuild's tasks addressed to their projects; the including build and a project of it are no included builds; with the included builds' own models alone, the nearest wrapper above, and for the one beside, which has none above it, its own root, as without a model; an older plugin's model says nothing; a left-over report of a run of the build on its own adds no project, and a root project's task is `:build`; with a wrapper of its own and no model that says another build includes it, the build runs on its own, while a model that says outer includes it still runs it from outer. And the folder's tasks: Build and Rebuild, which Ecstasy: Build and Rebuild run, and the provider's Test and Clean run at the including build's root, Build's, Rebuild's and Clean's addressed to the included build's projects, and a folder without a Gradle build has no Gradle tasks. Validated, with the series uncommitted on errs at a28850e, as it is committed here: - :lang:vscode-extension:npmCompile; tsc and eslint (node_modules/.bin/eslint src/) on each commit's tree: no findings. :lang:spotlessCheck: no findings. - In the container: the extension suite, :lang:vscode-extension:testVscodeExtension, 116 passing, 0 failing, the new tests among them (extension-tests/run-BTd6kh). The VS Code playbook, X288, X289, X290, X303 and X361–X366: 10 of 10 passed in run-aAfbLu and run-FVJvz1, the harness's 28 tests first in each. Before an independent review's fixes (an included build's projects from the including build's model alone, and its own wrapper where no model says another build includes it; the shared Build task and the provider's tasks tested; Run Module's folder found among the folders it is given; the notice's folders forgotten as they leave the window; X366's terminals cleared before its Run): the suite 115 passing (run-C7Nzb3), and with X132, X138, X139, X249 and X250, 15 of 15 in run-0vZUGt and run-q8bKjn. Limits: - Without an imported model nothing says that a build is an included one, and such a folder runs at its own root as before. VS Code imports only a folder with a wrapper of its own (refreshCompilerBuild), so the model of a folder without one comes from the including build's import, in this window or elsewhere. - An included build beside the including build, not under it, in a window without the including build's folder: no model names the including build's root, and no wrapper is above it, so it runs at its own root. - A model whose own build has no Ecstasy projects, as an aggregating root's, is taken for the build its import ran in; an included build without Ecstasy projects of its own that includes others would be taken for that too. - Build of an included build builds the projects that the model names, its Ecstasy projects, not its other ones. - An included build with a wrapper of its own that no model says another build includes runs on its own: its Build and Clean work there, while a run of one of its modules names its project by the path in the build tree that its left-over report gives, which Gradle there does not find.
lagergren
added a commit
that referenced
this pull request
Dec 1, 2026
…ncludes it, as its imported model says In VS Code, Run, Build, Debug and the Gradle test runs of a folder go where gradleRoot says (c76f19d): the nearest directory at or above the folder that has the Gradle wrapper or a build's settings. A folder that is an included build without a wrapper of its own stops at its own settings, where ./gradlew is not, and its runs ended with exit code 127. Nor is its root the root of the build tree that its modules' projects are named in: from there a task such as :included:app:runXtc, which the server's project paths give, would not have been found either. gradleBuild (gradle-root.ts) reads each workspace folder's imported Gradle model, as its report has it (.gradle/xtc/lsp-workspace.json or lsp-model.json). A source set's projectId names its build's root, and its buildTreePath, which the XTC plugin exports since #813, its project's path in the build tree; a build whose projects' buildTreePath is not their projectPath, as :included:app for :app, is an included build. A folder whose nearest such build is an included one runs its Gradle tasks at the root of the build that includes it: the first build root of a model that lists the included build among its build roots, as the init script's EcstasyWorkspaceModel puts the build it ran in first, and that is not itself an included build; without such a model, as in a window that has the included build alone, whose own report names no build above it, the included build's own root if it has a wrapper of its own, as its report may be left over from a build that no longer includes it, else the nearest directory above it that has the wrapper. The paths in the build tree of the included build's projects come with it, from the model of the including build's import where there is one, and only paths in a build tree, not a project's path in its build alone, as a left-over report of a run of the build on its own has; a root project's task is `:build`, as gradle-projects' taskOf has it. Without a model, with a model of an older plugin, which has no buildTreePath, or for a build that is no included one, the directory walk is as it was. Run, Debug and the Gradle test runs already address a module's task by its project's path in the build tree, which the server says (xtc/gradleProjects), so they needed only the directory. Build and Rebuild (xtc.build, xtc.rebuild) and the task provider's folder tasks ran ./gradlew build and clean, which from the including build's root build that build: for an included build they now name its projects' tasks, as ./gradlew :included:build :included:app:build. Ecstasy: Build and Rebuild in Gradle mode run the task that the folder's own Build is (gradleBuildTask, task-provider.ts), and the provider's tasks of each folder come from folderTasks, which takes the folder's build. The provider's Build, Test and Clean, which ran in their folder whatever its build, run where gradleBuild says, as Run and Build have since c76f19d, so a folder that is a project inside another folder's build reaches its wrapper there too; Test keeps its tasks, the testXtc of every module's project by its path in the build tree. realPath (embedded-execution.ts) is exported for it, as Gradle's directories are canonical, as /private/var for macOS's /var. The README's Building and running says where a folder's Gradle tasks run. Tests (run-task.test.ts), on folders of a temporary directory, with models as an import writes them: an included build in the including build's directory, and one beside it, run at the including build's root, Build's and Rebuild's tasks addressed to their projects; the including build and a project of it are no included builds; with the included builds' own models alone, the nearest wrapper above, and for the one beside, which has none above it, its own root, as without a model; an older plugin's model says nothing; a left-over report of a run of the build on its own adds no project, and a root project's task is `:build`; with a wrapper of its own and no model that says another build includes it, the build runs on its own, while a model that says outer includes it still runs it from outer. And the folder's tasks: Build and Rebuild, which Ecstasy: Build and Rebuild run, and the provider's Test and Clean run at the including build's root, Build's, Rebuild's and Clean's addressed to the included build's projects, and a folder without a Gradle build has no Gradle tasks. Validated, with the series uncommitted on errs at a28850e, as it is committed here: - :lang:vscode-extension:npmCompile; tsc and eslint (node_modules/.bin/eslint src/) on each commit's tree: no findings. :lang:spotlessCheck: no findings. - In the container: the extension suite, :lang:vscode-extension:testVscodeExtension, 116 passing, 0 failing, the new tests among them (extension-tests/run-BTd6kh). The VS Code playbook, X288, X289, X290, X303 and X361–X366: 10 of 10 passed in run-aAfbLu and run-FVJvz1, the harness's 28 tests first in each. Before an independent review's fixes (an included build's projects from the including build's model alone, and its own wrapper where no model says another build includes it; the shared Build task and the provider's tasks tested; Run Module's folder found among the folders it is given; the notice's folders forgotten as they leave the window; X366's terminals cleared before its Run): the suite 115 passing (run-C7Nzb3), and with X132, X138, X139, X249 and X250, 15 of 15 in run-0vZUGt and run-q8bKjn. Limits: - Without an imported model nothing says that a build is an included one, and such a folder runs at its own root as before. VS Code imports only a folder with a wrapper of its own (refreshCompilerBuild), so the model of a folder without one comes from the including build's import, in this window or elsewhere. - An included build beside the including build, not under it, in a window without the including build's folder: no model names the including build's root, and no wrapper is above it, so it runs at its own root. - A model whose own build has no Ecstasy projects, as an aggregating root's, is taken for the build its import ran in; an included build without Ecstasy projects of its own that includes others would be taken for that too. - Build of an included build builds the projects that the model names, its Ecstasy projects, not its other ones. - An included build with a wrapper of its own that no model says another build includes runs on its own: its Build and Clean work there, while a run of one of its modules names its project by the path in the build tree that its left-over report gives, which Gradle there does not find.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Gradle model that an editor's import writes (
.gradle/xtc/lsp-model.json, andlsp-workspace.jsonthroughlang/gradle/compiler-model.init.gradle) is all a language server knows of a project's build. Two things a run needs were missing from it:runXtcortestXtcreaches no included build: in this repository, whose root only aggregates its included builds, every one of an XDK module fails with "Task 'testXtc' not found in root project 'xvm'", where the full path,:xdk:lib-json:testXtc, resolves../gradlew runXtc.What
Each source set's entry now carries:
buildTreePath, the project's path in the whole build tree (Project.getBuildTreePath()), such as:xdk:lib-json.runandtest: the JVM arguments that xtcRun's and xtcTest's JVMs get (-eaand the plugin's options with the build script'sjvmArgs, as since Keep xtcRun's settings in runXtc: Gradle's jvmArgs semantics with enableAssertions, and a module's method and arguments with --module #804), xtcRun's modules with their method and arguments, andproblems, what the export could not read.Each source set's report is written whole, as
lsp-model.jsonalready was: to a temporary file in its directory, then moved into place (XtcLspModelTask.writeAtomically, now shared by both tasks). It was written in place, so two builds exporting one project at once, such as IntelliJ's and VS Code's imports of the same folder, could have one build's model task read the other's report part written, and that import fail.The export reads the extensions, which
runXtcandtestXtctake their defaults from, and neither realizes nor runs the tasks, so a task's configuration block cannot affect an import. It never fails because of these settings: a value that cannot be read, such as amoduleArgfrom an unset Gradle property, is left out and named inproblems. The values are plain task inputs, so the configuration cache stores them. Readers that do not know the new fields ignore them; the language server reads them in a later change.Validation
RUN_INTEGRATION_TESTS=true ./gradlew :plugin:validatePlugins :plugin:test :plugin:javadoc spotlessCheck, from fresh JUnit XML: 80 tests in 15 classes, 0 failures, 0 skipped.XtcLspModelTest, 5 of 5, covers a multi-project build and a composite's included builds'buildTreePath; the extensions' run and test settings withrunXtcandtestXtcconfigure blocks that throw, which the export would hit if it realized either task; settings that cannot be read, left out and named, without failing the export; and the configuration cache reused. The newexportsReplaceTheirReportsWholeInsteadOfRewritingThemInPlaceexports a project twice and checks that the report and the model are other files the second time (their file keys, such as the inode) with no temporary file left; against the in-place write it fails.manualTests, the fake consumer build:./gradlew --init-script lang/gradle/compiler-model.init.gradle :manualTests:exportEcstasyWorkspaceModel, BUILD SUCCESSFUL with norunXtc,testXtcor compile task run. Both source sets' entries havebuildTreePath:manualTests,run.jvmArgs[-ea, --enable-native-access=ALL-UNNAMED, -showversion, --enable-preview],run.modulesEchoTestwithrunand[Hello, World],test.jvmArgs[-ea, --enable-native-access=ALL-UNNAMED], and no problems.