<div dir="ltr"><div>A few bugs I've looked at recently relate to two compiler output files "clashing" in the sense that they end up mapping to the same actual file in the file system.</div><div><br></div><div>Two of these are due to case-insensitive filesystems:</div><div><br></div><div style="margin-left:40px"><a href="https://bugs.openjdk.org/browse/JDK-8287885">JDK-8287885</a> - Local classes cause ClassLoader error if the type names are similar but not same</div><div style="margin-left:40px"><a href="https://bugs.openjdk.org/browse/JDK-8296656">JDK-8296656</a> - java.lang.NoClassDefFoundError exception on running fully legitimate code</div><div><div><br></div><div>I submitted a PR for the first bug
above, but it's a gross combination of being an ugly hack and also not really
solving the real problem (I'm going to withdraw it).<br></div><div><br></div></div><div>Side note: another related bug, though this one is not the filesystem's fault (it's due to inherent clashing in the JNI specification) but would be affected by some of the ideas mentioned below:<br></div><div><br></div><div style="margin-left:40px"><a href="https://bugs.openjdk.org/browse/JDK-7016187">JDK-7016187</a> - `javac -h` could generate conflict .h for inner class and class name with '_'</div><br><div>Survey question: What do you think should be done about this case-insensitive filesystem problem?</div><div><ol><li>Nothing. Resolve all such bugs "Not an Issue" with the comment "Go away! Case-insensitive filesystems are not supported!"<br></li><li>Add a new option <span style="font-family:monospace">-Xlint:fileclash</span> that enables checking for clashes (e.g., at the <span style="font-family:monospace">JavacFileSystemManager</span> layer).</li><li>Same as #2 but instead of requiring a lint flag, test the filesystem at startup and proactively enable the warning only if case-insensitive</li><li>Add new compiler flags <span style="font-family:monospace">-dzip</span>, <span style="font-family:monospace">-szip</span>, <span style="font-family:monospace">-hzip</span> (corresponding to <span style="font-family:monospace">-d</span>, <span style="font-family:monospace">-s</span>, <span style="font-family:monospace">-h</span>) that specify ZIP files for output instead of directories</li><li>Your other clever idea...<br></li></ol></div><div>Thanks,</div><div>-Archie</div><div><br></div><div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Archie L. Cobbs<br></div></div></div>