Repository navigation
[Java.Interop] Remove unused parameter-name importer - #13113
Merged
Merged
Conversation
Context: #10438 Context: dotnet/java-interop#560 param-name-importer generated checked-in Java parameter descriptions when maintainers added Android API levels. Java.Interop integrated the older xamarin-android-docimporter-ng tool under this name in January 2020. Android added an explicit GenerateParamsFile invocation in May 2024, in #8948. On September 12, 2025, #10438 replaced that invocation with java-source-utils.jar. The Irony-based importer failed to parse API-CANARY java/lang/Character.java, reporting an invalid apostrophe. The Java replacement already supported the same parameter-name text format. The project reference, standalone utility, and stale build documentation remained after the switch. Remove the legacy utility and HTML resources, retained build and solution references, SgmlReader package pin, signing entry, and notice. Update related documentation. Keep the active Java generator, shared parser libraries, checked-in parameter files, and their consumers. The API-generation project and Java.Interop solution build. Active Java generator, JavaSource, and focused parameter tests pass; API 36 parameter generation succeeds. The full solution compiles, but local workload setup fails on a missing API 37.1 Mono.Android.dll. The wider bytecode suite also reports an unchanged module-info fixture mismatch. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The third-party notice TOC omits the existing Kajabity license section and must be corrected before merge.
1 open finding
What changed in this PR
Removes the obsolete param-name-importer after parameter generation moved to java-source-utils.
Changes:
- Deletes the importer implementation, resources, script, and documentation.
- Removes obsolete build, solution, signing, and package references.
- Updates workflow documentation and third-party notices.
| File | Description |
|---|---|
THIRD-PARTY-NOTICES.TXT |
Removes SgmlReader notice and renumbers entries. |
external/Java.Interop/tools/param-name-importer/strict.dtd |
Deletes obsolete HTML DTD. |
external/Java.Interop/tools/param-name-importer/README.md |
Deletes importer documentation. |
external/Java.Interop/tools/param-name-importer/Program.cs |
Deletes importer entry point. |
external/Java.Interop/tools/param-name-importer/param-name-importer.csproj |
Deletes the tool project. |
external/Java.Interop/tools/param-name-importer/JavaStubSourceImporter.cs |
Deletes Java-stub importer. |
external/Java.Interop/tools/param-name-importer/JavaApiParameterNamesExporter.cs |
Deletes legacy exporters. |
external/Java.Interop/tools/param-name-importer/ImporterOptions.cs |
Deletes importer options. |
external/Java.Interop/tools/param-name-importer/HTMLsymbol.ent |
Deletes HTML symbol entities. |
external/Java.Interop/tools/param-name-importer/HTMLspecial.ent |
Deletes HTML special entities. |
external/Java.Interop/tools/param-name-importer/HtmlLoader.cs |
Deletes SGML-based HTML loader. |
external/Java.Interop/tools/param-name-importer/HTMLlat1.ent |
Deletes Latin-1 entities. |
external/Java.Interop/tools/param-name-importer/generate.sh |
Deletes legacy generation script. |
external/Java.Interop/tools/param-name-importer/DroidDocImporter.cs |
Deletes DroidDoc importer. |
external/Java.Interop/tools/param-name-importer/DealingWithJavaApiDescription.md |
Deletes stale parser documentation. |
external/Java.Interop/Java.Interop.slnx |
Removes importer project entry. |
external/Java.Interop/Directory.Build.targets |
Removes SgmlReader package version. |
Documentation/workflow/HowToAddNewApiLevel.md |
Documents java-source-utils usage. |
build-tools/create-packs/SignList.xml |
Removes SgmlReader signing entry. |
build-tools/create-android-api/create-android-api.csproj |
Removes importer project reference. |
.github/skills/update-tpn/SKILL.md |
Removes SgmlReader inventory entry. |
.github/instructions/java-interop.instructions.md |
Removes importer from tool inventory. |
🧠 Review effort: Balanced
jonathanpeppers
approved these changes
Oct 13, 2026
Preserve upstream CRC32.NET removal and this PR's SgmlReader removal, then renumber the surviving notice entries. Retain all upstream Java.Interop changes, including removal of native support sources. The API-generation project and Java.Interop solution build successfully. JavaSource tests pass (41 tests), and the current Java parameter generator RunTests target succeeds with its existing 18-test results up to date. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
simonrozsival
enabled auto-merge (squash)
October 13, 2026 13:57
Member
Author
|
@dalexsoto stamp |
rolfbjarne
approved these changes
Oct 13, 2026
Member
Author
|
@dalexsoto stamp |
dalexsoto
approved these changes
Oct 13, 2026
dalexsoto
left a comment
Member
There was a problem hiding this comment.
Stamping as requested by @simonrozsival; no code review performed.
jonathanpeppers
added a commit
that referenced
this pull request
Oct 13, 2026
Fixes #13117. Follow-up to #13113. ## Changes Replace the vendored Kajabity reader with a compact, in-tree Java-properties helper and migrate the SDK/JDK installer consumers to dictionaries. Preserve Latin-1 decoding, escaped keys/values, continuations, duplicate-key handling, and legacy quirks such as permissive Unicode digits and trailing-backslash behavior. Remove all four Kajabity types, their third-party notice, the stale Guardian/analysis suppressions, and the now-unused `System.Text.Encoding.CodePages` package/version property. Add parsing and SDK/JDK discovery regression tests. `AndroidUtilities.ReadAndroidProperties()` now returns `Dictionary<string, string>` instead of the removed third-party type. Malformed escapes retain the logged, resource-backed `InvalidOperationException` wrapper, with `FormatException` replacing the deleted custom inner exception. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
21 of 23 tasks
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.

param-name-importerwas deliberately replaced in the Android API-generation workflow on September 12, 2025, in #10438, commit35d471e. Its source, build references, dependency, and stale documentation remained after the replacement.Historical use and replacement
The importer was an API-maintenance tool: maintainers used it to extract Java method parameter names from DroidDoc HTML or Android SDK
android-stubs-src.jarfiles, then checked the resultingapi-*.params.txtfiles intosrc/Mono.Android/Profiles/.class-parsestill consumes those files; this change does not remove or change them.xamarin-android-docimporter-ngutility under the nameparam-name-importer.c993dee, added theGenerateParamsFiletarget, which invokedparam-name-importer.dllexplicitly.java-source-utils.jar.The replacement was necessary because the importer's Irony-based Java parser could not parse API-CANARY's
java/lang/Character.java, reporting:The replacement PR explicitly explains that
java-source-utils.jarhas a better Java parser and can already emit the same parameter-name text format. Its diff removes the importer invocation and replaces it withjava -jar java-source-utils.jar --output-params ....Immediately after that replacement, the Android repository's only remaining references outside the then-Java.Interop submodule were the project reference and documentation saying to build the tool. No subsequent invocation was restored in the current history. The old standalone generation script remained inside Java.Interop; this change retires that legacy/manual route as well.
Changes
Microsoft.Xml.SgmlReaderpackage pin,SgmlReaderDll.dllsigning entry, and SgmlReader third-party notice; renumber the remaining notice entries.The active
GenerateParamsFile,_ClassParse, andGenerateApiDescriptiontargets are unchanged. Shared JavaSource/parser libraries and their tests remain. No tracked importer or SgmlReader references remain, and restored dependency graphs no longer containMicrosoft.Xml.SgmlReader.Local validation
dotnet build build-tools/create-android-api/create-android-api.csproj -v minimaldotnet build external/Java.Interop/Java.Interop.slnx -v minimaldotnet build external/Java.Interop/tools/java-source-utils/java-source-utils.csproj -t:RunTests -v minimaldotnet test external/Java.Interop/tests/Java.Interop.Tools.JavaSource-Tests/Java.Interop.Tools.JavaSource-Tests.csproj -v minimaldotnet test external/Java.Interop/tests/Xamarin.Android.Tools.Bytecode-Tests/Xamarin.Android.Tools.Bytecode-Tests.csproj --no-build -v minimal --filter 'FullyQualifiedName~ParameterFixupTests|FullyQualifiedName~KotlinFixupsTests'./dotnet-local.sh build build-tools/create-android-api/create-android-api.csproj -t:GenerateParamsFile -p:ParamApiLevel=36 -v minimalgit diff --checkmake prepare && make allConfigureLocalWorkloadphase failed becausebin/Debug/lib/xamarin.android/xbuild-frameworks/Microsoft.Android/37.1/ref/Mono.Android.dllwas missing. Confirmed by replaying the workload-setup binlog; no unrelated workload changes made.dotnet test external/Java.Interop/tests/Xamarin.Android.Tools.Bytecode-Tests/Xamarin.Android.Tools.Bytecode-Tests.csproj -v minimalModuleInfoTests.ClassFileexpected 12 constant-pool entries; its generated fixture contained 13. The test, fixture source, compiler target, and bytecode library are unchanged by this PR.Changed XML parses successfully. The remaining notice sections are preserved and the TOC is consecutively numbered. No issue is being closed, and no new tests are added for the deleted utility.
Pull Request
title and
description
should follow the
commit-messages.mdworkflow documentation, and in particular should include: