Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dotnet/java-interop
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: df4c5e7c
Choose a base ref
...
head repository: dotnet/java-interop
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4d0cba64
Choose a head ref
  • 3 commits
  • 30 files changed
  • 3 contributors

Commits on May 3, 2021

  1. [Xamarin.Android.Tools.Bytecode] hide Kotlin internal nested types (#827

    )
    
    Fixes: #826
    
    Context: #682
    
    Given the following Kotlin code:
    
    	internal class MyClass {
    	  public interface MyInterface { }
    	}
    
    The default Java representation of this would be:
    
    	public MyClass {
    	  public MyInterface { }
    	}
    
    In order to prevent this from being bound, our Kotlin fixups
    attempted to change the Java representation to:
    
    	private class MyClass {
    	  private interface MyInterface { }
    	}
    
    However there was a bug preventing the internal interface from being
    marked as `private`, because we are setting the visibility on the
    parent type's `InnerClassAccessFlags`, *not* the nested type itself.
    When we output the XML we use use the declaring class'
    `InnerClassAccessFlags`, we instead look at the flags on the nested
    type's `.class` file, which was still `public`:
    
    	<class name="MyClass" visibility="private" … />
    	<class name="MyClass.MyInterface" visibility="public" … />
    
    This would result in a `generator` warning when trying to bind
    `MyClass.MyInterface`, as the parent `MyClass` type is skipped:
    
    	warning BG8604: top ancestor MyClass not found for nested type MyClass.MyInterface
    
    Fix this by finding the appropriate inner class `.class` file and
    updating the access flags there, recursively:
    
    	<class name="MyClass" visibility="private" … />
    	<class name="MyClass.MyInterface" visibility="private" … />
    
    Note: the [`InnerClasses` Attribute][0] for an inner class may
    contain the declaring class.  For example, the `InnerClasses` for
    `InternalClassWithNestedInterface$NestedInterface` contains
    `InternalClassWithNestedInterface$NestedInterface`.
    
    We must thus protect recursive `HideInternalInnerClass()` invocations
    from processing the current type, to avoid infinite recursion.
    
    [0]: https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.6
    jpobst authored May 3, 2021
    Configuration menu
    Copy the full SHA
    4ef5081 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2021

  1. Configuration menu
    Copy the full SHA
    9444570 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2021

  1. [build] target net6.0 instead of netcoreapp3.1 (#829)

    Context: dotnet/android#5891
    Context: dotnet/android@e59f649
    
    xamarin/xamarin-android should imminently be building libraries
    targeting `net6.0` instead of `netcoreapp3.1`.
    
    We should be able to do this now, because Mono 6.12.0.137 supports
    building both .NET 5.0 and .NET 6.0.
    
    Update all appropriate `$(TargetFrameworks)` values so that `net6.0`
    is used instead of `netcoreapp3.1`.
    
    Update `global.json` so that a Prerelease .NET 6 SDK is used, and use
    `boots` to install the preview version of Mono which supports
    targeting `net6.0`.
    jonathanpeppers authored May 5, 2021
    Configuration menu
    Copy the full SHA
    4d0cba6 View commit details
    Browse the repository at this point in the history
Loading