Handle file system case-sensitivity in TranslatedLibraryBuidler #1
Labels
Area-Translation
Issues concerning the translation from libclang into Biohazrd
Blocked
Bug
EdgeEdgeEdgeCase
Edge case issues which are theoretically possible, but will never be encountered in reality
Milestone
TranslatedLibraryBuilder
treats file paths as case-insensitive regardless of the case-sensitivity of the file system. This was done to avoid problems arising between a difference in casing between what is provided toTranslatedLibraryBuilder
, the file system, and the#include
directives in the C++ source. (We regularly compare filenames for the sake of resolving which Clang cursors correspond to which input files -- or to determine if the cursor is out-of-scope.)We do not expect well-formed C++ code to involve incorrect casing or to have multiple files with the same casing as both practices are non-portable. (The former is a warning
-Wnonportable-include-path
in Clang.) As such, this is not really a high priority as it's only really problematic with poorly-written C++ libraries on Linux or unusual macOS/Windows systems.The ideal solution would be to normalize paths to their actual casing once dotnet/runtime#14321 is realized.
I am hesitant to conditionally use case-sensitive comparisons based on the
OSPlatform
because case-sensitivity is an attribute of the file system, not the OS. (ext4 even allows case-sensitivity as an attribute of a directory.)The text was updated successfully, but these errors were encountered: