-
Notifications
You must be signed in to change notification settings - Fork 533
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
Binding fails with Visual Studio for Mac 8.8.6.15 and above #5580
Comments
Most of the messages telling you why classes are not bound are not warnings, they are simply messages in the build log. You'll want to turn on Diagnostic build logging and then Rebuild (not just Build) your solution. If you look in the Output Log you should see messages like:
Which will tell you why types are not being bound. |
@jpobst here is a part of Diagnostic logs
|
Are those the |
It is with |
Type ,missing are HttpFunction, HttpRequest$Serializer etc... |
From the logs, we hid
It looks like
If you can provide the .jar file we can take a look at what is causing that. But it also looks like it may be a |
chameleon-android-1.1.0.zip |
Filed the |
What "extra classes" are present in the binding when
More C# files are generated when class-parse is used (17 vs 15).
More types are present when using class-parse (30 vs 25). The added types?
--- j2x.txt 2021-02-02 20:42:57.000000000 -0500
+++ cp.txt 2021-02-02 20:42:46.000000000 -0500
@@ -3,6 +3,7 @@
Com.Vmware.Chameleon.BuildConfig
Com.Vmware.Chameleon.ChameleonApplication
Com.Vmware.Chameleon.ChameleonContextKt
+Com.Vmware.Chameleon.Configuration
Com.Vmware.Chameleon.ContextDelegate
Com.Vmware.Chameleon.Function.FunctionArg
Com.Vmware.Chameleon.Function.FunctionOutput
@@ -10,11 +11,15 @@
Com.Vmware.Chameleon.Function.IFunctionFactory
Com.Vmware.Chameleon.Function.IFunctionFactoryInvoker
Com.Vmware.Chameleon.Function.IFunctionInvoker
-Com.Vmware.Chameleon.Http.HttpResponse
+Com.Vmware.Chameleon.Http.HttpRequest
+Com.Vmware.Chameleon.Http.HttpRequest/Companion
+Com.Vmware.Chameleon.IChameleonContext
+Com.Vmware.Chameleon.IChameleonContextInvoker
Com.Vmware.Chameleon.Logger.ICustomLogger
Com.Vmware.Chameleon.Logger.ICustomLoggerInvoker
Com.Vmware.Chameleon.Logger.LoggerKt
Com.Vmware.Chameleon.Logger.LoggerLevel
+Com.Vmware.Chameleon.Logger.LoggerLevel/Companion
Java.Interop.__TypeRegistrations
Table
_JniMarshal_PPLLZ_L While more types are generated, this does show an interesting absence, which may be what you're after: Why?
It's a |
I'm not entirely sure I understand what is being requested. An interpretation is that all of the "Error" message emitted, such as those mentioned earlier -- which are currently treated as debug messages, not errors, as they do not appear as MSBuild warnings or errors -- should be displayed as MSBuild warnings or errors. I am amenable to that suggestion. @jpobst would need to implement it. ;-) Additionally, we do emit warnings, but you don't appear to like the ones emitted:
We should improve this warning so that it's actionable. Currently, it isn't directly actionable. A workaround is to rename the field, in <attr path="//class[@name='HttpRequest']/field[@name='Companion']" name="managedName">CompanionField</attr> This removes the previous BG8401 warning, and updates the |
@jpobst addressed why
The interface type This can be fixed by "adding" Unfortunately, it can't be easily worked around via metadata, because Alternatively, one could copy the mass of XML from Note that Even then, most of the members are skipped:
|
After further investigation, I'm not sure why you want/need the "Not expected to use that type" in that there are only three instances of
None of those are for "normal" end-developer code. (Though |
@jonpryor For me when I bind using class-parser I don't see the classes you got with command line. this is a extract from diagnostic logs..
Missing classes are HttpFunction,, SecureTlsSocketFactory, PublicKeyPinningTrustManager. This library is a dependency to other Major library. I am only talking about this for convenience... but we have 15-16 Library with similar issues... What you suggest to solve |
Unfortunately there are not currently many good options for fixing I filed issue dotnet/java-interop#790 to allow users to modify the visibility of Kotlin Other options are downgrading the version you are on, or trying to add the raw |
How we can downgrade to 8.6 where it was building....? we tried |
I don't know. I would try Googling it, surely it is possible. |
@jbpost Why this was closed? |
The root issue is dotnet/java-interop#790, so this was closed in favor of that issue. That issue has been fixed and is available in the 16.10/8.10 previews. |
Stuck with compiling binding with no information binding failure
Binding was generated correctly with older versions but after upgrading to 8.8.6.15 bindings few of the classes are missing.
When Class-parser is selected very few warnings, no exact error/warning for which class binding is not generated.
If we select jar2xml most of the errors/warning are related to Kotlin.
When Class-parser is selected following are the warning. and important classes are missing from generated binding.
When jar2xml is selected following are the warnings but few extra classes are generated in binding.
Expected Behavior
As the bindings are generated with class-parser there is should be proper errors/warning so that handling can be done properly for getting desired classes in binding.
Actual Behavior
No error/warnings for not generating binding for the classes.
Version Information
=== Visual Studio Community 2019 for Mac (Preview) ===
Version 8.9 Preview (8.9 build 1451)
Installation UUID: 7a99ac0f-2574-48b1-b44d-6ad8eabcabff
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)
=== Mono Framework MDK ===
Runtime:
Mono 6.12.0.113 (2020-02/4fdfb5b1fd5) (64-bit)
Package version: 612000113
=== Roslyn (Language Service) ===
3.9.0-3.20619.14+df59a33fd9beff9790e01a2a1ab21e4a1e6921b3
=== NuGet ===
Version: 5.8.0.6860
=== .NET Core SDK ===
SDK: /usr/local/share/dotnet/sdk/5.0.102/Sdks
SDK Versions:
5.0.102
5.0.101
5.0.100
3.1.405
3.1.404
3.1.403
3.1.402
2.1.811
2.1.809
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks
=== .NET Core Runtime ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
5.0.2
5.0.1
5.0.0
5.0.0-rc.2.20475.5
3.1.11
3.1.10
3.1.9
3.1.8
2.1.23
2.1.22
2.1.21
=== .NET Core 3.1 SDK ===
SDK: 3.1.405
=== Xamarin.Profiler ===
Version: 1.6.15.68
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Xamarin.Android ===
Version: 11.2.0.0 (Visual Studio Community)
Commit: xamarin-android/d16-9/f908d16
Android SDK: /Users/[email protected]/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.4
SDK Build Tools Version: 30.0.2
Build Information:
Mono: 5e9cb6d
Java.Interop: xamarin/java.interop/d16-9@1d382be
ProGuard: Guardsquare/proguard@912d149
SQLite: xamarin/sqlite@cfe06e0
Xamarin.Android Tools: xamarin/xamarin-android-tools/main@ad80a42
=== Microsoft OpenJDK for Mobile ===
Java SDK: /Users/[email protected]/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Android SDK Manager ===
Version: 16.9.0.21
Hash: 57e40ba
Branch: remotes/origin/main
Build date: 2021-01-08 01:57:14 UTC
=== Android Device Manager ===
Version: 16.9.0.14
Hash: 0fdccda
Branch: remotes/origin/main
Build date: 2021-01-08 01:57:36 UTC
=== Xamarin Designer ===
Version: 16.9.0.266
Hash: c4842c761
Branch: remotes/origin/c4842c761b9b6a95407f72278ca7fb42f8f7fdf0
Build date: 2021-01-07 06:17:08 UTC
=== Apple Developer Tools ===
Xcode 12.1 (17222)
Build 12A7403
=== Xamarin.Mac ===
Version: 7.3.0.27 (Visual Studio Community)
Hash: f4c9327fa
Branch: main
Build date: 2020-11-19 10:57:31-0500
=== Xamarin.iOS ===
Version: 14.9.0.27 (Visual Studio Community)
Hash: f4c9327fa
Branch: main
Build date: 2020-11-19 10:57:31-0500
=== Build Information ===
Release ID: 809001451
Git revision: cfd15313a6388ef8dada0182e22a058131c46f9d
Build date: 2021-01-15 08:42:21-05
Build branch: release-8.9
Xamarin extensions: cfd15313a6388ef8dada0182e22a058131c46f9d
=== Operating System ===
Mac OS X 10.15.7
Darwin 19.6.0 Darwin Kernel Version 19.6.0
Thu Oct 29 22:56:45 PDT 2020
root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64
@jonathanpeppers needed your guidance on this.
The text was updated successfully, but these errors were encountered: