Bug 25245 - Use parameter names from the original lib
Summary: Use parameter names from the original lib
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 5.1
Hardware: PC Windows
: Lowest enhancement
Target Milestone: 7.3 (C11)
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2014-12-10 15:44 UTC by Dimitar Dobrev
Modified: 2016-09-22 07:55 UTC (History)
2 users (show)

Tags: XATriaged
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Dimitar Dobrev 2014-12-10 15:44:11 UTC
Parameters are named p0, p1, etc. instead. It's possible to get the real names because Java decompilers such as http://jd.benow.ca/ can do it.
Comment 1 Atsushi Eno 2014-12-10 23:35:03 UTC
- It is NOT possible because there is no parameter names stored in .class files.
- It IS possible to give parameter names if you either specify API references in standard Javadoc (Java6 or Java7, probably Java8 too) format or droiddoc (Android document) format, as <JavaDocPaths>, <Java7DocPaths> or <DroidDocPaths> custom project property in .csproj or .fsproj files.
Comment 2 Dimitar Dobrev 2014-12-10 23:57:54 UTC
It may not ALWAYS be possible but it IS. Download https://github.com/radiumone/r1-connect-demo-Android/blob/master/SdkLib/LibR1Connect.jar, and either open it with either the decompiler I've pointed to or unpack it and open com/radiumone/emitter/R1Emitter.class. The names are clearly visible.
Comment 3 Atsushi Eno 2014-12-11 06:00:19 UTC
There is no publicly usable Java library that retrieves parameter names (asm 5.0.3 doesn't work for this library). Unless there is opensource Java library that makes it usable, it is not going to be supported.
Comment 4 Dimitar Dobrev 2014-12-11 06:29:51 UTC
This decompiler - https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler - is open source and it also detects the parameter names.
Comment 5 Dimitar Dobrev 2014-12-11 10:00:27 UTC
So, given that there is an open source library, will this bug be fixed? I don't agree it's a low priority. If a JAR is not documented, it's impossible to deduce what to pass looking at p0, p1.
Comment 6 Atsushi Eno 2014-12-11 12:49:59 UTC
Incorporating that decompiler is a lot of changes so that won't happen in a few weeks. We likely have somewhat different binding toolchains which is in much higher priority after the next major version. Parameter name retrieval will be discussed within that timeframe.
Comment 7 Dimitar Dobrev 2014-12-11 13:10:54 UTC
This reply sound much better, thank you. I'd only like to ask you to reconsider about the priority of this issue. I wish you a pleasant evening.
Comment 8 Dimitar Dobrev 2015-03-12 18:05:58 UTC
Hello, any plans on this one? I don't agree it's a low priority, having the real parameter names makes the bindings much more intuitive.
Comment 9 dean.ellis 2016-09-21 13:14:56 UTC
We have a new tool called class-parse which we are switching over too to generate the bindings. If the .class files contain debug symbols it will be able to pull out the parameter names more accurately than the nav tooling we have now.
Comment 10 Atsushi Eno 2016-09-22 07:55:08 UTC
It is already implemented and enabled in our master build, no need to keep it open.