Skip to content

Conversation

@atsushieno
Copy link
Contributor

When we fill [Available (ApiSince = x)] we load api-versions.xml and
checks if the mentioned Java member exists. But there are cases that
those members should not really exist (e.g. we merge API while we don't
for api-versions - we simply can't, there is no per-level api-versions).

Missing members should be checked elsewhere, not here, so remove those
extraneous (and mostly spurious) warnings.

… check.

When we fill [Available (ApiSince = x)] we load api-versions.xml and
checks if the mentioned Java member exists. But there are cases that
those members should not really exist (e.g. we merge API while we don't
for api-versions - we simply can't, there is no per-level api-versions).

Missing members should be checked elsewhere, not here, so remove those
extraneous (and mostly spurious) warnings.
@atsushieno
Copy link
Contributor Author

atsushieno commented Jan 11, 2017

Once it gets merged, Mono.Android build warnings like this will disappear:

warning BG8E00:  api-versions.xml mensions type android.text.method.MetaKeyKeyListener, methodbase clearMetaKeyState(JI)J, but not found.

GenBase list from CodeGenerator was not flattened and therefore its list
did not contain nested types, resulting in that those nested types don't
have ApiSince attribute...
@atsushieno
Copy link
Contributor Author

I have pushed another fix that fills missing ApiSince for nested types.

@jonpryor jonpryor merged commit 39f1744 into dotnet:master Jan 11, 2017
jonpryor added a commit to jonpryor/java.interop that referenced this pull request Apr 19, 2021
Context: https://developercommunity.visualstudio.com/t/illegal-character-exception-in-xamarinandroid-afte/1363149

Changes: dotnet/android-tools@554d45a...d92fc3e

  * dotnet/android-tools@d92fc3e: [Xamarin.Android.Tools.AndroidSdk] Probe for AdoptOpenJDK Locations (dotnet#115)
  * dotnet/android-tools@dca30d9: [Xamarin.Android.Tools.AndroidSdk] Probe for Zulu JDK (dotnet#114)
  * dotnet/android-tools@237642c: [Xamarin.Android.Tools.AndroidSdk] Probe for Microsoft OpenJDK dirs (dotnet#113)
  * dotnet/android-tools@e618e00: [Xamarin.Android.Tools.AndroidSdk] Fix quotes in %PATH% or %PATHEXT% (dotnet#112)
jonpryor added a commit that referenced this pull request Apr 20, 2021
Context: https://developercommunity.visualstudio.com/t/illegal-character-exception-in-xamarinandroid-afte/1363149

Changes: dotnet/android-tools@554d45a...d92fc3e

  * dotnet/android-tools@d92fc3e: [Xamarin.Android.Tools.AndroidSdk] Probe for AdoptOpenJDK Locations (#115)
  * dotnet/android-tools@dca30d9: [Xamarin.Android.Tools.AndroidSdk] Probe for Zulu JDK (#114)
  * dotnet/android-tools@237642c: [Xamarin.Android.Tools.AndroidSdk] Probe for Microsoft OpenJDK dirs (#113)
  * dotnet/android-tools@e618e00: [Xamarin.Android.Tools.AndroidSdk] Fix quotes in %PATH% or %PATHEXT% (#112)

Finally, *prefer* JDK 8, as hilarious as that is, for two reasons:

 1. `gradlew` fails to execute when running under OpenJDK 14:

        [ERROR] [system.err] java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7

 2. The unit tests added in 69e1b80 currently depend upon the XML
    formatting conventions of JDK 8, and the tests fail when running
    under JDK 11 because of whitespace changes in `javax.xml` output.

For now, it's currently easier to just require JDK 8.

The preferred JDK version is controlled by the new `$(MaxJdkVersion)`
YAML variable, which in turn sets `$(JI_MAX_JDK)` (55c56f7) and/or
the `$(MaxJdkVersion)` MSBuild property, which
`dotnet build -t:Prepare` uses to generate `bin/Build*/JdkInfo.props`.

Finally, *for consistency*, update `TestJVM` to look for the generated
`JdkInfo.props`.  If found, use the `$(JdkJvmPath)` value at
`/Project/Chooose/When/PropertyGroup/JdkJvmPath` instead of using
`JdkInfo.GetKnownSystemJdkInfos()`, so that the JVM that we built
against is also used for unit test execution.
@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