Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
9027591 tried to fix Java.Interop.Export-Tests, and in the process broke Java.Base-Tests! A total of 1 test files matched the specified pattern. Failed InterfaceInvokerMethod [100 ms] Error Message: Java.Interop.JavaException : 'void example.MyIntConsumer.accept(int)' Stack Trace: at Java.Interop.JniEnvironment.InstanceMethods.CallVoidMethod(JniObjectReference instance, JniMethodInfo method, JniArgumentValue* args) in /Users/runner/work/1/s/src/Java.Interop/obj/Release/net7.0/JniEnvironment.g.cs:line 20370 at Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeAbstractVoidMethod(String encodedMember, IJavaPeerable self, JniArgumentValue* parameters) in /Users/runner/work/1/s/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:line 47 at Java.Lang.IRunnableInvoker.Run() in /Users/runner/work/1/s/src/Java.Base/obj/Release-net7.0/mcw/Java.Lang.IRunnable.cs:line 34 at Java.BaseTests.JavaToManagedTests.InterfaceInvokerMethod() in /Users/runner/work/1/s/tests/Java.Base-Tests/Java.Base/JavaToManagedTests.cs:line 28 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) --- End of managed Java.Interop.JavaException stack trace --- java.lang.UnsatisfiedLinkError: 'void example.MyIntConsumer.accept(int)' at example.MyIntConsumer.accept(Native Method) at com.microsoft.java_base_tests.Invoker$1.run(Invoker.java:15) The problem? That pesky `n_`! Or rather, the lack thereof this time. The issue is that `JreTypeManager`/etc. and `jcw-gen` need to be consistent. 9027591 altered the consistency, breaking Java.Base tests. Commit this to verify that things work on CI, not just locally. Assuming it works on CI, next step will be to largely revert 9027591, and then fix `Java.Interop.Export-Tests` to use an `n_` prefix on all `native` method declarations. That bit is hand-written; it can change. Keeping the tooling consistent is more important.
- Loading branch information