On Monday, 30 January 2017 at 03:29:21 UTC, Chris Wright wrote:
I'd think the compiler would use the module name you supplied
in the imported module as the canonical name. Are you not
supplying module names? Are you changing them between
incremental compilation steps? Is the compiler ignoring them?
If you don't supply a module name, the compiler could obtain
the canonical file path with casing:
OSX:
http://stackoverflow.com/questions/370186/how-do-i-find-the-correct-case- of-a-filename
FSRef ref;
FSPathMakeRef(path, &ref, NULL);
FSRefMakePath(&ref, canonicalPath, MAX_PATH_LENGTH);
return canonicalPath;
Windows:
http://stackoverflow.com/questions/2113822/python-getting-filename-case-as- stored-in-windows
return GetLongPathName(GetShortPathName(path));
Linux:
(x) => x
Not sure if that would be better.
I haven't been using a module name inside the file itself, I
generally just use the filename.