You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
Nested Package-Private types should not be bound #572
This is a simple change, but it breaks a test that seems to be asserting that we need to bind these classes/interfaces. It looks like the scenario is that the base class is package-private but there is a public class that inherits it. This is not a valid scenario in C# (and would require us to generate the base class even though it's "private").
A new Preview version of Xamarin.Android has now been published that includes the fix for this item. The fix is not yet included in a Release version. I will update this again when a Release version is available that includes the fix.
Fix included in Xamarin.Android 10.2.100.7 and 10.3.0.33.
Fix included on macOS in Visual Studio 2019 for Mac version 8.6 Preview 1. To try the Preview version that includes the fix, check for the latest updates on the Previewupdater channel.
Fix included on macOS in Visual Studio 2019 for Mac version 8.6. To get the new version that includes the fix, check for the latest updates on the Stableupdater channel.
Activity
moljac commentedon Feb 18, 2020
@jpobst
api.xml
api.zip
jpobst commentedon Feb 18, 2020
This is because the interface does not have any access modifiers, so
class-parsemarks it asvisibility="".generatortreatsvisibility=""aspublic:https://github.com/xamarin/java.interop/blob/master/tools/generator/Java.Interop.Tools.Generator.ObjectModel/GenBase.cs#L864
This is a simple change, but it breaks a test that seems to be asserting that we need to bind these classes/interfaces. It looks like the scenario is that the base class is
package-privatebut there is apublicclass that inherits it. This is not a valid scenario in C# (and would require us to generate the base class even though it's "private").https://github.com/xamarin/java.interop/blob/master/tests/generator-Tests/expected/AccessModifiers/AccessModifiers.xml#L8-L27
jpobst commentedon Feb 18, 2020
It looks like we have handled this case for:
publicclasses inheritingpackage-privateclasses: [generator] better support for "package-private" classes #223publicinterfaces inheritingpackage-privateinterfaces: [generator] better support for package-private interfaces #471This case is not handled because it is a
publicclass inheriting apackage-privateinterface.Assigning to @gugavaro since he did #471.
jpobst commentedon Feb 18, 2020
Never mind, the issue is we don't run the
package-privatetype removal code on nested types. I'll fix that.[-]Package-Private interfaces appear to be bound?[/-][+]Nested Package-Private types should not be bound[/+][generator] Do not generate bindings for package-private nested types […
[generator] Do not generate bindings for package-private nested types […
jpobst commentedon Feb 19, 2020
/azp run
[generator] Do not generate bindings for package-private nested types […
[generator] Do bind package-private nested types (#575)
Bump to xamarin/java.interop/master@4f47ec82 (#4307)
[generator] Do bind package-private nested types (#575)
Bump to xamarin/java.interop/d16-6@178e8491 (#4307)
brendanzagaeski commentedon Mar 27, 2020
Release status update
A new Preview version of Xamarin.Android has now been published that includes the fix for this item. The fix is not yet included in a Release version. I will update this again when a Release version is available that includes the fix.
Fix included in Xamarin.Android 10.2.100.7 and 10.3.0.33.
Fix included on Windows in Visual Studio 2019 version 16.6 Preview 1 and higher. To try the Preview version that includes the fix, check for the latest updates in Visual Studio Preview.)
Fix included on macOS in Visual Studio 2019 for Mac version 8.6 Preview 1. To try the Preview version that includes the fix, check for the latest updates on the Preview updater channel.
brendanzagaeski commentedon May 20, 2020
Release status update
A new Release version of Xamarin.Android has now been published that includes the fix for this item.
Fix included in Xamarin.Android 10.3.1.0.
Fix included on Windows in Visual Studio 2019 version 16.6. To get the new version that includes the fix, check for the latest updates or install the latest version from https://visualstudio.microsoft.com/downloads/.
Fix included on macOS in Visual Studio 2019 for Mac version 8.6. To get the new version that includes the fix, check for the latest updates on the Stable updater channel.
[generator] Do bind package-private nested types (#575)