-
Notifications
You must be signed in to change notification settings - Fork 49
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
5.36 | File::Find::Rule issues #88
Comments
With x64 build of portable SP-5.32.0 I'm getting:
With x64 build of perl-5.37.9 (current devel release - though 5.37.10 will be out in a day or two), I'm getting the nearly identical:
With x64 perl-5.36.0, I get:
Not sure where that leaves you. Line 11 is:
and line 13 is:
Cheers, |
Another data point. Installing File::Find::Rule::Perl with 5.36 gets these failures. They look similar to those in #84
|
Looking at File::Find::Rule it is using File::Spec, but if File::Find is returning paths with forward slashes on Windows now then File::Spec operations won't work. (Unless it also has been updated to handle forward slashes). See sub starting at https://metacpan.org/release/RCLAMP/File-Find-Rule-0.34/source/lib/File/Find/Rule.pm#L547 Edit: Although this is not borne out by checking.
|
Thanks @sisyphus . It seems The main issue is the paths. On 5.36 dev I am getting an empty array. I suspect there might be a missing setting somewhere in the 5.36 config. |
Nah ... they're both set to Cheers, |
If I replace the original:
with
then 5.32.0 and 5.36.0 pass both tests (and no warnings).
Cheers, |
Thanks again Rob. Which 5.36 dev version are you using? If it's the initial release then that did not have the File::Find patch applied. The current one is https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/tag/dev_20230318 I should have been clearer about that but if you're using the initial release then that helps narrow things down. |
This could be an issue in File::Find where calling code is not expecting paths with forward slashes. Excel::Writer::XLSX 1.10 is showing failures for perl 5.37.8. These are fixed in 1.11. It's just speculation, but perhaps File::Find on Windows should return paths with whatever slashes were passed in (if this is detectable) and backslashes by default. |
I was actually using my own build of 5.36.0 Running your original script on both 20230316 and 20230318, I get:
Cheers, |
Thanks once again Rob. The The fact that your 5.37.9 build has the same error indicates to me that the changes in Perl PR20008 need further tweaking as it seems File::Find is returning different data that the calling libraries are not expecting. Alternately the expectations of the calling code need to be updated, as was done in jmcnamara/excel-writer-xlsx#284. |
I'll probably bow out of this one, I think. It all just confuses me. I still don't understand why your grep search is case-sensitive. If I replace
with
then on sp536_20230318, I get:
Cheers, |
Removal of C:\Windows was to simplify things in the next part, but obviously this has not survived contact with reality :) I had not considered paths with windows variables in them (without them being expanded to their actual paths). If such directories are passed through to File::Find without being then it won't know what to do with them. In any case, your results seem to confirm the main issue, that File::Find is behaving differently on windows for 5.37.9 and the "sp5.36dev" build. Edit - and that this behavioural change is not expected by several of the libraries on CPAN. @genio - any thoughts? |
The issue (symptom) in File::Find::Rule is where it is using regexes to check file paths in its File::Find wanted sub, but the paths in File::Find use forward slashes on Windows since the application of Perl/perl5#20008. Updating the File::Find code to use forward slashes for
I'll report this to File::Find::Rule, but the general question is whether this should be handled in File::Find, as there are no doubt other packages out there that will hit the same problems. @xenu - FYI |
Reported to FIle::Find::Rule at https://rt.cpan.org/Ticket/Display.html?id=147252 |
Although this issue here was in the sub passed to File::Find, so there is nothing File::Find can do about that. |
PR submitted to File::Find::Rule. If need be then we can patch the module for 5.36. |
I'd say let's patch it for now so we can get over this particular hump. Sorry, I've been a bit MIA. I'll try to get back on this |
I've had no response from the maintainer so patching looks the way to go, using a dev version ID (0.41_01). The simplest approach is to put the tarball in the share dir on this repo. We could also add it to strawberryperl.com next to some of the other patched modules. Alternately I can list it as a release on my fork. |
Patched distro is at https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/dev_20230318/File-Find-Rule-0.34_01.tar.gz It will be visible in the build script when next I push changes. |
This might be an issue with the 5.36 builds, hence I am reporting here first. If it can be replicated using a build of 5.37.x then I'll report it upstream to File::Find::Rule (although maybe it's a File::Find issue underneath).
The code below passes on 5.32, but fails on 5.36. The array populated from paths with backslashes is empty.
My suspicion is that the patching we are doing to File::Find is incomplete, or the patch itself is incomplete. Can someone who has compiled a recent 5.37 on windows please try this code and report? @sisyphus perhaps?
5.32:
5.36:
The text was updated successfully, but these errors were encountered: