Skip to content

Conversation

atsushieno
Copy link
Contributor

Somehow the latest class-parse gives more parameter names on api-26
(we have no idea what caused that). That somehow resulted in some
event generation related breakage, which is also fixed in this change.

…ata.

Somehow the latest class-parse gives more parameter names on api-26
(we have no idea what caused that). That somehow resulted in some
event generation related breakage, which is also fixed in this change.
@jonpryor
Copy link
Contributor

build

@jonpryor
Copy link
Contributor

The build fails due to ABI breakage:

<h3>Type Changed: Android.App.FragmentManager</h3>
<p>Modified methods:</p>
<pre>
<div data-is-breaking>  public abstract void RegisterFragmentLifecycleCallbacks (FragmentManager.FragmentLifecycleCallbacks <span class='removed removed-inline removed-breaking-inline'>p0</span> <span class='added '>cb</span>, bool <span class='removed removed-inline removed-br
eaking-inline'>p1</span> <span class='added '>recursive</span>)
</div><div data-is-breaking>    public abstract void UnregisterFragmentLifecycleCallbacks (FragmentManager.FragmentLifecycleCallbacks <span class='removed removed-inline removed-breaking-inline'>p0</span> <span class='added '>cb</span>)
</div></pre>

...which is ignorable, but if I search for >Remove instead of data-is-breaking, I find:

<h3>Type Changed: Android.Content.PM.PackageManager</h3>
<p>Removed methods:</p>
<pre>
        <span class='removed removed-method breaking' data-is-breaking>public virtual PackageInfo GetPackageInfo (VersionedPackage, int);</span>
        <span class='removed removed-method breaking' data-is-breaking>public virtual System.Collections.Generic.IList&lt;SharedLibraryInfo&gt; GetSharedLibraries (int);</span>
</pre>
...
<h3>Removed Type <span class='breaking' data-is-breaking>Android.Media.MediaCas.EventEventArgs</span></h3>
...
<h3>Type Changed: Android.Media.MediaPlayer.DrmInfoEventArgs</h3>
<p>Removed properties:</p>
<pre>
        <span class='removed removed-property breaking' data-is-breaking>public MediaPlayer P0 { get; }</span>
        <span class='removed removed-property breaking' data-is-breaking>public MediaPlayer.DrmInfo P1 { get; }</span>
</pre>

<h3>Type Changed: Android.Media.MediaPlayer.DrmPreparedEventArgs</h3>
<p>Removed properties:</p>
<pre>
        <span class='removed removed-property breaking' data-is-breaking>public MediaPlayer P0 { get; }</span>
        <span class='removed removed-property breaking' data-is-breaking>public int P1 { get; }</span>
</pre>
...
<h3>Type Changed: Android.Media.MediaPlayer.IOnDrmPreparedListener</h3>
<p>Removed method:</p>
<pre>
        <span class='removed removed-method breaking' data-is-breaking>public virtual void OnDrmPrepared (MediaPlayer, int);</span>
</pre>
...
<h3>Type Changed: Android.Views.View.CapturedPointerEventArgs</h3>
<p>Removed properties:</p>
<pre>
        <span class='removed removed-property breaking' data-is-breaking>public View P0 { get; }</span>
        <span class='removed removed-property breaking' data-is-breaking>public MotionEvent P1 { get; }</span>
</pre>
...

...which is much scarier, and to be expected. (Doh!)

jonpryor added a commit to xamarin/xamarin-android-api-compatibility that referenced this pull request Sep 25, 2017
Context: dotnet/android#893 (comment)

The initial API-26 import didn't have ideal parameter names, as the
Android API documentation wasn't available, and the original API-26
`android.jar` wasn't compiled with `javac -parameters`, which
preserves parameter name information within the `.class` files.

This has apparently since changed: `class-parse` is now able to
extract parameter name information (perhaps an older `class-pasrse`
was previously used?), which allows us to get useful parameter names
for a large number of members instead of `p0`/`p1`/etc.

Since parameter names are used as `*EventArgs` member names, changing
parameter names can cause a large "ripple effect" in bindings.

xamarin-android PR #893 updates the `api-26.xml.in` file which
produces the v8.0 binding, including parameter name improvments.

Update `reference/Mono.Android.xml` to track the updated parameter
name information.
jonpryor pushed a commit that referenced this pull request Sep 25, 2017
Somehow the latest class-parse gives more parameter names on api-26
(we have no idea what caused that). That somehow resulted in some
event generation related breakage, which is also fixed in this change.
@jonpryor
Copy link
Contributor

Merged manually via commit 9608ea7.

@jonpryor jonpryor closed this Sep 25, 2017
jonpryor added a commit to xamarin/xamarin-android-api-compatibility that referenced this pull request Sep 25, 2017
Context: dotnet/android#893 (comment)

The initial API-26 import didn't have ideal parameter names, as the
Android API documentation wasn't available, and the original API-26
`android.jar` wasn't compiled with `javac -parameters`, which
preserves parameter name information within the `.class` files.

This has apparently since changed: `class-parse` is now able to
extract parameter name information (perhaps an older `class-pasrse`
was previously used?), which allows us to get useful parameter names
for a large number of members instead of `p0`/`p1`/etc.

Since parameter names are used as `*EventArgs` member names, changing
parameter names can cause a large "ripple effect" in bindings.

xamarin-android PR #893 updates the `api-26.xml.in` file which
produces the v8.0 binding, including parameter name improvments.

Update `reference/Mono.Android.xml` to track the updated parameter
name information.
jonpryor pushed a commit to jonpryor/xamarin-android that referenced this pull request Sep 25, 2017
Somehow the latest class-parse gives more parameter names on api-26
(we have no idea what caused that). That somehow resulted in some
event generation related breakage, which is also fixed in this change.
jonpryor pushed a commit that referenced this pull request Sep 25, 2017
Somehow the latest class-parse gives more parameter names on api-26
(we have no idea what caused that). That somehow resulted in some
event generation related breakage, which is also fixed in this change.
cobey added a commit that referenced this pull request Sep 25, 2017
[Mono.Android] Regenerated api-26.xml.in update metadata (#893)
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants