Closed eserte closed 3 years ago
Read my mind. Was gonna look into this tomorrow, thanks for checking.
Will patch tomorrow morning.
v0.13 was when felipe added redefine() so I'll pin to that
@teodesian: Is the change supposed to be in 1.41? The diff between 1.40 and 1.41 does not show any relevant changes, just version increases: https://metacpan.org/diff/file?target=TEODESIAN/Selenium-Remote-Driver-1.41/&source=TEODESIAN%2FSelenium-Remote-Driver-1.40
Gave it another shot. These things happen, will keep an eye out
oof. I guess
use MODULE VERSION
doesn't work? Looks like the CPANTesters reports are still giving out 'no redefine' despite using a version with the method.
I'm seriously tempted to take the nuclear option on the table and
use v5.32.0
Well, just look at the version history of https://metacpan.org/release/Test-MockModule and you see the problem --- the author switched from 0.16 to v0.17.0. However when comparing the two versions the latter resolves to 0.017000, which is less than the older version. So everybody having Test::MockModule <= 0.16 installed can never upgrade automatically to the newer version, only by manually removing the old version.
so, my only serious options are:
Fixing this is now low priority for me.
Like you've mentioned it'll just come up again for someone else if we go with 5. This will also happen for 3.
I consider 4. to be highly unlikely, so my practical option is just gonna be 1, as it'll be less work than 2.
In the old days I always used Least-Common-Denominator sets of functionality and deps for precisely these reasons. I guess it's time to go back to that.
Which probably means I need to quit writing perl, as I generally don't have to put up with this in node or rust.
@teodesian: Actually I did not look into the whole version history of Test::MockModule. The problematic switch between 0.16 and v0.17.0 was corrected in the following version, which was v0.170.0. So specifying v0.170.0 as the minimum version should be enough.
ehhh, whatever. I replaced all usage of redefine() with mock() so it won't happen anymore.
Teaches me to not use new functionality in perl, I'm back to beating rocks together
Sorry, I have to comment again (in the hope that all parties learn something). I was wrong about Test::MockModule doing things wrong (well, it did with the v0.17.0 release, but this was corrected the very same day ny creating a v0.170.0 release).
The only problem was using v0.13.0 as the minimum version --- it should be 0.13.
I just went by what was the needed versin in Changes. I guess I have to dig through backpan to find what it actually was.
This feels like it's the 'old versions of perl don't understand new version numbers' thing, but it shouldn't be thanks to using the normal tricks to require anything past 5.6.
Very interesting, thanks for looking into it. That said, I think I'm gonna keep my policy to be 'use deps as they were flash-frozen the day that perl version was first released' with modules like this that support perls as old as my nephews.
I suspect the smokers running these tests are of similar vintage, so I'll run into a similar problem eventually if I don't.
The problem is this line: https://metacpan.org/source/TEODESIAN/Selenium-Remote-Driver-1.42/t%2F01-driver.t#L9 By using "v" in the version specification you automatically switch to two-dot version numbers. That is, you actually specified v0.13.0. This translates to 0.013000, which satisfies essentially every Test::MockModule version ever released (except for 0.01).
On a few of my smoker systems the test suite fails:
Statistical analysis suggests that this happens if Test::MockModule is too old --- with 0.11 it fails, with 0.170.0 and newer it passes: