Uh oh!
There was an error while loading. Please reload this page.
[Mono.Android] Enumify, stabilize API-37.2 - #12633
Conversation
Context: 1162306 Context: https://github.com/jpobst/BindingStudio Context: dotnet#10005 Commit 1162306 mentioned: > Step 1: bind it! > Step 2: Enumify it, make stable. This is Step 2 for API-37.2. Use jpobst/BindingStudio to enumify API-37.2. Note: current dotnet/java-interop emits an "extra" `,` on `map.csv` output, which would make for a "noisy" diff (every line changed!). The diff size is reduced by removing trailing commas: tr -d '\r' < src/Mono.Android/map.csv > src/Mono.Android/new-map.csv sed 's/,$//' < src/Mono.Android/new-map.csv > src/Mono.Android/map.csv This keeps the diff to a reasonable size. Sanity check: during enumification, this should have no matches: git grep '\.[A-Z][a-z]\.' src/Mono.Android/map.csv Two-letter namespace parts should be all upper-case. TODO (lol): update `map.csv` to current BindingStudio output after this is merged. Additionally, rename the following Java package parts: * `contentsafety` => `ContentSafety` * `personalcontext` => `PersonalContext` * `multisensory` => `MultiSensory` * `authenticationpolicy` => `AuthenticationPolicy` For example, Java `android.service.personalcontext` becomes C# `Android.Service.PersonalContext`. Furthermore, for "methodmap.csv", BindingStudio emits JNI names with `/` as the package-part separator, not Java names with `.` as the separator. Please remember the instructions to manually fix this as mentioned in `HowToAddNewApiLevel.md`. Finally (?), as *mentioned* in `HowToAddNewApiLevel`, update manifest-attribute-codegen by running: ./dotnet-local.sh build -t:GenerateManifestAttributes build-tools/manifest-attribute-codegen/manifest-attribute-codegen.csproj
b66a05e to
6c6ea8eComparejonathanpeppers
commented
Sep 2, 2026
/review |
✅ Android PR Reviewer completed successfully!
|
There was a problem hiding this comment.
❌ Reject
Found 3 errors affecting generated/public API shape:
manifest-definition.xmlwas regenerated from an incomplete platform history, rewriting legacy introduction levels to API 35 and dropping older-only entries.- Four new enum families use namespace casing inconsistent with their existing bound packages.
InsightBranding.Builder.setColor()uses the icon discriminator enum instead of the color discriminator enum.
The enumification coverage and updated workflow guidance are otherwise useful, but these generated API defects need correction before merge.
CI: Azure build #1577851 is red; the only failing surfaced lane is MAUI Tests MAUI Integration, while the remaining 42 checks pass. Detailed Azure timeline access was unavailable in this runner, so I could not determine whether that lane is related to this PR.
Generated by Android PR Reviewer for #12633 · gpt56 · 247 AIC · ⌖ 9.18 AIC · ⊞ 25.7K
Comment /review to run again
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Regenerate manifest definitions with all historical SDK platforms and restore metadata for legacy-only attributes. Keep new enum namespaces consistent with existing bindings and use the correct InsightBranding color discriminator. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4300e551-3e6c-494d-8670-9abb460aea7d
jonathanpeppers
commented
Sep 2, 2026
/review |
✅ Android PR Reviewer completed successfully!
|
There was a problem hiding this comment.
⚠️ Needs Changes
Found 1 error, 2 warnings, and 1 suggestion. The main blocker is the missed SelectionPosition.Builder.setOffsetType enumification; the 37.2 stability fallback and KeyPair public type casing should also be corrected before this API becomes stable. The generated method map still contains several exact duplicates despite the newly documented uniq step.
The package-name normalization and expanded API 37.2 mapping coverage are otherwise well-scoped. Azure build #1579370 is still in progress; no check had failed when reviewed.
Generated by Android PR Reviewer for #12633 · gpt56 · 368.7 AIC · ⌖ 23.5 AIC · ⊞ 25.7K
Comment /review to run again
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Keep the standalone stability fallback aligned with API 37.2, complete matching enum mappings, remove duplicate generated rows, and use consistent KeyPair casing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4300e551-3e6c-494d-8670-9abb460aea7d
jonathanpeppers
commented
Sep 2, 2026
/review |
✅ Android PR Reviewer completed successfully!
|
There was a problem hiding this comment.
❌ Reject
Found 2 errors in methodmap.csv: all 247 API 37.2 additions retain BindingStudio action columns that the generator parser does not support, and screenBrightnessUnit is encoded as a method parameter rather than a field mapping. Together these leave the intended enumifications unapplied while this PR marks API 37.2 stable.
The namespace normalization, constant mappings, and workflow guidance are otherwise useful and well scoped.
CI: Azure build #1579514 is still in progress. Two surfaced checks have passed, six are running, one is queued, and none has failed; detailed Azure status was unavailable because the runner could not initialize its Azure CLI profile.
Generated by Android PR Reviewer for #12633 · gpt56 · 201.2 AIC · ⌖ 20.2 AIC · ⊞ 25.7K
Comment /review to run again
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Convert BindingStudio action rows to the six-column method-map format consumed by the generator, correct the screenBrightnessUnit field mapping, and document the required normalization step. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4300e551-3e6c-494d-8670-9abb460aea7d
jonathanpeppers
commented
Sep 2, 2026
/review |
✅ Android PR Reviewer completed successfully! Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "azcliprod.blob.core.windows.net"See Network Configuration for more information.
|
There was a problem hiding this comment.
⚠️ Needs Changes
Found 1 warning: InsightActionDetailsActionType is generated as a regular enum even though its ACTION_HAS_* values form the bitmask returned by getActionTypes(). Marking that enum family as flags will keep the newly stable managed API faithful to the platform.
The namespace normalization, corrected six-column method mappings, and getter/setter enum coverage otherwise look consistent.
CI: Azure build #1579627 is still in progress. Three surfaced checks have passed, five are running, one is queued, and none has failed.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
azcliprod.blob.core.windows.net
To allow these domains, add them to the network.allowed list in your workflow frontmatter:
network:
allowed:
- defaults
- "azcliprod.blob.core.windows.net"See Network Configuration for more information.
Generated by Android PR Reviewer for #12633 · gpt56 · 349.6 AIC · ⌖ 8.86 AIC · ⊞ 25.7K
Comment /review to run again
Uh oh!
There was an error while loading. Please reload this page.
Generate InsightActionDetailsActionType as a flags enum because the platform combines its independent action bits. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4300e551-3e6c-494d-8670-9abb460aea7d
jonathanpeppers
commented
Sep 3, 2026
/review |
✅ Android PR Reviewer completed successfully!
|
There was a problem hiding this comment.
⚠️ Needs Changes
Found 1 suggestion in the documented method-map workflow: rerunning the append-based process can introduce non-adjacent duplicates that the subsequent uniq command cannot remove.
The API 37.2 enum mappings, namespace replacements, stability pointers, and revision-qualified manifest metadata are otherwise internally consistent, and the defects raised by earlier reviews are fixed.
CI: Azure build #1579652 is red: 41 of 44 checks pass, while MAUI Tests MAUI Integration, Windows > Build & Smoke Test, and the aggregate dotnet-android check fail. Detailed Azure timeline access was unavailable in this runner, so I could not attribute those failures to this PR; CI must be investigated before merge.
Generated by Android PR Reviewer for #12633 · gpt56 · 428.9 AIC · ⌖ 8.94 AIC · ⊞ 25.7K
Comment /review to run again
| sed 's/^E,//;s,/,.,g;s/\$/./g' > src/Mono.Android/new-methodmap2.csv | ||
| ``` | ||
| Copy the contents of `new-methodmap2.csv` and *append* to `src/Mono.Android/methodmap.csv`. |
There was a problem hiding this comment.
🤖 💡 Documentation — Appending the generated block makes this workflow non-idempotent: rerunning it for the same API appends the same mappings again, and the uniq command below only removes adjacent duplicates, so it will not remove a duplicated block. Please either replace the existing API-level block or use an order-preserving whole-file deduplication step after appending.
Rule: Generation workflows should be repeatable
There was a problem hiding this comment.
I think this is fine, it's a doc.
jonathanpeppers
commented
Sep 3, 2026
We can ignore |
Uh oh!
There was an error while loading. Please reload this page.
Context: 1162306
Context: https://github.com/jpobst/BindingStudio
Context: #10005
Commit 1162306 mentioned:
This is Step 2 for API-37.2.
Use jpobst/BindingStudio to begin enumifying API-37.2.
Note: current dotnet/java-interop emits an "extra"
,onmap.csvoutput, which would make for a "noisy" diff (every line changed!). The diff size is reduced by removing trailing commas:This keeps the diff to a reasonable size.
Sanity check: during enumification, this should have no matches:
Two-letter namespace parts should be all upper-case.
TODO (lol): update
map.csvto current BindingStudio output after this is merged.Additionally, rename the following Java package parts:
contentsafety=>ContentSafetypersonalcontext=>PersonalContextmultisensory=>MultiSensoryauthenticationpolicy=>AuthenticationPolicyFor example, Java
android.service.personalcontextbecomes C#Android.Service.PersonalContext.Pull Request
title and
description
should follow the
commit-messages.mdworkflow documentation, and in particular should include: