Comments (6)
Oh… my… goodness.
The TestApp view class modules have the correctly camel-cased name in my source tree:
$ ll t/lib/MyApp/View
total 40
-rw-r--r-- 1 ap staff 226 24 Oct 20:14 AltContentType.pm
-rw-r--r-- 1 ap staff 145 24 Oct 20:14 AppConfig.pm
-rw-r--r-- 1 ap staff 852 24 Oct 20:14 DynamicPath.pm
-rw-r--r-- 1 ap staff 234 24 Oct 20:14 PkgConfig.pm
-rw-r--r-- 1 ap staff 241 24 Oct 20:16 TemplateClass.pm
But that’s not what Git sees:
$ git ls t/lib/MyApp/View
t/lib/MyApp/View/AltContentType.pm
t/lib/MyApp/View/Appconfig.pm
t/lib/MyApp/View/DynamicPath.pm
t/lib/MyApp/View/Pkgconfig.pm
t/lib/MyApp/View/TemplateClass.pm
Note the difference in casing! PkgConfig.pm
vs Pkgconfig.pm
.
Here’s what happened:
-
My machine is a Mac. Its filesystem is case-preserving but case-insensitive.
-
I used the test suite from Catalyst::View::TT as a starting point. In there are files called
Pkgconfig.pm
andAppconfig.pm
. Of course I committed these. -
I refactored the test suite a bunch. And then some. And some more. One of my changes was to capitalise the C in “Config” in the names of these classes – changing all the mentions in code as well as renaming the files.
-
Because the filesystem is case-insensitive, Git could still find the same files under their old names, so it didn’t notice I had renamed the files. And I in turn didn’t notice that Git didn’t notice that anything had changed. So the rename was never recorded by Git.
-
My release process is just
perl Makefile.PL && make dist
. Part of myMakefile.PL
is to generateMANIFEST
… from Git. EUMM then readsMANIFEST
to collect the files to put in the dist dir. And because the filesystem is case-insensitive, just as Git succeeds when it goes looking for those files using their old names, so succeeds EUMM. So it creates a tarball that contains the files under their non-camel-cased names. And even though I carefully inspect tarballs on release, this was a flaw too subtle for me to pick up on by eye. -
This broken tarball works on my machine! It installed on another perl just fine. That’s because the names in the Perl code all use the camel-cased names: both the references to the classes and their package statements use the same casing. And because the filesystem is case-insensitive, when perl tries to find the files under their camel-cased names… even though the filenames are wrong… it succeeds! So to a perl on my system, everything checks out.
That’s the story of how I shipped a broken tarball to CPAN.
Thank you very much for reporting this. I’ve not yet gotten my (blood red) daily CPAN Testers report.
P.S.: The story apparently doesn’t actually end there, because Windows also has a case-preserving case-insensitive filesystem, and yet the Windows-based CPAN Testers reports are all FAILs just like the Linux- and BSD-based ones. More intriguingly, I get the same failure myself now if I start with a fresh tarball. In one of my perls. That’s not making sense to me right now – the story I had above seemed airtight. So I checked and I’m not hallucinating that it installed fine in the other perl – that really happened. I don’t yet know what’s going on.
from catalyst-view-template.
(Also, 👋 long time no talk.)
from catalyst-view-template.
Fixed in 51aa08b, which is winding its way to CPAN as we speak.
from catalyst-view-template.
Lack of sleep? 😄 lack of ☕ ?
from catalyst-view-template.
🙂 Lack of sleep always applies. 🙁 But I don’t know how I would have caught this, frankly. I wasn’t even on the lookout for the issue. (The simple answer is obviously that I need to be working out of a case-sensitive filesystem…)
from catalyst-view-template.
from catalyst-view-template.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from catalyst-view-template.