Windows-style paths result in module name / path mismatch
typeswitch-dev opened this issue · 3 comments
Passing windows-style path for the input file results in an error that the module name doesn't match the path, e.g.:
M:\> bin\mirth0.exe -o mirth.c mirth\main.mth
Compiling mirth\main.mth
Building.
src/mirth\main.mth:1:8: error: expected module name to match path
mirth/main.mth
mirth\main.mth
[The tricky bit is figuring out how to fix this without breaking the golden tests on windows. Maybe we need to add a command-line option to use unix paths regardless of the operating system, and use that in the test script.]
Is there a drawback to converting Windows-style paths to unix paths before using them?
Is there a drawback to converting Windows-style paths to unix paths before using them?
It's possible that this would work for the current issue. My concern with this approach is that a second conversion needs to be done to generate appropriate error messages. It might be best to work with host-independent paths internally.
Oh this has already been fixed.