Skip to content

[Java.Interop] Remove obsolete desktop sample and timing project - #13138

Merged
simonrozsival merged 2 commits into
mainfrom
simonrozsival-remove-desktop-interop-leftovers
Oct 14, 2026
Merged

simonrozsival merged 2 commits into
mainfrom
simonrozsival-remove-desktop-interop-leftovers

Conversation

@simonrozsival

@simonrozsival simonrozsival commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

The standalone desktop Hello-NativeAOTFromJNI sample and orphaned desktop NativeTiming project are not required by .NET for Android. Remove these leftovers as a focused part of the Java.Interop reduction tracked in #11843.

Remove all six sample files, its publish/run steps and sample-only nativeAotRid parameter from core-tests.yaml. Remove all four desktop NativeTiming files and its solution entry. Keep the remaining automation and tooling projects unchanged.

Android NativeAOT support and production runtime code are unchanged. The distinct tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/jni/timing.c Android fixture is byte-for-byte unchanged. This PR does not close the tracking issue.

Validation

  • git diff --check — passed before committing.
  • Solution XML parsing and project-path checks — passed; all 29 retained project paths exist. YAML parsing and assertions for removed sample steps/parameter — passed. Tracked-file reference search found no stale sample or desktop project references.
  • dotnet build external/Java.Interop/Java.Interop.slnx -c Debug -v minimal — passed, zero warnings/errors.
  • ./dotnet-local.sh build external/Java.Interop/Java.Interop.slnx -c Debug -v minimal — passed, zero warnings/errors.
  • dotnet test external/Java.Interop/tests/Xamarin.SourceWriter-Tests/Xamarin.SourceWriter-Tests.csproj -v minimal — passed, 11 tests.
  • dotnet test external/Java.Interop/Java.Interop.slnx -c Debug --no-build -v minimal — 799 passed, 1 failed, 2 skipped across nine test suites.
  • ./dotnet-local.sh test external/Java.Interop/Java.Interop.slnx -c Debug --no-build -v minimal — same result: 799 passed, 1 failed, 2 skipped.
  • dotnet test external/Java.Interop/tests/Xamarin.Android.Tools.Bytecode-Tests/Xamarin.Android.Tools.Bytecode-Tests.csproj -c Debug --no-build --filter 'FullyQualifiedName~ModuleInfoTests.ClassFile' -v minimal — reproduces the failure independently of the edited solution: untouched ModuleInfoTests.ClassFile expects a module-info constant pool count of 12, but gets 13. No unrelated test changes are included.
  • make prepare && make all — preparation succeeded; full SDK build failed in CreateFrameworkListFile with MSB4018/MSB3073 because bin/Debug/lib/xamarin.android/xbuild-frameworks/Microsoft.Android/37.1/ref/Mono.Android.dll is missing. Full SDK/device validation remains blocked; device tests were not run.

Context: #11843

Remove the standalone Hello-NativeAOTFromJNI sample and its publish/run
steps and sample-only runtime identifier parameter.  Remove the orphaned
desktop NativeTiming project and its solution entry.

These desktop components are not needed by .NET for Android.  Keep Android
NativeAOT support and the distinct Android JcwGen timing fixture intact.

Context: #11843

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

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.

🟢 Approval recommended

The focused removal is consistent, leaves no stale references, and preserves Android production and timing paths.

0 open findings

What changed in this PR

Removes obsolete desktop-only Java.Interop sample and timing projects while preserving Android NativeAOT and device timing coverage.

Changes:

  • Deletes the Hello-NativeAOTFromJNI sample and its automation.
  • Deletes the orphaned NativeTiming project and solution entry.
  • Removes the now-unused nativeAotRid parameter.
File Description
external/​Java.Interop/​tests/​NativeTiming/​timing.c Removes desktop JNI timing implementation.
external/​Java.Interop/​tests/​NativeTiming/​NativeTiming.targets Removes native timing build targets.
external/​Java.Interop/​tests/​NativeTiming/​NativeTiming.csproj Removes timing project.
external/​Java.Interop/​tests/​NativeTiming/​CMakeLists.txt Removes timing native build definition.
external/​Java.Interop/​samples/​Hello-NativeAOTFromJNI/​JavaInteropRuntime.cs Removes sample JNI runtime.
external/​Java.Interop/​samples/​Hello-NativeAOTFromJNI/​java/​net/​dot/​jni/​hello/​JavaInteropRuntime.java Removes Java runtime bridge.
external/​Java.Interop/​samples/​Hello-NativeAOTFromJNI/​java/​net/​dot/​jni/​hello/​App.java Removes Java sample application.
external/​Java.Interop/​samples/​Hello-NativeAOTFromJNI/​Hello-NativeAOTFromJNI.targets Removes sample publish/run targets.
external/​Java.Interop/​samples/​Hello-NativeAOTFromJNI/​Hello-NativeAOTFromJNI.csproj Removes sample project.
external/​Java.Interop/​samples/​Hello-NativeAOTFromJNI/​App.cs Removes sample JNI callback.
external/​Java.Interop/​Java.Interop.slnx Removes the deleted timing project entry.
external/​Java.Interop/​build-tools/​automation/​templates/​core-tests.yaml Removes sample steps and parameter.

🧠 Review effort: Balanced

@simonrozsival
simonrozsival enabled auto-merge (squash) October 14, 2026 15:30
@simonrozsival simonrozsival added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Oct 14, 2026
@simonrozsival
simonrozsival merged commit 449b6a1 into main Oct 14, 2026
41 checks passed
@simonrozsival
simonrozsival deleted the simonrozsival-remove-desktop-interop-leftovers branch October 14, 2026 18:12
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants