Problem with cases and package names at extension import


I’m using Windows 10 for developing AI2 extensions. On Windows upper or lower case for file names or path names make no difference.

I changed a package name from “Camel Case” to lower case (the class name is unchanged!), recompiled the extension and imported it to an existing AI2 project. The update of the extension seemed to be ok.

When compiling the project, I got an Java exception and the project did not compile.

I exported the project file (.aia) to my PC. I found:
under /assets/external_comps there is folder with the old Camel Case name but it now has duplicated content: two “classes.jar” (the old and the new one) two “components.json”, two “”.

It appears that capitalization is treated differently in different places. You should either ignore cases and replace the old version of the entension with the new one (for me the best solution). Or you should import a complete new extension, leaving the old one as it is, i.e. having two different extensions in the project.

You can download the .aia:

and an image of the folder:

Something similar happens when you change the package name completely. Now you have two packages, each having the same class (class name). Even then the project no longer works. Duplicates are also created here (unfortunately I no longer have a test for this).

Kind Regards

--------------- Edit:
The files are not duplicated. There are two folders on with Camel Case and one with lower case. I deleted the Camel case folder and the lower case folder appears. This seems to be a bug in WinRAR. MS Explorer has the same problem.

It seems that the problem is: Having the same class name in different packages leads to confusion. You should not import this without a hint. The best would be to tell the user about the conflict and let him choose. He can abort the import and the old extension remains. Or import the new extension overwriting the old one.

Are you using this to create the extension or what else?