Skip to content

Static binding generator creates wrong files, when two extended classes have the same name #692

@Plamen5kov

Description

@Plamen5kov

Problem:
Static binding generator creates wrong files, when two extended classes have the same name
How can I reproduce the problem:

The name is generated as follows:
<extended_class_name>_f<file_path>_l<line>_c<column>__<unique_name>.java

  • Because both classes extend the same base class, both names start with the same <extended_class_name>
  • Because the typescript extends all pass through the ts_helpers file, all files have the same _f<file_path>_l<line>_c<column>.
  • Because uglifyer minifies the names of both classes the <unique_name> is not so unique anymore.

Solution
There are two general paths we can take:

  • Suggest the user makes an exception when uglifying for the <unique_name> so it stays unique
  • Find a different way to generate names, that will generate classes with different names, that's also compatible with the way the runtime binding generator would generate them.

This problem does not happen when extending an interface, because the native implementation name does not take part in finding the js counterpart implementation, and all can use the same implementation of an interface.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions