This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Incompatibility between the Android runtime and Kawa-generated field names


Unfortunately, the verification of the names seems to occur only when
installing an app, and I don't have access to an Android 8 device, nor
can I run an emulator at the moment.

But I did come across the official naming specification for dex files though:

    https://source.android.com/devices/tech/dalvik/dex-format#membername

According to the documentation, the limitation still applies.

2017-08-31 0:24 GMT+08:00 Per Bothner <per@bothner.com>:
> On 08/30/2017 09:10 AM, Kay Zheng wrote:
>>
>>      08-30 17:57:28.998 15990 15990 W art     : Failure to verify dex
>> file '/data/app/com.theerrorlog.superbapp-1/base.apk': Invalid field
>> name: '1+'
>>
>> It turned out that some class files in Kawa's standard library
>> contained fields with exotic names such as '1+', '1-',
>> '%provide%srfi-41', which seemed to be legal JVM names, but treated as
>> illegal by the ART.
>
>
> Could you check if this limitation has been fixed in the latest Android?
> If so, we could select the old "mangling" style based on a #ifdef JAVA8
> pre-processor directive.
>
>> And I noticed that the 2.4 branch used a different naming scheme that
>> "translates" these exotic names into names with "escape sequences".
>> For example '1+' will be renamed to '$N1$Pl', making the translated
>> names all legal ART names too.
>>
>> So what's the reason for abandoning the "escaping" naming scheme? Can
>> I remedy the incompatibility issue in some way?
>
>
> One reason for avoiding needless escaping is to have more readable stack
> traces.
>
> Another is the new escape scheme (which escapes many fewer characters)
> appears to be somewhat standard, and used by other languages:
> ttps://blogs.oracle.com/jrose/entry/symbolic_freedom_in_the_vm
> That means it is more like to be supported by tools such as IDEs.
> --
>         --Per Bothner
> per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]