Repository navigation
[Java.Interop] Remove unused Mono native validation dependencies - #13054
Merged
Merged
Conversation
Keep native source validation for the shared dynamic-loading, utility, and core sources without downloading Mono runtime packs or importing Mono headers. Remove obsolete header configuration and document the validation build contract. Co-authored-by: Copilot App <[email protected]>
No tracked Makefile includes this fragment, including through dynamic or wildcard includes, and there is no documented entry point. Native validation uses dotnet and CMake independently. Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The cleanup is internally consistent, with only a non-blocking documentation maintainability suggestion.
1 open finding
What changed in this PR
Removes obsolete Mono dependencies from Java.Interop native validation while preserving active native compilation and incrementality.
Changes:
- Removes empty Mono adapter files and CMake wiring.
- Eliminates obsolete Mono package, properties, and build scripts.
- Documents Mono-free native validation.
| File | Description |
|---|---|
java-interop.targets |
Removes Mono include arguments. |
java-interop.csproj |
Removes Mono runtime-pack download. |
java-interop-mono.h |
Deletes unused Mono header adapter. |
java-interop-mono.cc |
Deletes empty source adapter. |
CMakeLists.txt |
Removes Mono includes and source. |
BuildConfiguration.md |
Documents native validation. |
Directory.Build.props |
Removes obsolete MonoInfo.props import. |
Configuration.Override.props.in |
Removes Mono overrides. |
mono.mk |
Deletes orphaned Mono probing script. |
🧠 Review effort: Balanced
Keep the configuration guide focused on useful settings instead of documenting internal validation output details or the absence of a removed dependency. Co-authored-by: Copilot App <[email protected]>
Member
Author
|
@dalexsoto review |
dalexsoto
approved these changes
Oct 9, 2026
dalexsoto
left a comment
Member
There was a problem hiding this comment.
The removed Mono adapter, headers, package and build-script wiring have no active consumer. Native validation retains its three support sources, platform/output paths and incremental/Clean contracts, while Android runtime linking remains separate and unchanged. No blocking issue remains.
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.

Follow up to #13030.
JavaInterop1 retirement leaves
java-interop-mono.ccwithout any code andjava-interop-mono.hwith only Mono header imports. Native validation stillcompiles that empty adapter and downloads a host Mono runtime pack pinned
to 8.0.13 solely for those unused headers.
Remove the empty adapter/header, CMake source/include wiring, Mono path
properties and arguments, and runtime-pack download. Also remove the
unused Mono configuration overrides, dead
MonoInfo.propsimport, andorphaned
mono.mkfile. No tracked reference, dynamic/wildcard include,or documented entry point consumes that Make fragment.
Keep the native validation project and compilation of the shared dlfcn,
utility, and core sources. Archive paths, native source/header inputs,
incremental behavior, and clean behavior remain unchanged. Generic native
toolchain scripts and Android runtime/native-host CMake are untouched.
The third-party-notice audit requires no changes: the removed runtime pack
is Microsoft-owned and build-only, and the Java.Interop notice remains.
Local validation
All commands below passed on macOS arm64; builds reported zero warnings
and errors. For the isolated builds,
NUGET_PACKAGESandNUGET_HTTP_CACHE_PATHpointed to fresh, private cache directories withoutremoving or modifying shared/global packages.
dotnet restore external/Java.Interop/src/java-interop/java-interop.csproj -p:BaseIntermediateOutputPath=obj/no-mono/ -v:minimaldotnet build external/Java.Interop/src/java-interop/java-interop.csproj --no-restore -p:BaseIntermediateOutputPath=obj/no-mono/ -v:minimaldotnet build external/Java.Interop/src/java-interop/java-interop.csproj -c Release -p:BaseIntermediateOutputPath=obj/no-mono/ -v:minimaldotnet build external/Java.Interop/src/java-interop/java-interop.csproj -p:BaseIntermediateOutputPath=obj/no-mono-x64/ -p:NETCoreSdkRuntimeIdentifier=osx-x64 -v:minimallipo.dotnet clean external/Java.Interop/src/java-interop/java-interop.csproj -v:minimaldotnet build external/Java.Interop/src/java-interop/java-interop.csproj --no-restore -v:minimalmono.mk.Additional local checks passed: all three source files, four headers,
CMakeLists.txt, the project, and its targets invalidate
_BuildLibswhentouched; unchanged builds skip that target and preserve the archive
mtime; clean and missing-output builds recreate the archive. Fresh
CMake/Ninja configuration, output-directory override, incremental build,
and clean/rebuild also passed. Restore graphs, active compiler header
dependencies, and compile commands contain no Mono dependency.
Ad hoc native smoke checks linked against the arm64 and x64 archives and
passed strdup/free and dynamic-library load/symbol/close success and error
cases; x64 execution used Rosetta. Edited XML and
git diff --checkpassed.No new unit-test infrastructure is added for this unused-code removal.
Windows/MSVC and Linux hosts were unavailable locally and remain untested.
No full Android SDK/device build was run: active runtime sources and Android
CMake behavior are unchanged.
Pull Request
title and
description
should follow the
commit-messages.mdworkflow documentation, and in particular should include: