Repository navigation
[fix-finder] [generator] Check every base interface when fixing access modifiers - #13854
Open
github-actions[bot] wants to merge 1 commit into
Open
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
Do not stop at a public base interface when copying methods from non-public bases. Otherwise a later package-private base loses its methods from the generated binding. Cover both base-interface orders with a focused regression. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions
Bot
requested review from
jonathanpeppers and
simonrozsival
as code owners
December 1, 2026 01:58
|
Reviewed as a maintainer. This looks correct — no issues found. What I checked:
One harmless observation, not a blocker: the |
Member
|
/azp run Xamarin.Android-PR |
|
No pipelines are associated with this pull request. |
This branch has not been deployed
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.
Problem
InterfaceGen.FixupAccessModifiersstops examining implemented interfaces when it encounters a public base. If a package-private base follows it, its methods are never copied into the derived binding, making the generated API depend on base-interface order.Fix
Remove the premature
breakfromInterfaceGen.csso every base is examined, retaining the existing non-public visibility filter and method deduplication. Add one parameterized regression inInterfaceTests.cscovering both base-interface orders. The owning generator and test projects targetnet11.0with inheritedLangVersion=preview; no new APIs or syntax requirements are introduced.Validation
AndroidSdkDirectory="/home/runner/work/android/android/bin/Debug/android-sdk" AndroidNdkDirectory="/home/runner/work/android/android/bin/Debug/android-ndk" ./build.sh Prepare— passed, zero warnings/errors../dotnet-local.sh test tests/generator-Tests/generator-Tests.csproj -c Debug -v minimal --filter 'FullyQualifiedName~FixupAccessModifiersChecksAllBaseInterfaces'before the fix — reproduced the bug: public-first failed with zero methods instead of one; hidden-first passed../dotnet-local.sh build src/generator/generator.csproj -c Debug -v minimal— passed, zero warnings/errors../dotnet-local.sh test tests/generator-Tests/generator-Tests.csproj -c Debug -v minimal --filter 'FullyQualifiedName~InterfaceTests|FullyQualifiedName~AccessModifiers'after the fix — all six tests passed.git diff --check— passed; working tree clean after commit.Fix-finder metadata
05-general-mistakes25/30(actionability:9, safety:7, scope:9)Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
169.254.169.254To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.