-
Notifications
You must be signed in to change notification settings - Fork 560
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
BBC: perl-5.34.0 broke Path::Class (Windows only, AFAICT) #20039
Comments
Do we know what actual change in |
It kind of has to be |
I probably won't be able to test this until Monday. |
I've taken a clone of current blead (commit c870f3e) and reverted c8c3675 by manually editing Cwd.xs. I then built this perl and found that the perl test suite still passed all tests. One thing I don't understand is that when I build Path-Class-0.37 on perl-5.34 or 5.36 by running Anyway - Path::Class is fine with PathTools-3.78, but is broken byPathTools-3.80.
Apart from the section that I've already tried reverting, is there something else that looks suspicious in that ? Cheers, |
That might be the most interesting fact, actually. Perhaps this branch was never exercised on Windows before, and now it is, and causes the failures we're seeing. |
I guess that means |
I inserted some warn() statements in Cwd.xs and established that I've no idea what needs to be done. |
TBH I think this needs to get fixed on the Path::Class side. |
Not IMO. I think the |
I think you voided the warranty the moment you did |
That is indeed obvious, but it's not the end of the story. I understand I can fix the So I agree that the To push the animals-in-odd-environments metaphors farther - for the moment I consider the |
What does that |
For example It seems the problem is that the unix version of Perl 5.32:
blead:
|
Naturally, the native version of
|
Looks like GIGO to me |
@xenu has probably already provided the info that you need. The problematic test in t/01-basic.t is:
According to warn() statements that I inserted into t/01-basic.t, both Cheers, |
What happens there is that the unix realpath code considers |
Very much agreed. Do keep in mind that File::Spec is literally just an alias to return a File::Spec subclass based on the operating system currently running: https://metacpan.org/dist/PathTools/source/lib/File/Spec.pm As such, if you lie to File::Spec intentionally AND also use actual paths from your system, then it is your personal duty to remain aware that you are feeding it garbage and to consider the resulting garbage correctly. This is very much not a "blead breaks cpan" case (unless that includes "the cpan module is wrong"), and i say this as a very long-going windows Perl developer. |
An observation - it appears that
So it sort of says "it might work", but doesn't make a lot of guarantees. As @wchristian points out,
so the hack of setting There are two other real problems to fix (as I'm not the first to observe): the first is the mixing of Unix paths & native paths, at line 96 here:
The The other problem is that For completion - @xenu or someone else with easy access to Windows, if it's convenient, could you please run the following under both 5.32 and blead, to take
|
On perl-5.32.0:
Same result on blead:
Cheers, |
Very interesting - so apparently |
On perl-5.32.0:
We see there that, on perl-5.32.0,
It's making my head spin ;-) Cheers, |
@kenahoo Where do you think we are with this? "Path::Class is broken" feels like a blocker… |
Quite. It's a weird quirk of behaviour that it isn't readonly. My suggestion for this would be to not alter the value, but simply skip the tests if it's not what was expected. E.g. plan skip_all => "This test only runs on Windows" if $^O eq "MSWin32"; |
Removed release blocker: this has been broken since v5.34. It'd be nice to get it fully resolved, but I don't see that happening right away. |
Module:
Path-Class-0.37
Description
On MS Windows with perl-5.34.0 or later, we find that during the the running of the test suite. t/01-basic.t fails with:
Steps to Reproduce
On MS Windows with perl-5.34.0 or later, run:
cpan -i Path::Class
I believe it's probably up to Path::Class to fix this issue and there's a bug report filed against Path::Class at:
kenahoo/Path-Class#55
t/01-basic.t innovatively tries to get File::Spec to provide 'Unix' path formatting on Windows by resetting $^O to 'Unix', in a BEGIN{} block at the start of the file.
This is actually quite successful until we get to perl-5.34.0. (The breakage, of course, probably occurred somewhere in the 5.33 devel cycle.)
I'm assuming that if File::Spec had really wanted to provide that capability, then it would have come up with something better than clobbering $^O.
If someone can confirm that there's nothing here for the perl developers to attend to, then we can close this issue and move on.
There's also some additional discussion and observations at https://www.perlmonks.org/?node_id=11145885
Perl configuration
The text was updated successfully, but these errors were encountered: