New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v7.15 and /
vs. \
troubles in Mojo::(File|Home) on MS Windows
#1031
Comments
Wow, what a mess. |
Thanks again for the analysis. No idea if that's the right fix, but at least it works for now and doesn't require API changes. |
Honestly, i'm happy we can get away without losing too much performance. 😆 |
Hi, it seems like you have forgotten to patch - return Mojo::Collection->new(map { $self->new($_) } sort keys %files);
+ return Mojo::Collection->new(map { $self->new(canonpath($_)) } sort keys %files); You have instead applied exactly the same change to |
Looks like i mixed up |
Steps to reproduce the behavior
t/mojo/home.t
+t/mojo/file.t
fail duringdmake test
Expected behavior
tests should pass
Actual behavior
The failure details:
My analysis
The possible pacth is here https://github.com/kmx/mojo/commit/53636e85c7975c055e8af5c2d887110bcce9cf3b but in this case I am not 100% sure whether the chosen workarounds are the best ones.
There are basically 2 separate issues:
/
and\
in testsAd Mojo::Home::detect - the trouble is that on MS Windows the %INC might contain very strange things. Here is for example a fraction of what I see:
here I am proposing forcefully replacing
\
with/
- see https://github.com/kmx/mojo/commit/53636e85c7975c055e8af5c2d887110bcce9cf3b#diff-52d3ad944c9afec616d8ccbcc2f1ce2eR15The rest are mostly inconsistencies like
getcwd
returning:But
rel2abs
:And
$File::Find::name
containing things liket\mojo\lib\Mojo/BaseTest/Base1.pm
And in some case I even got upper/lower case drive letter mismatch like
D:\git\mojo-fork
vsd:\git\mojo-fork
.Simply a big mess which I decided to "solve" by applying
canonpath
at several places (mostly in *.t files where it is IMHO not a big deal but also at 2 places in Mojo::File)The text was updated successfully, but these errors were encountered: