Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Dist-Zilla CPAN distribution.

Report information
The Basics
Id: 82380
Status: rejected
Priority: 0/
Queue: Dist-Zilla

People
Owner: Nobody in particular
Requestors: tommy [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: auto prereq detection failed to detect prereq in my distribution File::Util
File::Util v3.33 throu 3.35 all failed CPAN testers reports because I created the distributions with dzil release. The 3.35 release of File::Util will be attached to this report, if I'm given that option (right now the form has no upload/attach option). The git repository for File::Util is at git://github.com/tommybutler/file-util.git -- this is included in the bug report here because the failed versions of File::Util are scheduled to be removed from CPAN and won't be available after 72 hours (or less) from now. CPAN testers failure reports for File::Util are here: http://static.cpantesters.org/distro/F/File-Util.html#3.35
File::Util v3.35 is attached to this follow up
Subject: File-Util-3.35.tar.gz
Download File-Util-3.35.tar.gz
application/x-gzip 59.4k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #82380] auto prereq detection failed to detect prereq in my distribution File::Util
Date: Thu, 3 Jan 2013 13:40:16 -0500
To: Tommy Butler via RT <bug-Dist-Zilla [...] rt.cpan.org>
From: Ricardo Signes <rjbs [...] cpan.org>
* Tommy Butler via RT <bug-Dist-Zilla@rt.cpan.org> [2013-01-03T13:26:15] Show quoted text
> Subject: auto prereq detection failed to detect prereq in my distribution > File::Util > [...] > File::Util v3.33 throu 3.35 all failed CPAN testers reports because I > created the distributions with dzil release.
Can you be more specific? What prereq did it fail to detect? -- rjbs
Download signature.asc
application/pgp-signature 490b

Message body not shown because it is not plain text.

Sorry. Exception::Handler was not detected as a preprequisite. It's require'd around line 2095 of Util.pm On Thu Jan 03 13:40:28 2013, RJBS wrote: Show quoted text
> Can you be more specific? What prereq did it fail to detect?
On 2013-01-03 13:40:28, RJBS wrote: Show quoted text
> Can you be more specific? What prereq did it fail to detect?
I see, by looking at your git repository. Your only use of Exception::Reporter is in an __END__ section, which is not considered code, and not scanned. It is only loaded as code via string eval at runtime by the AutoLoader module. AutoPrereqs is not going to detect this unless you or someone else writes a scanner plugin for Perl::PrereqScanner that notices the use of AutoLoader and goes back to scan the __END__. -- rjbs
My good friend, the CPAN testers would seem to differ with your assessment of what is and what isn't "CODE". It _is_ code. It's always been in the list of prerequisites for File::Util until dzil documentation gave me the false warm fuzzy that such a thing was "no longer needed". If you aren't going to fix Dist::Zilla, fix the broken documentation to clarify what you feel is and isn't Perl: http://dzil.org/tutorial/convert-dist.html
On Thu Jan 03 13:50:46 2013, TOMMY wrote: Show quoted text
> My good friend, the CPAN testers would seem to differ with your > assessment of what is and what isn't "CODE". It _is_ code.
Yes. Code that you've hidden in an __END__ section. The perl compiler stops reading a file entirely at __END__. This is documented. Therefore, so far as perl is concerned, it is not code. The AutoLoader module violates this assumption. It evals a string that, so far as perl knows, it could have got from -anywhere-. The simple answer here would be "stop using AutoLoader because AutoLoader is crazy". But since __END__ sections are -never- -touched- by the perl compiler itself, and this is -documented-, the fact that your failure to explicitly tell dzil that you have dependency that don't exist in normal code is your failure, not dzil's. CPAN testers are merely pointing out that there is a problem, they don't have an opinion to disagree with. Please fix the problem at its root - in your module.
You think it's crazy to use a core Perl module? Odd that you spend time writing your own mechanism to delay compilation of code until runtime and you call AutoLoader crazy. I'm not particularly married to it; I've actually started using it less. Maybe you haven't read the Dist::Zilla documentation as recently as I have. It literally says it is unecessary to list anything as a Prerequisite when you use the AutoPrereqs plugin. Just for context, I included the link to the documentation in my report. You can split hairs all day about what you think is or is not code/perl. A prerequisite is a prerequisite not based on how code is seen by the Perl interpreter, but based on whether or not it is needed for other code to function. Here's the kicker, and here's where I hope your "recovering a-hole" complex doesn't kick into overdrive Matt: the assertion made in the Dist::Zilla documentation that I could remove my prerequisites section in the dist.ini file if I used the AutoPrereqs plugin is patently false. That means broken. Again, split all the hairs you want, but it's just false. I read the dzil docs, I removed a module from my prereqs list because I believed it, and I was misled. That's the bottom line --not whether you think AutoLoader is crazy. On Thu Jan 03 16:05:51 2013, MSTROUT wrote: Show quoted text
> On Thu Jan 03 13:50:46 2013, TOMMY wrote:
> > My good friend, the CPAN testers would seem to differ with your > > assessment of what is and what isn't "CODE". It _is_ code.
> > Yes. Code that you've hidden in an __END__ section. > > The perl compiler stops reading a file entirely at __END__. This is > documented. > > Therefore, so far as perl is concerned, it is not code. > > The AutoLoader module violates this assumption. It evals a string
that, Show quoted text
> so far as perl knows, it could have got from -anywhere-. > > The simple answer here would be "stop using AutoLoader because > AutoLoader is crazy". > > But since __END__ sections are -never- -touched- by the perl compiler > itself, and this is -documented-, the fact that your failure to > explicitly tell dzil that you have dependency that don't exist in
normal Show quoted text
> code is your failure, not dzil's. > > CPAN testers are merely pointing out that there is a problem, they
don't Show quoted text
> have an opinion to disagree with. > > Please fix the problem at its root - in your module.
On 2013-01-03 19:07:00, TOMMY wrote: Show quoted text
> Maybe you haven't read the Dist::Zilla documentation as recently as I > have. It literally says it is unecessary to list anything as a > Prerequisite when you use the AutoPrereqs plugin. Just for context, I > included the link to the documentation in my report.
The documentation for AutoPrereqs says: Show quoted text
> This plugin will extract loosely your distribution prerequisites > from your files using Perl::PrereqScanner. If some prereqs are > not found, you can still add them manually with the Prereqs plugin.
In other words: it might not find everything, and if you want to know how it looks, go check out Perl::PrereqScanner. In the end, that analyzes your document with PPI, which treats the contents of __DATA__ and __END__ as opaque blobs. As I said, one could write a plugin to make it notice the use of AutoLoader and rescan those sections, but it doesn't do that by default, because those sections are not considered code in Perl. You're just using a bolt-on that evaluates them (or the files built from them) later. Show quoted text
> You can split hairs all day about what you think is or is not > code/perl. A prerequisite is a prerequisite not based on how code is > seen by the Perl interpreter, but based on whether or not it is needed > for other code to function.
AutoPrereqs and Perl::PrereqScanner are functioning as intended and as documented. The tutorial is talking about them in a very limited circumstance: the tutorial's example. Now you know, too, how it works, and you can adjust your expectations accordingly. I will consider whether a few words could be added to that tutorial page to temper expectations without confusing the issue. Show quoted text
> Here's the kicker, and here's where I hope your "recovering a-hole" > complex doesn't kick into overdrive Matt: [...]
Your unpleasant attitude is not welcome here. I don't know what has upset you, and I'm sorry if it was your experience with my free software. I don't plan to sit around and suffer through this, though. -- rjbs
On Thu Jan 03 19:47:32 2013, RJBS wrote: Show quoted text
> I will consider whether a few words could be added to that tutorial > page to temper expectations without confusing the issue.
There's the ticket! Show quoted text
> Your unpleasant attitude is not welcome here. I don't know what has > upset you, and I'm sorry if it was your experience with my free
software. I don't plan to sit around and suffer through Show quoted text
> this, though.
OK, some perspective then... I took time out of my day to report a problem I was having with your software so that you could improve it. Instead I was basically told to go away and the words "crazy" and "failure" were used as descriptors for my own code. Nice, huh? That's called adding insult to injury. If you want to reject the bug, or dismiss the concern, it's possible to do it with class. For example, you could say "we acknowledge your concern but it isn't something we consider a defect and we will not be making an changes. Thank you for your bug report." It's called manners. If you want respect, be respectful. Don't tell people they are a failure or that they are crazy, mkay? And with that, thank you for Dist::Zilla. I like it, I use it, I think the tutorial documentation should be amended so other people using Dist::Zilla don't get bitten by the same gotcha. Have a nice day.
On Thu Jan 03 20:57:11 2013, TOMMY wrote: Show quoted text
> OK, some perspective then... I took time out of my day to report a > problem I was having with your software so that you could improve it. > Instead I was basically told to go away and the words "crazy" and > "failure" were used as descriptors for my own code. Nice, huh? That's > called adding insult to injury.
I said AutoLoader is crazy. I did not say your code was crazy. I was implying that you might want to consider removing AutoLoader, since it involves more crazy than actual benefits in most cases - especially since it's not particularly well-encapsulated crazy and as a result causes knock on problems like the exact one you're experiencing. I said that you had failed to tell dzil about a prereq. Because you had. I didn't say your -code- was a failure. We all fail to configure things correctly sometimes. I was specifying the exact problem in the assumption that you, as a fellow programmer and intelligent human being, would then more easily be able to fix it. Neither of these things were insults. At no point did I say -you- were crazy, or that you -were- a failure, and I'm sorry that you read that implication into my words. Show quoted text
> And with that, thank you for Dist::Zilla. I like it, I use it, I think > the tutorial documentation should be amended so other people using > Dist::Zilla don't get bitten by the same gotcha. Have a nice day.
I'd love to see you propose a patch clarifying that; if you got bitten, then there'll probably be other people who expect the same thing and end up with the same problem - but I don't read that documentation the way you did, so I'm not sure how to rephrase it to fix that. Hopefully you can figure out a way to rephrase it that will do so, and hopefully you'll choose to contribute that rephrasing. However, the point where this discussion went off the rails was when your response to rjbs telling you exactly what the problem was was "My good friend, the CPAN testers would seem to differ with your assessment", rather than "oh, um, that's not how I read <this Show quoted text
documentation> - maybe it could be updated to clarify that". Most
maintainers tend to react badly to that sort of passive aggressive communication, and fundamentally I jumped into the conversation both to try and help you, and to try and avoid rjbs further experiencing your devaluing his contributions and knowledge by snide responses rather than constructive engagement. Hopefully that provides you with some perspective as to how you came across, and how to more successfully interact with other CPAN authors in future.
For future readers of this ticket, the initial reporter submitted a patch to the tutorial, it was discussed, and the final result is this patch written by me and found appropriate by the OP: https://github.com/rjbs/dzil.org/commit/8e1954f4236e4485f1cad4e3ea06c29b44a40cfe -- rjbs