Skip to content
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

Track Java.Interop.Tools.JavaCallableWrappers changes #8701

Merged
merged 5 commits into from
Feb 21, 2024
Merged

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented Feb 5, 2024

Context: dotnet/java-interop#1174

In dotnet/java-interop#1174, we refactored Java.Interop.Tools.JavaCallableWrappers to be more maintainable. This resulted in a changed public API for consuming the library.

Update Xamarin.Android.Build.Tasks.GenerateJavaStubs to consume the updated API.

@jpobst jpobst marked this pull request as ready for review February 21, 2024 17:18
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, the code changes look OK to me.

@@ -473,23 +484,21 @@ bool CreateJavaSources (IEnumerable<JavaType> newJavaTypes, TypeDefinitionCache

using (var writer = MemoryStreamPool.Shared.CreateStreamWriter ()) {
try {
var jti = new JavaCallableWrapperGenerator (t, Log.LogWarning, cache, classifier) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we don't pass in Log.LogWarning(), I wondered if we lost the ability to log warnings. But then I looked at the java.interop diff to see all the warnings commented out.

Is this something being worked on for a future PR? Just curious.

Copy link
Contributor Author

@jpobst jpobst Feb 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I know of. I assume these warnings were disabled for a reason?

But it would be pretty easy to add a logger property to CallableWrapperReaderOptions and/or CallableWrapperWriterOptions in the future if someone wanted to add more logging.

@jpobst jpobst changed the title Test JI #1174. Track Java.Interop.Tools.JavaCallableWrappers changes Feb 21, 2024
@jonpryor jonpryor merged commit e199d62 into main Feb 21, 2024
47 checks passed
@jonpryor jonpryor deleted the refactor-jcw branch February 21, 2024 18:55
grendello added a commit that referenced this pull request Feb 22, 2024
* main:
  [xamarin-android-tools] import $(LibZipSharpVersion) value (#8738)
  Bump to xamarin/Java.Interop/main@c825dcad (#8701)
  Bump to xamarin/monodroid@cb01503327 (#8742)
  Bump to xamarin/Java.Interop/main@ae65609 (#8744)
grendello added a commit that referenced this pull request Feb 22, 2024
* main:
  [xamarin-android-tools] import $(LibZipSharpVersion) value (#8738)
  Bump to xamarin/Java.Interop/main@c825dcad (#8701)
  Bump to xamarin/monodroid@cb01503327 (#8742)
grendello added a commit that referenced this pull request Feb 28, 2024
* main:
  Bump to xamarin/xamarin-android-tools/main@37d79c9 (#8752)
  Bump to dotnet/installer@d070660282 9.0.100-preview.3.24126.2 (#8763)
  Bump to xamarin/java.interop/main@14a9470 (#8766)
  $(AndroidPackVersionSuffix)=preview.3; net9 is 34.99.0.preview.3 (#8765)
  [Mono.Android] Do not dispose request content stream in AndroidMessageHandler (#8764)
  Bump com.android.tools:r8 from 8.2.42 to 8.2.47 (#8761)
  [Mono.Android] fix a set of the "easiest" trimmer warnings (#8731)
  Bump to dotnet/installer@0a73f814e1 9.0.100-preview.2.24122.3 (#8716)
  [ci] Always run the MAUI test job (#8750)
  Add a property required by #8478 (#8749)
  [xamarin-android-tools] import $(LibZipSharpVersion) value (#8738)
  Bump to xamarin/Java.Interop/main@c825dcad (#8701)
  Bump to xamarin/monodroid@cb01503327 (#8742)
  Bump to xamarin/Java.Interop/main@ae65609 (#8744)
  Bring in changes from PR #8478 (#8727)
  [xaprepare] Make 7zip work with "dangerous" symlinks in ZIPs (#8737)
  Bump NDK to r26c (#8732)
  Debugging MSBuild Tasks (#8730)
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 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