Skip to content

Wrong check for case insensitive duplicate archive entries #248

Closed
@Bananeweizen

Description

@Bananeweizen

I see this lots of these warnings in a Tycho build:

[WARNING] Archive entry 'org/eclipse/tycho/plugins/p2/extras/Repository.java' and existing file 'C:\dev\tycho\git\tycho\tycho-extras\tycho-eclipserun-plugin\target\maven-plugin-plugin-sources\org.eclipse.tycho.extras\tycho-p2-extras-plugin\4.0.0-SNAPSHOT\sources\org\eclipse\tycho\plugins\p2\extras\Repository.java' names differ only by case. This may lead to an unexpected outcome on case-insensitive filesystems.
[WARNING] Archive entry 'META-INF/m2e/lifecycle-mapping-metadata.xml' and existing file 'C:\dev\tycho\git\tycho\tycho-extras\tycho-eclipserun-plugin\target\maven-plugin-plugin-sources\org.eclipse.tycho.extras\tycho-p2-extras-plugin\4.0.0-SNAPSHOT\sources\META-INF\m2e\lifecycle-mapping-metadata.xml' names differ only by case. This may lead to an unexpected outcome on case-insensitive filesystems.
[WARNING] Archive entry 'META-INF/maven/org.eclipse.tycho.extras/tycho-p2-extras-plugin/pom.xml' and existing file 'C:\dev\tycho\git\tycho\tycho-extras\tycho-eclipserun-plugin\target\maven-plugin-plugin-sources\org.eclipse.tycho.extras\tycho-p2-extras-plugin\4.0.0-SNAPSHOT\sources\META-INF\maven\org.eclipse.tycho.extras\tycho-p2-extras-plugin\pom.xml' names differ only by case. This may lead to an unexpected outcome on case-insensitive filesystems.

That's raised by a check for archive entry names that are identical except for different case. However, these are all false positives since the warning is raised because of the 2 compared Strings differing in their file separator, e.g. the relevant parts from the first message are:

org\eclipse\tycho\plugins\p2\extras\Repository.java
org/eclipse/tycho/plugins/p2/extras/Repository.java

This has also been discussed in #180, but I feel that change is not sufficient, since both inputs need to be normalized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions