-
Notifications
You must be signed in to change notification settings - Fork 564
Bump to Java.Interop/master/1cd03611 #732
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
Conversation
This file contains hidden or 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
jonpryor
added a commit
to jonpryor/java.interop
that referenced
this pull request
Aug 10, 2017
Context: dotnet/android#732 Commit d7dfa0b [broke][1] the `xamarin-android/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests` build, as it started treating `Android.Graphics.Color` as a normal type, instead of the special-cased behavior it should have: [1]: https://jenkins.mono-project.com/job/xamarin-android-pr-builder/1324/ error CS0452: The type 'Color' must be a reference type in order to use it as parameter 'T' in the generic type or method 'Object.GetObject<T>(IntPtr, JniHandleOwnership)' error CS1503: Argument 1: cannot convert from 'Android.Graphics.Color' to 'Android.Runtime.IJavaObject' The problem is that this code pattern: static int n_UseColors_I (IntPtr jnienv, IntPtr native__this, int native_p0) { global::Com.Xamarin.Android.Bxc4288 __this = global::Java.Lang.Object.GetObject<global::Com.Xamarin.Android.Bxc4288> (jnienv, native__this, JniHandleOwnership.DoNotTransfer); global::Android.Graphics.Color p0 = new global::Android.Graphics.Color (native_p0); return __this.UseColors (p0).ToArgb (); } became: static IntPtr n_UseColors_LAndroid_Graphics_Color_ (IntPtr jnienv, IntPtr native__this, IntPtr native_p0) { global::Com.Xamarin.Android.Bxc4288 __this = global::Java.Lang.Object.GetObject<global::Com.Xamarin.Android.Bxc4288> (jnienv, native__this, JniHandleOwnership.DoNotTransfer); global::Android.Graphics.Color p0 = global::Java.Lang.Object.GetObject<global::Android.Graphics.Color> (native_p0, JniHandleOwnership.DoNotTransfer); IntPtr __ret = JNIEnv.ToLocalJniHandle (__this.UseColors (p0)); return __ret; } The cause reason for this is that d7dfa0b updated `SymbolTable.AddType()` so that it no longer called `SymbolTable.ShouldAddType()`, which is what would prevent type registration of `Android.Graphics.Color`. Reintroduce the call to `ShouldAddType()` so that `Android.Graphics.Color` isn't registered.
This was referenced Aug 10, 2017
Merged
atsushieno
pushed a commit
to dotnet/java-interop
that referenced
this pull request
Aug 10, 2017
Context: dotnet/android#732 Commit d7dfa0b [broke][1] the `xamarin-android/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests` build, as it started treating `Android.Graphics.Color` as a normal type, instead of the special-cased behavior it should have: [1]: https://jenkins.mono-project.com/job/xamarin-android-pr-builder/1324/ error CS0452: The type 'Color' must be a reference type in order to use it as parameter 'T' in the generic type or method 'Object.GetObject<T>(IntPtr, JniHandleOwnership)' error CS1503: Argument 1: cannot convert from 'Android.Graphics.Color' to 'Android.Runtime.IJavaObject' The problem is that this code pattern: static int n_UseColors_I (IntPtr jnienv, IntPtr native__this, int native_p0) { global::Com.Xamarin.Android.Bxc4288 __this = global::Java.Lang.Object.GetObject<global::Com.Xamarin.Android.Bxc4288> (jnienv, native__this, JniHandleOwnership.DoNotTransfer); global::Android.Graphics.Color p0 = new global::Android.Graphics.Color (native_p0); return __this.UseColors (p0).ToArgb (); } became: static IntPtr n_UseColors_LAndroid_Graphics_Color_ (IntPtr jnienv, IntPtr native__this, IntPtr native_p0) { global::Com.Xamarin.Android.Bxc4288 __this = global::Java.Lang.Object.GetObject<global::Com.Xamarin.Android.Bxc4288> (jnienv, native__this, JniHandleOwnership.DoNotTransfer); global::Android.Graphics.Color p0 = global::Java.Lang.Object.GetObject<global::Android.Graphics.Color> (native_p0, JniHandleOwnership.DoNotTransfer); IntPtr __ret = JNIEnv.ToLocalJniHandle (__this.UseColors (p0)); return __ret; } The cause reason for this is that d7dfa0b updated `SymbolTable.AddType()` so that it no longer called `SymbolTable.ShouldAddType()`, which is what would prevent type registration of `Android.Graphics.Color`. Reintroduce the call to `ShouldAddType()` so that `Android.Graphics.Color` isn't registered.
1a945fd to
835e348
Compare
Closed
jonpryor
added a commit
to dotnet/java-interop
that referenced
this pull request
Aug 10, 2017
Context: dotnet/android#732 Commit d7dfa0b [broke][1] the `xamarin-android/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests` build, as it started treating `Android.Graphics.Color` as a normal type, instead of the special-cased behavior it should have: [1]: https://jenkins.mono-project.com/job/xamarin-android-pr-builder/1324/ error CS0452: The type 'Color' must be a reference type in order to use it as parameter 'T' in the generic type or method 'Object.GetObject<T>(IntPtr, JniHandleOwnership)' error CS1503: Argument 1: cannot convert from 'Android.Graphics.Color' to 'Android.Runtime.IJavaObject' The problem is that this code pattern: static int n_UseColors_I (IntPtr jnienv, IntPtr native__this, int native_p0) { global::Com.Xamarin.Android.Bxc4288 __this = global::Java.Lang.Object.GetObject<global::Com.Xamarin.Android.Bxc4288> (jnienv, native__this, JniHandleOwnership.DoNotTransfer); global::Android.Graphics.Color p0 = new global::Android.Graphics.Color (native_p0); return __this.UseColors (p0).ToArgb (); } became: static IntPtr n_UseColors_LAndroid_Graphics_Color_ (IntPtr jnienv, IntPtr native__this, IntPtr native_p0) { global::Com.Xamarin.Android.Bxc4288 __this = global::Java.Lang.Object.GetObject<global::Com.Xamarin.Android.Bxc4288> (jnienv, native__this, JniHandleOwnership.DoNotTransfer); global::Android.Graphics.Color p0 = global::Java.Lang.Object.GetObject<global::Android.Graphics.Color> (native_p0, JniHandleOwnership.DoNotTransfer); IntPtr __ret = JNIEnv.ToLocalJniHandle (__this.UseColors (p0)); return __ret; } The cause reason for this is that d7dfa0b updated `SymbolTable.AddType()` so that it no longer called `SymbolTable.ShouldAddType()`, which is what would prevent type registration of `Android.Graphics.Color`. Reintroduce the call to `ShouldAddType()` so that `Android.Graphics.Color` isn't registered.
lambdageek
pushed a commit
that referenced
this pull request
Aug 10, 2017
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.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=56436