Skip to content

build: local test runs can read the templates of an older build, and clean doesn't clear them #2362

Done

Description

@lagergren

Locally, a test can read the bundled templates of an older build of LSP4IJ, and pass or fail against them without any sign of it. ./gradlew clean doesn't help. CI isn't affected: each run starts from a fresh checkout.

What happened

On 2026-11-30, after main (with #2333) was merged into the branch of #2336, in a worktree whose tests had run before:

Run Result
Installer and template tests CodeLLDBTemplateTest.testTheTemplateMapsZigFilesAndHasAZigLaunchConfiguration failed with expected:<[Launch Rust file, Launch Zig program]> but was:<[Launch Rust file]>, and BundledDebugAdapterTemplatesTest with "The template gdb is bundled"
The same, after ./gradlew clean CodeLLDBTemplateTest still failed the same way
The same, after deleting the sandbox's system-test* folders the 311 tests passed

The JAR in the sandbox's plugins-test had templates/dap/codelldb/launch.zig.json all along.

Cause

Classes aren't affected: they're loaded from the JAR itself.

Proposal

  • A task that deletes the system-test* folders of the test sandboxes when the plugin's resources change, run before test and testJavaScript. A test run that changes no resource keeps its caches.
  • clean deletes them too.

Both work with the configuration cache, through an injected FileSystemOperations and declared inputs. It's a build change, for contributors only.

Until then: delete the system-test* folders of the sandbox (not config-test* or plugins-test) when a template test fails in a way that the JAR's content contradicts.

Activity

  1. added this to the 0.30.3 milestone on Nov 30, 2026
  2. added 2 commits that reference this issue on Nov 30, 2026
    4868245
    5e48521
  3. added 3 commits that reference this issue on Nov 30, 2026
    d94aa12
    08dca9b
    a3356c4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions