Skip to content

[Xamarin.Android.Tools.Bytecode-Tests] Update for API-24 docs #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2017

Conversation

jonpryor
Copy link
Contributor

The ParameterFixupTests.XmlDeclaration_FixedUpFromDocumentation() and
ParameterFixupTests.XmlDeclaration_FixedUpFromApiXmlDocumentation()
tests read a java.util.Collection.class file that contains no
parameter name information, and uses XML and/or "JavaDoc" HTML
documentation to ascertain the correct parameter names.

For better or worse, parameter names are not part of any Java ABI,
and thus can change over time.

Which is what happened here: these tests were originally written
against the Android documentation for API-18. Since then, the docs for
API-24 have changed the parameter names for the Collection.add(E)
method, changing the parameter name from object to e.

Update the expected paramater names when reading docs from
$ANDROID_SDK_PATH so that the API-24 names are expected.

The `ParameterFixupTests.XmlDeclaration_FixedUpFromDocumentation()` and
`ParameterFixupTests.XmlDeclaration_FixedUpFromApiXmlDocumentation()`
tests read a `java.util.Collection.class` file that contains no
parameter name information, and uses XML and/or "JavaDoc" HTML
documentation to ascertain the correct parameter names.

For better or worse, parameter names are *not* part of any Java ABI,
and thus can change over time.

Which is what happened here: these tests were originally written
against the Android documentation for API-18. Since then, the docs for
API-24 have *changed the parameter names* for the `Collection.add(E)`
method, changing the parameter name from `object` to `e`.

Update the expected paramater names when reading docs from
`$ANDROID_SDK_PATH` so that the API-24 names are expected.
@jonpryor
Copy link
Contributor Author

@atsushieno: Implicit in this PR are two underlying questions:

  1. Should we bother testing Android HTML doc import? I think we should, but perhaps not.
  2. For test purposes, should we be basing parameter names on API-18 or API-24 (or...?)?

Following shortly will be a xamarin-android PR to install docs-24_r01.zip, i.e. API-24 docs, allowing xamarin-android (and monodroid; see https://github.com/xamarin/monodroid/pull/596 ) to actually run the ParameterFixupTests.XmlDeclaration_FixedUpFromDocumentation() tests.

If we feel that we should stick with API-18 docs, then the forthcoming xamarin-android PR will need to instead install docs-18_r01.zip.

I'm not sure it truly matters which API level of documentation we install, but it "feels" better to go for the most recent version.

@atsushieno
Copy link
Contributor

We should be based on the parameter names in newer API documentation because things are usually updated in better way.

You can add tests for those if you want. I believe tests don't make sense but we have a lot of similar tests that don't make sense. We shouldn't cost our productivity mindset.

@atsushieno atsushieno merged commit 8d7060d into dotnet:master Apr 21, 2017
jonpryor added a commit to jonpryor/java.interop that referenced this pull request Dec 16, 2021
Changes: dotnet/android-tools@34e98e2...db125a7

  * dotnet/android-tools@db125a7: [build] Add d17-* as a branch trigger
  * dotnet/android-tools@f2cbc6a: Add resource dlls to MicroBuild signing. (dotnet#145)
  * dotnet/android-tools@35c89dd: Update MaximumCompatibleNDKMajorVersion to be 23 (dotnet#144)
  * dotnet/android-tools@0a22957: [Xamarin.Android.Tools.AndroidSdk] Parse Properties after header (dotnet#143)
  * dotnet/android-tools@dac3a47: [Xamarin.Android.Tools.AndroidSdk] Add API-31 to KnownVersions (dotnet#141)
  * dotnet/android-tools@fc976d8: [Xamarin.Android.Tools.AndroidSdk] Add JdkInfo.GetSupportedJdkInfos() (dotnet#142)
jonpryor added a commit to jonpryor/java.interop that referenced this pull request Mar 14, 2022
Context: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1397171
Context: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1433453

Changes: http://github.com/xamarin/xamarin-android-tools/compare/34e98e2b65917d105169f868b5648f67e68b6784...f4c44e2ac2d91396226f31e8c200464ecc65f648

  * dotnet/android-tools@f4c44e2: [Xamarin.Android.Tools.AndroidSdk] Attributes can be null! (dotnet#158)
  * dotnet/android-tools@f0b3abd: Revert "[Xamarin.Android.Tools.AndroidSdk] Update SDK component for API-32 (dotnet#156)"
  * dotnet/android-tools@bbe85df: [Xamarin.Android.Tools.AndroidSdk] Update SDK component for API-32 (dotnet#156)
  * dotnet/android-tools@a7f4d30: [ci] Mention new NuGet feed and release (dotnet#153)
  * dotnet/android-tools@85ae77f: Merge pull request dotnet#152 from xamarin/dev/mattnorflus/SigningMigration
  * dotnet/android-tools@dd34e54: Adding condition to GetFilesToSign to only include files if build configuration is Release
  * dotnet/android-tools@0e80ea1: Bump LibZipSharp to 2.0.3 (dotnet#151)
  * dotnet/android-tools@d0ab6ac: Fix Typo in commit 0dcf7172 (dotnet#150)
  * dotnet/android-tools@0dcf717: Bump LibZipSharp to 2.0.2 (dotnet#149)
  * dotnet/android-tools@db125a7: [build] Add d17-* as a branch trigger
  * dotnet/android-tools@f2cbc6a: Add resource dlls to MicroBuild signing. (dotnet#145)
  * dotnet/android-tools@35c89dd: Update MaximumCompatibleNDKMajorVersion to be 23 (dotnet#144)
  * dotnet/android-tools@0a22957: [Xamarin.Android.Tools.AndroidSdk] Parse Properties after header (dotnet#143)
  * dotnet/android-tools@dac3a47: [Xamarin.Android.Tools.AndroidSdk] Add API-31 to KnownVersions (dotnet#141)
  * dotnet/android-tools@fc976d8: [Xamarin.Android.Tools.AndroidSdk] Add JdkInfo.GetSupportedJdkInfos() (dotnet#142)
jonpryor added a commit that referenced this pull request Mar 14, 2022
Context: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1397171
Context: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1433453

Changes: http://github.com/xamarin/xamarin-android-tools/compare/34e98e2b65917d105169f868b5648f67e68b6784...f4c44e2ac2d91396226f31e8c200464ecc65f648

  * dotnet/android-tools@f4c44e2: [Xamarin.Android.Tools.AndroidSdk] Attributes can be null! (#158)
  * dotnet/android-tools@f0b3abd: Revert "[Xamarin.Android.Tools.AndroidSdk] Update SDK component for API-32 (#156)"
  * dotnet/android-tools@bbe85df: [Xamarin.Android.Tools.AndroidSdk] Update SDK component for API-32 (#156)
  * dotnet/android-tools@a7f4d30: [ci] Mention new NuGet feed and release (#153)
  * dotnet/android-tools@85ae77f: Merge pull request #152 from xamarin/dev/mattnorflus/SigningMigration
  * dotnet/android-tools@dd34e54: Adding condition to GetFilesToSign to only include files if build configuration is Release
  * dotnet/android-tools@0e80ea1: Bump LibZipSharp to 2.0.3 (#151)
  * dotnet/android-tools@d0ab6ac: Fix Typo in commit 0dcf7172 (#150)
  * dotnet/android-tools@0dcf717: Bump LibZipSharp to 2.0.2 (#149)
  * dotnet/android-tools@db125a7: [build] Add d17-* as a branch trigger
  * dotnet/android-tools@f2cbc6a: Add resource dlls to MicroBuild signing. (#145)
  * dotnet/android-tools@35c89dd: Update MaximumCompatibleNDKMajorVersion to be 23 (#144)
  * dotnet/android-tools@0a22957: [Xamarin.Android.Tools.AndroidSdk] Parse Properties after header (#143)
  * dotnet/android-tools@dac3a47: [Xamarin.Android.Tools.AndroidSdk] Add API-31 to KnownVersions (#141)
  * dotnet/android-tools@fc976d8: [Xamarin.Android.Tools.AndroidSdk] Add JdkInfo.GetSupportedJdkInfos() (#142)
@github-actions github-actions bot locked and limited conversation to collaborators Apr 15, 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