-
Notifications
You must be signed in to change notification settings - Fork 538
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
Bump to xamarin/Java.Interop/master@2abfc1e0 #3504
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@grendello: could this be related to/caused by this? dotnet/java-interop@285a32b Do we need to merge PR#3223 in order to bump Java.Interop to dotnet/java-interop@285a32b3? |
jonpryor
added a commit
to jonpryor/java.interop
that referenced
this pull request
Aug 16, 2019
Context: dotnet/android#3504 Context: dotnet/android#3223 When bumping xamarin-android/master to 2abfc1e, the build broke because of commit 285a32b: In file included from /Users/vsts/agent/2.155.1/work/1/s/external/Java.Interop/src/java-interop/java-interop-mono.cc:2: ../../../../../external/Java.Interop/src/java-interop/java-interop-mono.h:10:11: fatal error: 'mono/metadata/assembly.h' file not found #include <mono/metadata/assembly.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. We need to continue supporting the DylibMono backend for integration purposes (dotnet/android#3504) *while also* allowing for the *removal* of DylibMono (dotnet/android#3223). Attempt to support these divergent needs by replacing this: #if defined (ANDROID) || defined (XAMARIN_ANDROID_DYLIB_MONO) with this: #if defined (XAMARIN_ANDROID_DYLIB_MONO) removing the check for the `ANDROID` define. This will allow xamrin/xamarin-android#3223 to *remove* the `XAMARIN_ANDROID_DYLIB_MONO` definition in order to introduce it's desired behavior, removing DylibMono use. This partially reverts commit 285a32b.
jonpryor
added a commit
to jonpryor/java.interop
that referenced
this pull request
Aug 16, 2019
Context: dotnet/android#3504 Context: dotnet/android#3223 When bumping xamarin-android/master to 2abfc1e, the build broke because of commit 285a32b: In file included from /Users/vsts/agent/2.155.1/work/1/s/external/Java.Interop/src/java-interop/java-interop-mono.cc:2: ../../../../../external/Java.Interop/src/java-interop/java-interop-mono.h:10:11: fatal error: 'mono/metadata/assembly.h' file not found #include <mono/metadata/assembly.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. We need to continue supporting the DylibMono backend for integration purposes (dotnet/android#3504) *while also* allowing for the *removal* of DylibMono (dotnet/android#3223). Attempt to support these divergent needs by replacing this: #if defined (ANDROID) || defined (XAMARIN_ANDROID_DYLIB_MONO) with this: #if defined (XAMARIN_ANDROID_DYLIB_MONO) removing the check for the `ANDROID` define. This will allow xamrin/xamarin-android#3223 to *remove* the `XAMARIN_ANDROID_DYLIB_MONO` definition in order to introduce it's desired behavior, removing DylibMono use. This partially reverts commit 285a32b.
jonpryor
added a commit
to jonpryor/java.interop
that referenced
this pull request
Aug 16, 2019
Context: dotnet/android#3504 Context: dotnet/android#3223 When bumping xamarin-android/master to 2abfc1e, the build broke because of commit 285a32b: In file included from /Users/vsts/agent/2.155.1/work/1/s/external/Java.Interop/src/java-interop/java-interop-mono.cc:2: ../../../../../external/Java.Interop/src/java-interop/java-interop-mono.h:10:11: fatal error: 'mono/metadata/assembly.h' file not found #include <mono/metadata/assembly.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. We need to continue supporting the DylibMono backend for integration purposes (dotnet/android#3504) *while also* allowing for the *removal* of DylibMono (dotnet/android#3223). Attempt to support these divergent needs by replacing this: #if defined (ANDROID) || defined (XAMARIN_ANDROID_DYLIB_MONO) with this: #if defined (XAMARIN_ANDROID_DYLIB_MONO) removing the check for the `ANDROID` define. This will allow dotnet/android#3223 to *remove* the `XAMARIN_ANDROID_DYLIB_MONO` definition in order to introduce it's desired behavior, removing DylibMono use. This partially reverts commit 285a32b.
jonpryor
added a commit
to dotnet/java-interop
that referenced
this pull request
Aug 16, 2019
Context: dotnet/android#3504 Context: dotnet/android#3223 When bumping xamarin-android/master to 2abfc1e, the build broke because of commit 285a32b: In file included from /Users/vsts/agent/2.155.1/work/1/s/external/Java.Interop/src/java-interop/java-interop-mono.cc:2: ../../../../../external/Java.Interop/src/java-interop/java-interop-mono.h:10:11: fatal error: 'mono/metadata/assembly.h' file not found #include <mono/metadata/assembly.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. We need to continue supporting the DylibMono backend for integration purposes (dotnet/android#3504) *while also* allowing for the *removal* of DylibMono (dotnet/android#3223). Attempt to support these divergent needs by replacing this: #if defined (ANDROID) || defined (XAMARIN_ANDROID_DYLIB_MONO) with this: #if defined (XAMARIN_ANDROID_DYLIB_MONO) removing the check for the `ANDROID` define. This will allow dotnet/android#3223 to *remove* the `XAMARIN_ANDROID_DYLIB_MONO` definition in order to introduce it's desired behavior, removing DylibMono use. This partially reverts commit 285a32b.
856e6d3
to
915064e
Compare
The DylibMono build failure should be fixed by: dotnet/java-interop@5fe28cd |
jonpryor
added a commit
to jonpryor/java.interop
that referenced
this pull request
Aug 16, 2019
Context: dotnet/android#3504 Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=2950467&view=results Commit 5fe28cd didn't go far enough. While the xamarin-android build is no longer trying to include `<mono/metadata/assembly.h>`, we get a new set of compilation errors: /Users/vsts/agent/2.155.1/work/1/s/external/Java.Interop/src/java-interop/java-interop-gc-bridge-mono.cc(34,2): error GF2D19E48: unknown type name 'MonoClass'; did you mean 'xamarin::android::MonoClass'? MonoClass *klass; ^~~~~~~~~ xamarin::android::MonoClass ../../../jni/dylib-mono.h:101:31: note: 'xamarin::android::MonoClass' declared here typedef struct _MonoClass {} MonoClass; ^ This is because the `using namespace xamarin::android` on `java-interop-gc-bridge-mono.cc` line 30 isn't evaluated, as `ANDROID` isn't defined during *host* builds of xamarin-android/src/monodroid (which builds e.g. `libmono-android.debug.*` for macOS & Windows). Add `XAMARIN_ANDROID_DYLIB_MONO` to the `#if` list, so that the `using namespace` statement is used on host builds.
jonpryor
added a commit
to dotnet/java-interop
that referenced
this pull request
Aug 16, 2019
Context: dotnet/android#3504 Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=2950467&view=results Commit 5fe28cd didn't go far enough. While the xamarin-android build is no longer trying to include `<mono/metadata/assembly.h>`, we get a new set of compilation errors: /Users/vsts/agent/2.155.1/work/1/s/external/Java.Interop/src/java-interop/java-interop-gc-bridge-mono.cc(34,2): error GF2D19E48: unknown type name 'MonoClass'; did you mean 'xamarin::android::MonoClass'? MonoClass *klass; ^~~~~~~~~ xamarin::android::MonoClass ../../../jni/dylib-mono.h:101:31: note: 'xamarin::android::MonoClass' declared here typedef struct _MonoClass {} MonoClass; ^ This is because the `using namespace xamarin::android` on `java-interop-gc-bridge-mono.cc` line 30 isn't evaluated, as `ANDROID` isn't defined during *host* builds of xamarin-android/src/monodroid (which builds e.g. `libmono-android.debug.*` for macOS & Windows). Add `XAMARIN_ANDROID_DYLIB_MONO` to the `#if` list, so that the `using namespace` statement is used on host builds.
915064e
to
8f3c43b
Compare
jonpryor
added a commit
to jonpryor/java.interop
that referenced
this pull request
Aug 17, 2019
Context: dotnet/android#3504 Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=2951424&view=ms.vss-test-web.build-test-results-tab&runId=7990780&resultId=100107&paneView=attachments The attempt to bump the Java.Interop submodule within xamarin-android hit a snag, as unit tests failed: The "ClassParse" task failed unexpectedly. System.NullReferenceException: Object reference not set to an instance of an object at Xamarin.Android.Tools.Bytecode.ClassFile.TryGetEnclosingMethodInfo (System.String& declaringClass, System.String& declaringMethod, System.String& declaringDescriptor) at Xamarin.Android.Tools.Bytecode.XmlClassDeclarationBuilder.GetEnclosingMethod () at Xamarin.Android.Tools.Bytecode.XmlClassDeclarationBuilder.ToXElement () at Xamarin.Android.Tools.Bytecode.ClassPath+<>c.<ToXElement>b__36_3 (Xamarin.Android.Tools.Bytecode.ClassFile c) at System.Linq.Enumerable+SelectIPartitionIterator`2[TSource,TResult].MoveNext () at System.Xml.Linq.XContainer.AddContentSkipNotify (System.Object content) at System.Xml.Linq.XContainer.AddContentSkipNotify (System.Object content) The cause? The [`material-menu`][0] library has `.class` files which have an `EnclosingMethod` attribute blob, but doesn't mention method name information, only an enclosing type: $ mono class-parse.exe com/balysv/material/drawable/menu/MaterialMenuDrawable\$5.class --dump ... 1: EnclosingMethod(Class(nameIndex=58 Name="com/balysv/material/drawable/menu/MaterialMenuDrawable"), ) # Behold! No method information! Support generating an XML description of this type by adding appropriate `null` checks around `EnclosingMethodAttribute`. [0]: https://repo.jfrog.org/artifactory/libs-release-bintray/com/balysv/material-menu/1.1.0/material-menu-1.1.0.aar
jonpryor
added a commit
to dotnet/java-interop
that referenced
this pull request
Aug 18, 2019
Context: dotnet/android#3504 Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=2951424&view=ms.vss-test-web.build-test-results-tab&runId=7990780&resultId=100107&paneView=attachments The attempt to bump the Java.Interop submodule within xamarin-android hit a snag, as unit tests failed: The "ClassParse" task failed unexpectedly. System.NullReferenceException: Object reference not set to an instance of an object at Xamarin.Android.Tools.Bytecode.ClassFile.TryGetEnclosingMethodInfo (System.String& declaringClass, System.String& declaringMethod, System.String& declaringDescriptor) at Xamarin.Android.Tools.Bytecode.XmlClassDeclarationBuilder.GetEnclosingMethod () at Xamarin.Android.Tools.Bytecode.XmlClassDeclarationBuilder.ToXElement () at Xamarin.Android.Tools.Bytecode.ClassPath+<>c.<ToXElement>b__36_3 (Xamarin.Android.Tools.Bytecode.ClassFile c) at System.Linq.Enumerable+SelectIPartitionIterator`2[TSource,TResult].MoveNext () at System.Xml.Linq.XContainer.AddContentSkipNotify (System.Object content) at System.Xml.Linq.XContainer.AddContentSkipNotify (System.Object content) The cause? The [`material-menu`][0] library has `.class` files which have an `EnclosingMethod` attribute blob, but doesn't mention method name information, only an enclosing type: $ mono class-parse.exe com/balysv/material/drawable/menu/MaterialMenuDrawable\$5.class --dump ... 1: EnclosingMethod(Class(nameIndex=58 Name="com/balysv/material/drawable/menu/MaterialMenuDrawable"), ) # Behold! No method information! Support generating an XML description of this type by adding appropriate `null` checks around `EnclosingMethodAttribute`. [0]: https://repo.jfrog.org/artifactory/libs-release-bintray/com/balysv/material-menu/1.1.0/material-menu-1.1.0.aar
8f3c43b
to
8c05e81
Compare
Changes: dotnet/java-interop@be58159...f7d97c2 Context: dotnet/java-interop#459 Updates `generator` so that all bound Java interfaces also implement `IJavaPeerable` in addition to `IJavaObject`, for eventual future C#8 Default Interface Member support. [generator] Remove extraneous slash when creating .projitems. [generator] Always use XAPeerMembers for XAJavaInterop1 Drop dependency on DylibMono when building for Xamarin.Android [jnienv-gen] fix p/invoke usage for .NET framework Add `jnimarshalmethod-gen.exe -r ASSEMBLY` option. Improve support for binding package-private interfaces. Parse EnclosingMethod, SourceFile annotation blobs. Emit events for addListener(Listener,Handler) pattern Fix `jnimarshalmethod-gen.exe`-related build error: Instance property 'PeerReference' is not defined for type 'Android.Widget.IListAdapter' Parameter name: propertyName System.ArgumentException: Instance property 'PeerReference' is not defined for type 'Android.Widget.IListAdapter' Parameter name: propertyName at System.Linq.Expressions.Expression.Property (System.Linq.Expressions.Expression expression, System.String propertyName) at Java.Interop.JavaPeerableValueMarshaler.CreateIntermediaryExpressionFromManagedExpression (Java.Interop.Expressions.JniValueMarshalerContext context, System.Linq.Expressions.ParameterExpression sourceValue) at Java.Interop.JavaPeerableValueMarshaler.CreateReturnValueFromManagedExpression (Java.Interop.Expressions.JniValueMarshalerContext context, System.Linq.Expressions.ParameterExpression sourceValue) Fix DylibMono build issues which prevented `src/monodroid` from building.
8c05e81
to
8e92871
Compare
I added `external/Java.Interop/build-tools/jnienv-gen.csproj` to the solution using VS 2019. It also "fixed" a few things.
This change causes build failures, it should not be needed: "src\Mono.Android\Mono.Android.csproj" (default target) (24:2) -> (CoreCompile target) -> Android.Runtime\JNIEnv.g.cs(120,141): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(138,138): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(156,138): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(174,139): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(192,137): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(210,138): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(246,140): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(264,131): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(282,183): error CS1503: Argument 4: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(300,184): error CS1503: Argument 4: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(318,181): error CS1503: Argument 4: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(336,181): error CS1503: Argument 4: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(354,182): error CS1503: Argument 4: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(372,180): error CS1503: Argument 4: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(390,181): error CS1503: Argument 4: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(408,182): error CS1503: Argument 4: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(426,183): error CS1503: Argument 4: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(444,174): error CS1503: Argument 4: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(580,143): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(616,140): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(634,141): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(652,139): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(670,140): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(688,141): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(706,142): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*' Android.Runtime\JNIEnv.g.cs(724,133): error CS1503: Argument 3: cannot convert from 'System.IntPtr' to 'Java.Interop.JniArgumentValue*'
jonathanpeppers
approved these changes
Aug 19, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes: dotnet/java-interop@be58159...2abfc1e
Context: dotnet/java-interop#459
Updates
generator
so that all bound Java interfaces also implementIJavaPeerable
in addition toIJavaObject
, for eventual futureC#8 Default Interface Member support.
[generator] Remove extraneous slash when creating .projitems.
[generator] Always use XAPeerMembers for XAJavaInterop1
Drop dependency on DylibMono when building for Xamarin.Android
[jnienv-gen] fix p/invoke usage for .NET framework
Add
jnimarshalmethod-gen.exe -r ASSEMBLY
option.