Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the MooX-Options CPAN distribution.

Report information
The Basics
Id: 122350
Status: resolved
Priority: 0/
Queue: MooX-Options

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

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



Subject: fatalized warnings cause unnecessary failures
"use warnings FATAL => 'all';" fatalizes *all* warnings, even one that might appear in an upstream module that you are using. This means that if *any* warning happens anywhere, even one that you cannot control, the program stops. In a production environment this is a very bad thing. I'd much rather have a warning in my log that I can deal with during waking hours, rather than at 3am on a long weekend.
On Mon Jul 03 18:28:52 2017, ETHER wrote: Show quoted text
> "use warnings FATAL => 'all';" fatalizes *all* warnings, even one that > might appear in an upstream module that you are using. This means that > if *any* warning happens anywhere, even one that you cannot control, > the program stops. In a production environment this is a very bad > thing. I'd much rather have a warning in my log that I can deal with > during waking hours, rather than at 3am on a long weekend.
I read this very rare from always the same group of people. But it never comes with a sane test code demonstrating the issue. Requirements to the test code: 1) it should be reproducible without hours of preparation 2) it should not be coverable by a reasonable CI
On 2017-07-04 01:13:09, REHSACK wrote: Show quoted text
> On Mon Jul 03 18:28:52 2017, ETHER wrote:
> > "use warnings FATAL => 'all';" fatalizes *all* warnings, even one > > that > > might appear in an upstream module that you are using. This means > > that > > if *any* warning happens anywhere, even one that you cannot control, > > the program stops. In a production environment this is a very bad > > thing. I'd much rather have a warning in my log that I can deal with > > during waking hours, rather than at 3am on a long weekend.
> > I read this very rare from always the same group of people. But it > never comes with a sane test code demonstrating the issue. > > Requirements to the test code: > 1) it should be reproducible without hours of preparation > 2) it should not be coverable by a reasonable CI
Ok, here's an example. In the 5.24 release cycle, perl deprecated the use of { in a regular expression without an escape. Usage of a regexp like qr/{/ now results in a warning like: "Unescaped left brace in regex is deprecated here". If some bit of code that MooX::Options uses (say, Module::Runtime) contains some code that starts generating deprecation warnings, ** MooX::Options will die ** even though this is 1. just a warning and code behaviour remains unchanged, 2. not even something that MooX::Options can fix. Sometimes warnings happen unpredictably, and *** they should remain warnings, not fatal ***. Waking people up in the middle of the night because their program stopped working, and it turns out to be something that isn't actually an emergency, makes sysadmins very very grumpy and this is passed on to the programmers. Please do not make all warnings fatal.
Giving me an example means: How can te described change pass from development to production without passing a sane CI, sane integration stage and run into a production error (ringing admins out of their bed for test environments should lead to shot managers, not developers)? I understand the issue - but please don't update production code that way you run into such a condition. That's bad attitude and forcing modules away from the sane behavior "die early" is the wrong solution. That's a philosophical issue and depending on the targetted environment both philosophies are right. But the "agile" philosophy which is rolling out quick has the option of a rollback. The unattanded IoT software which dies later because of time presure noone checked the warning and behavioral change follows the introduced warning ... I don't remind exactly (to many books regarding that topic), but e.g. https://www.amazon.com/Write-Portable-Code-Introduction-Developing/dp/1593270569 or http://www.whyprogramsfail.com/ might explain that deeper. Maybe even Scott Meyers refers to "die early" - was around that time ...
Switched to strictures according to recommendation by warnings documentation.