Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Commit

Permalink
Inter-API & Reference API changes for mono:2018-04
Browse files Browse the repository at this point in the history
Context: dotnet/android#1503
Context: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/1126/
Context: mono/mono@ca9cbdc

The [bump to mono:2018-04][0] introduced two "incompatible" changes
which impact our API Compatibility checks:

 1. `mono-api-html.exe` behavior has changed, and
 2. `System.String.Concat(object, object, object, object)` was
    removed.

`mono-api-html.exe` from mono:2018-02 and before had a bug wherein it
didn't properly handle nested types.  The immediate affect of this was
that the `Android.App.Notification.Icon` property change which was
handled/ignored in `inter-api-extra-v5.1-v6.0.txt` was seemingly
ignored, resulting in an API compatibility failure:

	<h1>### API BREAK BETWEEN v5.1 and v6.0</h1>
	<h3>Type Changed: Android.App.Notification.Action.Action</h3>
	<p>Modified properties:</p>
	<pre>
	<div data-is-breaking>  public <span class='removed removed-inline removed-breaking-inline'>int</span> <span class='added '>Android.Graphics.Drawables.Icon</span> Icon { get; <span class='removed removed-inline removed-breaking-inline'>set;</span>
 }
	</div></pre>

Note that the `mono-api-html` output here is still somewhat buggy:
*there is no* `Android.App.Notification.Action.Action` type -- nested
type names appear to be duplicated now, instead of skipped entirely --
so it's possible that future `mono-api-html` changes may break us.

Other errors were being reported as well [^0], all of which are
*reasonable and correct* but weren't needed with mono:2018-02's
`mono-api-html`, which is...worrying, but ¯\_(ツ)_/¯.

The `System.String.Concat(object, object, object, object)` removal is
a bit of a misnomer: *there is no* `String.Concat()` method which
takes four `object` parameters.  There *was* a `String.Concat()`
method which took *three* `object` parameters and an `__arglist`
parameter, and the `__arglist`-including overload was removed because
[it was deemed safe to remove][1]:

> @mark-safar: I let the change in because it believe it's safe to
> remove (I don't think our AOT compiler support that fully either).

[^0]: Brief summary of most "new" changes which `mono-api-html` from
      mono:2018-02 didn't need but are reported with mono:2018-04:

	<h1>### API BREAK BETWEEN v4.3 and v4.4</h1>
	<h3>Type Changed: Android.Media.RemoteControlClient.MetadataEditor</h3>
	<p>Modified base type:</p>
	<pre>
	<div data-is-breaking>  <span class='removed removed-inline removed-breaking-inline'>Java.Lang.Object</span> <span class='added '>Android.Media.MediaMetadataEditor</span>
	</div></pre>

	<h3>Type Changed: Android.Views.Surface.OutOfResourcesException</h3>
	<p>Modified base type:</p>
	<pre>
	<div data-is-breaking>  <span class='removed removed-inline removed-breaking-inline'>Java.Lang.Exception</span> <span class='added '>Java.Lang.RuntimeException</span>
	</div></pre>

	<h3>Type Changed: Java.Lang.ClassNotFoundException</h3>
	<p>Modified base type:</p>
	<pre>
	<div data-is-breaking>  <span class='removed removed-inline removed-breaking-inline'>Java.Lang.Exception</span> <span class='added '>Java.Lang.ReflectiveOperationException</span>
	</div></pre>

	<h3>Type Changed: Java.Lang.IllegalAccessException</h3>
	<p>Modified base type:</p>
	<pre>
	<div data-is-breaking>  <span class='removed removed-inline removed-breaking-inline'>Java.Lang.Exception</span> <span class='added '>Java.Lang.ReflectiveOperationException</span>
	</div></pre>

	<h3>Type Changed: Java.Lang.InstantiationException</h3>
	<p>Modified base type:</p>
	<pre>
	<div data-is-breaking>  <span class='removed removed-inline removed-breaking-inline'>Java.Lang.Exception</span> <span class='added '>Java.Lang.ReflectiveOperationException</span>
	</div></pre>

	<h3>Type Changed: Java.Lang.NoSuchFieldException</h3>
	<p>Modified base type:</p>
	<pre>
	<div data-is-breaking>  <span class='removed removed-inline removed-breaking-inline'>Java.Lang.Exception</span> <span class='added '>Java.Lang.ReflectiveOperationException</span>
	</div></pre>

	<h3>Type Changed: Java.Lang.NoSuchMethodException</h3>
	<p>Modified base type:</p>
	<pre>
	<div data-is-breaking>  <span class='removed removed-inline removed-breaking-inline'>Java.Lang.Exception</span> <span class='added '>Java.Lang.ReflectiveOperationException</span>
	</div></pre>

	<h3>Type Changed: Java.Lang.Reflect.InvocationTargetException</h3>
	<p>Modified base type:</p>
	<pre>
	<div data-is-breaking>  <span class='removed removed-inline removed-breaking-inline'>Java.Lang.Exception</span> <span class='added '>Java.Lang.ReflectiveOperationException</span>
	</div></pre>

	<h1>### API BREAK BETWEEN v4.4.87 and v5.0</h1>
	<h3>Type Changed: Android.OS.Bundle</h3>
	<p>Modified base type:</p>
	<pre>
	<div data-is-breaking>  <span class='removed removed-inline removed-breaking-inline'>Java.Lang.Object</span> <span class='added '>Android.OS.BaseBundle</span>
	</div></pre>

	<h1>### API BREAK BETWEEN v5.1 and v6.0</h1>
	<h3>Type Changed: Android.App.Notification.Action.Action</h3>
	<p>Modified properties:</p>
	<pre>
	<div data-is-breaking>  public <span class='removed removed-inline removed-breaking-inline'>int</span> <span class='added '>Android.Graphics.Drawables.Icon</span> Icon { get; <span class='removed removed-inline removed-breaking-inline'>set;</span> }
	</div></pre>

[0]: dotnet/android#1503
[1]: dotnet/android#2051 (comment)
  • Loading branch information
jonpryor committed Aug 14, 2018
1 parent ea6a8a7 commit c550d1b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
8 changes: 8 additions & 0 deletions inter-api-extra-v4.3-v4.4.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-r "Android.Media.RemoteControlClient.MetadataEditor: Modified base type: 'Java.Lang.Object' to 'Android.Media.MediaMetadataEditor'"
-r "Android.Views.Surface.OutOfResourcesException: Modified base type: 'Java.Lang.Exception' to 'Java.Lang.RuntimeException'
-r "Java.Lang.ClassNotFoundException: Modified base type: 'Java.Lang.Exception' to 'Java.Lang.ReflectiveOperationException'"
-r "Java.Lang.IllegalAccessException: Modified base type: 'Java.Lang.Exception' to 'Java.Lang.ReflectiveOperationException'"
-r "Java.Lang.InstantiationException: Modified base type: 'Java.Lang.Exception' to 'Java.Lang.ReflectiveOperationException'"
-r "Java.Lang.NoSuchFieldException: Modified base type: 'Java.Lang.Exception' to 'Java.Lang.ReflectiveOperationException'"
-r "Java.Lang.NoSuchMethodException: Modified base type: 'Java.Lang.Exception' to 'Java.Lang.ReflectiveOperationException'"
-r "Java.Lang.Reflect.InvocationTargetException: Modified base type: 'Java.Lang.Exception' to 'Java.Lang.ReflectiveOperationException'"
1 change: 1 addition & 0 deletions inter-api-extra-v4.4.87-v5.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-r "Android.OS.Bundle: Modified base type: 'Java.Lang.Object' to 'Android.OS.BaseBundle'"
2 changes: 1 addition & 1 deletion inter-api-extra-v5.1-v6.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
-r "^Android.Graphics.Drawables.InsetDrawable: Modified base type: 'Android.Graphics.Drawables.Drawable' to 'Android.Graphics.Drawables.DrawableWrapper'"
-r "^Android.Graphics.Drawables.RotateDrawable: Modified base type: 'Android.Graphics.Drawables.Drawable' to 'Android.Graphics.Drawables.DrawableWrapper'"
-r "^Android.Graphics.Drawables.ScaleDrawable: Modified base type: 'Android.Graphics.Drawables.Drawable' to 'Android.Graphics.Drawables.DrawableWrapper'"
-r "^Android.App.Notification: Modified properties: public int Icon { get; set; }"
-r "^Android.App.Notification.Action: Modified properties: public int Icon { get; set; }"
17 changes: 1 addition & 16 deletions reference/mscorlib.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18995,21 +18995,6 @@
<parameter name="str2" position="2" attrib="0" type="System.String" />
</parameters>
</method>
<method name="Concat(System.Object, System.Object, System.Object, System.Object)" attrib="150" static="true" returntype="System.String">
<attributes>
<attribute name="System.CLSCompliantAttribute">
<properties>
<property name="IsCompliant" value="False" />
</properties>
</attribute>
</attributes>
<parameters>
<parameter name="arg0" position="0" attrib="0" type="System.Object" />
<parameter name="arg1" position="1" attrib="0" type="System.Object" />
<parameter name="arg2" position="2" attrib="0" type="System.Object" />
<parameter name="arg3" position="3" attrib="0" type="System.Object" />
</parameters>
</method>
<method name="Concat(System.String, System.String, System.String, System.String)" attrib="150" static="true" returntype="System.String">
<attributes>
<attribute name="System.Security.SecuritySafeCriticalAttribute" />
Expand Down Expand Up @@ -114855,4 +114840,4 @@
</namespace>
</namespaces>
</assembly>
</assemblies>
</assemblies>

0 comments on commit c550d1b

Please sign in to comment.