Skip to content

Import prefixes should have $ in them not to conflict with names. #614

Closed

Description

@HosseinYousefi

For example, we're importing 'package:jni' as jni, and so we can not use jni.xyz inside a method that is also called jni.

Although rare, java method names can contain underscores, so we should use $ and make sure it doesn't conflict with our type parameters (which also use $).

Activity

  1. mahesh-hegde commented on Jun 28, 2023

    @mahesh-hegde
    Contributor

    Isn't the import name added to renaming context, (causing the method name to be renamed)?

  2. HosseinYousefi commented on Jun 28, 2023

    @HosseinYousefi
    ContributorAuthor

    Isn't the import name added to renaming context, (causing the method name to be renamed)?

    No, I didn't change the renaming logic, it has been like this. Plus, I think it's a good idea to stay true to the method names as these are used by the end user and import prefixes are generated. In this case, if a method name is ffi we should strive to keep it as ffi (instead of say – ffi0).

  3. added a commit that references this issue on Apr 8, 2024
    cb14754
  4. moved this from Backlog to Todo in JNIgen trackeron May 22, 2024
  5. moved this from Todo to In Progress in JNIgen trackeron Dec 6, 2024
  6. added 2 commits that reference this issue on Dec 6, 2024
    811aea5
    31c7a55
  7. moved this from In Progress to Done in JNIgen trackeron Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

package:jnipackage:jnigentype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions