Skip to content

[Java.Interop] Remove obsolete standalone build infrastructure - #13222

Merged
jonathanpeppers merged 1 commit into
mainfrom
simonrozsival-standalone-interop-cleanup
Oct 21, 2026
Merged

jonathanpeppers merged 1 commit into
mainfrom
simonrozsival-standalone-interop-cleanup

Conversation

@simonrozsival

Copy link
Copy Markdown
Member

Part of #11843.

The standalone core host-JVM harness and desktop native projects have already been retired, but their Mono/NUnit runner, native build helpers, and bootstrap metadata remain. The old runner looks under bin/TestDebug and invokes Mono, while retained tooling tests target .NET 10 and use bin/TestDebug-net10.0.

Remove the obsolete runner/import, its only environment-setting task, runner-only PackagePaths.props generation and bootstrap NUnit-console dependency, unused NativeToolchain.targets/RunCmake.proj/msbuild.mk, and unreferenced internal bootstrap DownloadUri, ParseAndroidResources, and OS implementations. Also remove the desktop Java.Interop-Tests pipeline step/native-test switches and the unused JI_JVM_PATH make export.

Preserve the live Prepare entry point: before.Java.Interop.sln.targets is implicitly loaded for Java.Interop.slnx, and the outer Android build calls it. Move _TopDir into Prepare.targets because it was previously supplied by the deleted runner, and register the retained internal JDK task with the required .NET task host.

Shared JDK discovery, JDK tool paths and remaining generated metadata, bootstrap versioning, all nine host tooling test suites, java-source-utils, generator/class-parse/Maven/bytecode/JavaSource/TypeNameMappings, AndroidNativeAOT, and core Android tests remain. Test-project NUnit-console references and VS Code developer configuration are deliberately retained rather than assuming those developer contracts can be deleted. No shipped interop API or memory-safety code changes.

Local validation

The commands below use LOGS=/Users/simon/.copilot/session-state/95e52377-5b58-4ab0-8442-c0ce92f1b8b2/files for local diagnostic artifacts. Builds were bounded to one MSBuild/Gradle worker with build servers disabled.

  • dotnet build external/Java.Interop/Java.Interop.slnx -t:Prepare -c Debug -m:1 --disable-build-servers -nr:false -p:UseSharedCompilation=false -p:GradleArgs='--stacktrace --no-daemon --max-workers=1 -Pkotlin.compiler.execution.strategy=in-process' -v:minimal -bl:$LOGS/prepare.binlog — passed, 25.21s, zero warnings/errors. Verified generated JDK executable paths still exist, JdkInfo.mk retains its other exports, and no PackagePaths.props is generated.
  • dotnet build external/Java.Interop/Java.Interop.slnx --no-restore -c Debug -m:1 --disable-build-servers -nr:false -p:UseSharedCompilation=false -p:GradleArgs='--stacktrace --no-daemon --max-workers=1 -Pkotlin.compiler.execution.strategy=in-process' -v:minimal -bl:$LOGS/tooling-build.binlog — passed, 2m19.36s, zero warnings/errors. The same no-change command with -bl:$LOGS/tooling-incremental.binlog also passed, 11.97s, zero warnings/errors.
  • dotnet test external/Java.Interop/Java.Interop.slnx --no-build --no-restore -c Debug -m:1 --disable-build-servers -nr:false -p:UseSharedCompilation=false --logger 'trx;LogFilePrefix=tooling' --results-directory $LOGS/test-results -v:minimal — 799 passed, 1 existing failure, 2 skipped across all nine tooling suites. The sole failure is unchanged ModuleInfoTests.ClassFile: constant pool expected 12, actual 13 with auto-discovered javac 23.0.2.
  • dotnet build external/Java.Interop/tools/java-source-utils/java-source-utils.csproj -t:RunTests --no-restore -c Debug -m:1 --disable-build-servers -nr:false -p:UseSharedCompilation=false -p:GradleArgs='--stacktrace --no-daemon --max-workers=1 -Pkotlin.compiler.execution.strategy=in-process' -v:minimal -bl:$LOGS/java-source-utils-tests.binlog — passed, 18 tests across four suites; six existing obsolete-Java-8-option warnings.
  • dotnet msbuild external/Java.Interop/Java.Interop.slnx -t:ValidateSolutionConfiguration -v:diag -nologo — passed before and after the change; confirms the implicit solution hook and preserved _TopDir.
  • git diff --check — passed; changed XML parses, template retains all nine tooling assemblies plus Java-source-utils tests, and tracked-reference checks find no surviving consumers of deleted helpers.

The bytecode failure was checked against unmodified baseline 44d713f364: Java fixture sources extracted with git archive HEAD and compiled with the same javac -parameters --release 11 -g produce a byte-identical module-info.class to the changed checkout (SHA-256 70344aeaf5936f8f8256ab7416958bf867f45f8309d4aa9a44f35b8f6393ab99). That baseline's unchanged test also expects 12. No unrelated test expectation/JDK pin was changed, and the failure was not suppressed.

Full SDK/native builds and device tests were not run: this change only removes standalone infrastructure, and the granted local validation window explicitly excluded SDK/native/device operations.


Pull Request
title and
description
should follow the
commit-messages.md workflow documentation, and in particular should include:

  • Useful description of why the change is necessary.
  • Links to issues fixed
  • Unit tests

Retain the live solution preparation hook and shared JDK/tooling workflows while removing the retired desktop runner, unused native build helpers, and unreferenced internal bootstrap tasks.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 21, 2026 07:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Windows task-host behavior and outer Android build integration remain unvalidated for the live preparation-path changes.

No open issues 🎉

What changed in this PR

Removes obsolete Java.Interop standalone build infrastructure as part of #11843, while preserving Android preparation and retained tooling tests.

Changes:

  • Deletes the legacy Mono/NUnit runner, native build helpers, and unused bootstrap tasks.
  • Removes runner-only package metadata and desktop test pipeline configuration.
  • Preserves Prepare by relocating _TopDir and registering JDK discovery with the .NET task host.
File Description
external/​Java.Interop/​Directory.Build.props Removes obsolete package-path import and CMake default.
external/​Java.Interop/​build-tools/​scripts/​RunNUnitTests.targets Deletes legacy Mono/NUnit runner.
external/​Java.Interop/​build-tools/​scripts/​RunCmake.proj Deletes unused CMake wrapper.
external/​Java.Interop/​build-tools/​scripts/​Prepare.targets Preserves root path and updates JDK task hosting.
external/​Java.Interop/​build-tools/​scripts/​NativeToolchain.targets Deletes desktop toolchain setup.
external/​Java.Interop/​build-tools/​scripts/​msbuild.mk Deletes unused MSBuild make helper.
external/​Java.Interop/​build-tools/​Java.Interop.BootstrapTasks/​Java.Interop.BootstrapTasks/​SetEnvironmentVariable.cs Deletes runner-only environment task.
external/​Java.Interop/​build-tools/​Java.Interop.BootstrapTasks/​Java.Interop.BootstrapTasks/​ParseAndroidResources.cs Deletes unused resource parser.
external/​Java.Interop/​build-tools/​Java.Interop.BootstrapTasks/​Java.Interop.BootstrapTasks/​OS.cs Deletes unused platform helper.
external/​Java.Interop/​build-tools/​Java.Interop.BootstrapTasks/​Java.Interop.BootstrapTasks/​JdkInfo.cs Removes unused JVM make export.
external/​Java.Interop/​build-tools/​Java.Interop.BootstrapTasks/​Java.Interop.BootstrapTasks/​DownloadUri.cs Deletes unused download task.
external/​Java.Interop/​build-tools/​Java.Interop.BootstrapTasks/​Java.Interop.BootstrapTasks.targets Removes runner package-path generation; retains versioning.
external/​Java.Interop/​build-tools/​Java.Interop.BootstrapTasks/​Java.Interop.BootstrapTasks.csproj Removes bootstrap NUnit-console dependency.
external/​Java.Interop/​build-tools/​automation/​templates/​core-tests.yaml Removes desktop interop test step and switches.
external/​Java.Interop/​before.Java.Interop.sln.targets Removes runner import; retains preparation hook.

Review effort: Balanced

@jonathanpeppers
jonathanpeppers merged commit 3b5451b into main Oct 21, 2026
42 checks passed
@jonathanpeppers
jonathanpeppers deleted the simonrozsival-standalone-interop-cleanup branch October 21, 2026 19:54
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants