Mailing List Archive

[perl #106538] Carp is missing a dot
# New Ticket Created by Father Chrysostomos
# Please include the string: [perl #106538]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=106538 >


This was brought up in #96672 but needs its own ticket:

$ perl -e 'die'
Died at -e line 1.
$ perl -MCarp -e 'croak Died'
Died at -e line 1

Where did my dot go?

The hard part is deciding what to do about cluck().
---
Flags:
category=library
severity=low
---
Site configuration information for perl 5.15.5:

Configured by sprout at Sun Dec 18 11:26:14 PST 2011.

Summary of my perl5 (revision 5 version 15 subversion 5) configuration:
Snapshot of: 5dca8ed9d28127c9f7a2e7ce5f8ba970da3608cd
Platform:
osname=darwin, osvers=10.5.0, archname=darwin-2level
uname='darwin pint.local 10.5.0 darwin kernel version 10.5.0: fri nov 5 23:20:39 pdt 2010; root:xnu-1504.9.17~1release_i386 i386 '
config_args='-de -Dusedevel -DDEBUGGING=-g'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include',
optimize='-O3 -g',
cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.2.1 (Apple Inc. build 5664)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib
libs=-ldbm -ldl -lm -lutil -lc
perllibs=-ldl -lm -lutil -lc
libc=, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector'

Locally applied patches:


---
@INC for perl 5.15.5:
/usr/local/lib/perl5/site_perl/5.15.5/darwin-2level
/usr/local/lib/perl5/site_perl/5.15.5
/usr/local/lib/perl5/5.15.5/darwin-2level
/usr/local/lib/perl5/5.15.5
/usr/local/lib/perl5/site_perl
.

---
Environment for perl 5.15.5:
DYLD_LIBRARY_PATH (unset)
HOME=/Users/sprout
LANG=en_US.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/bin
PERL_BADLANG (unset)
SHELL=/bin/bash
Re: [perl #106538] Carp is missing a dot [ In reply to ]
Father Chrysostomos wrote:
>Where did my dot go?

Added to Carp as 879b0cab8575cdc155c45c42eb82075648761936. This required
changing an autodie test, in partial violation of UPSTREAM=>"cpan".
autodie will need a new CPAN release with that change. (Also had to
change a handful of core-only tests.)

>The hard part is deciding what to do about cluck().

I added the dot only to the base message, and left the stack trace
unaltered. I don't see what punctuation would be appropriate at the
end of every stack trace line, and I don't want to make the last line
of it different from the others.

-zefram
Re: [perl #106538] Carp is missing a dot [ In reply to ]
On Thu, Feb 2, 2012 at 5:39 PM, Father Chrysostomos via RT
<perlbug-comment@perl.org> wrote:
> In commit 879b0cab8, Zefram has solved this by adding the dot to
> messages but leaving it off for subsequent lines of cluck() output.

I'm worried this will break tests of CPAN modules that rely a little
too much on the exact error (probably including at least one of my
modules).

Leon
Re: [perl #106538] Carp is missing a dot [ In reply to ]
Leon Timmermans wrote:
>I'm worried this will break tests of CPAN modules

There presumably will be a few. It's an easy fix for each. I think it's
an acceptable level of hassle. If you object, you've got two weeks to
render it contentious so that it has to be reverted. I'm holding off
on CPAN release for this reason.

-zefram
Re: [perl #106538] Carp is missing a dot [ In reply to ]
On Thu, Feb 2, 2012 at 6:00 PM, Zefram <zefram@fysh.org> wrote:
> There presumably will be a few.  It's an easy fix for each.  I think it's
> an acceptable level of hassle.  If you object, you've got two weeks to
> render it contentious so that it has to be reverted.  I'm holding off
> on CPAN release for this reason.

I'm fine with updating my module, it's trivial indeed. I'm worried
though that the list of modules with this issue is larger than
expected. We'll see soon enough how big the issue is.

Leon
Re: [perl #106538] Carp is missing a dot [ In reply to ]
Todd Rinaldo via RT wrote:
>So far, I've found needed test fixes in: autodie, Error, Log4perl and counting.

Not very many, then. This is looking viable.

-zefram
Re: [perl #106538] Carp is missing a dot [ In reply to ]
"Todd Rinaldo via RT" <perlbug-followup@perl.org> wrote:
:On Thu Feb 02 09:17:06 2012, LeonT wrote:
:> On Thu, Feb 2, 2012 at 6:00 PM, Zefram <zefram@fysh.org> wrote:
:> > There presumably will be a few. �It's an easy fix for each. �I think it's
:> > an acceptable level of hassle. �If you object, you've got two weeks to
:> > render it contentious so that it has to be reverted. �I'm holding off
:> > on CPAN release for this reason.
:>
:> I'm fine with updating my module, it's trivial indeed. I'm worried
:> though that the list of modules with this issue is larger than
:> expected. We'll see soon enough how big the issue is.
:
:So far, I've found needed test fixes in: autodie, Error, Log4perl and counting.

One thing worth mentioning: along the lines of Nick's recent patch to
separate two otherwise indistinguishable panics in perl core, there is
actually an advantage to being able to discover from where an error
message came.

Maybe the presence or absence of a trailing full-stop is not the ideal
way to signal provenance; but I think the general principle stands that
you actually do lose something by making the two identical.

Hugo
Re: [perl #106538] Carp is missing a dot [ In reply to ]
On 02/10/2012 05:01 PM, Zefram wrote:
> Todd Rinaldo via RT wrote:
>> So far, I've found needed test fixes in: autodie, Error, Log4perl and counting.
>
> Not very many, then. This is looking viable.

If somebody supplies me with two commits to run a CPAN smoke for, then I
can do that within a few days to get a more complete list.

--Steffen
Re: [perl #106538] Carp is missing a dot [ In reply to ]
Steffen Mueller wrote:
>If somebody supplies me with two commits to run a CPAN smoke for,
>then I can do that within a few days to get a more complete list.

Obvious choice is 62e90759156bee3f2bcbf1ac6fd055aeab81b9e4 (before)
and 879b0cab8575cdc155c45c42eb82075648761936 (after).

-zefram
Re: [perl #106538] Carp is missing a dot [ In reply to ]
On 11 February 2012 11:15, <hv@crypt.org> wrote:
> "Todd Rinaldo via RT" <perlbug-followup@perl.org> wrote:
> :On Thu Feb 02 09:17:06 2012, LeonT wrote:
> :> On Thu, Feb 2, 2012 at 6:00 PM, Zefram <zefram@fysh.org> wrote:
> :> > There presumably will be a few. �It's an easy fix for each. �I think it's
> :> > an acceptable level of hassle. �If you object, you've got two weeks to
> :> > render it contentious so that it has to be reverted. �I'm holding off
> :> > on CPAN release for this reason.
> :>
> :> I'm fine with updating my module, it's trivial indeed. I'm worried
> :> though that the list of modules with this issue is larger than
> :> expected. We'll see soon enough how big the issue is.
> :
> :So far, I've found needed test fixes in: autodie, Error, Log4perl and counting.
>
> One thing worth mentioning: along the lines of Nick's recent patch to
> separate two otherwise indistinguishable panics in perl core, there is
> actually an advantage to being able to discover from where an error
> message came.
>
> Maybe the presence or absence of a trailing full-stop is not the ideal
> way to signal provenance; but I think the general principle stands that
> you actually do lose something by making the two identical.

I agree. I'm pretty sure at least one port of perl adds error codes to
all the error messages we provide. I have always thought that that is
a very useful thing. Especially when messages are localized, or
whatever. Id like to see a unique error code added to every error and
warning generating line of code in the core, and if I thought it would
be approved I'd do the work to make it happen.

cheers,
Yves


--
perl -Mre=debug -e "/just|another|perl|hacker/"
Re: [perl #106538] Carp is missing a dot [ In reply to ]
On 02/11/2012 11:42 AM, Zefram wrote:
> Steffen Mueller wrote:
>> If somebody supplies me with two commits to run a CPAN smoke for,
>> then I can do that within a few days to get a more complete list.
>
> Obvious choice is 62e90759156bee3f2bcbf1ac6fd055aeab81b9e4 (before)
> and 879b0cab8575cdc155c45c42eb82075648761936 (after).

Running at

http://users.perl5.git.perl.org/~tsee/progress.html

Result to be at

http://users.perl5.git.perl.org/~tsee/carp_errmsg/

Best regards,
Steffen
Re: [perl #106538] Carp is missing a dot [ In reply to ]
On Sat, Feb 11, 2012 at 7:30 AM, Steffen Mueller <smueller@cpan.org> wrote:
> On 02/11/2012 11:42 AM, Zefram wrote:
>>
>> Steffen Mueller wrote:
>>>
>>> If somebody supplies me with two commits to run a CPAN smoke for,
>>> then I can do that within a few days to get a more complete list.
>>
>>
>> Obvious choice is 62e90759156bee3f2bcbf1ac6fd055aeab81b9e4 (before)
>> and 879b0cab8575cdc155c45c42eb82075648761936 (after).
>
>
> Running at
>
> http://users.perl5.git.perl.org/~tsee/progress.html
>
> Result to be at
>
> http://users.perl5.git.perl.org/~tsee/carp_errmsg/

Excellent. Muchas gracias!
Problem was that maintainers often did not have blead and there is no
Carp-1.25 in CPAN yet, so it was not easy to detect or reproduce.

We provided patches for all but Sub-Uplevel-0.22
I think DAGOLDEN can handle it by himself.
--
Reini Urban
http://cpanel.net/   http://www.perl-compiler.org/
Re: [perl #106538] Carp is missing a dot [ In reply to ]
* demerphq <demerphq@gmail.com> [2012-02-11T06:28:21]
> I agree. I'm pretty sure at least one port of perl adds error codes to
> all the error messages we provide. I have always thought that that is
> a very useful thing. Especially when messages are localized, or
> whatever. Id like to see a unique error code added to every error and
> warning generating line of code in the core, and if I thought it would
> be approved I'd do the work to make it happen.

This is something I'd hoped to see quite a while ago, as part of a "exceptions
are objects" update. I'd like to pursue this, for sure, but am probably not
going to give it a front burner in my brain until 5.17. I will save and review
all proposals on it, though!

We had talked about giving exceptions tags as well, at the time.

--
rjbs
Re: [perl #106538] Carp is missing a dot [ In reply to ]
Steffen Mueller wrote:
>http://users.perl5.git.perl.org/~tsee/carp_errmsg/

Not yet complete, but now showing 28 distros that passed before and fail
after and 20 that changed behaviour in some other way. Anyone want to
argue that it's too many?

-zefram
Re: [perl #106538] Carp is missing a dot [ In reply to ]
On Wed, Feb 15, 2012 at 5:42 AM, Zefram <zefram@fysh.org> wrote:
> Steffen Mueller wrote:
>>http://users.perl5.git.perl.org/~tsee/carp_errmsg/
>
> Not yet complete, but now showing 28 distros that passed before and fail
> after and 20 that changed behaviour in some other way.  Anyone want to
> argue that it's too many?

This made a lot of people angry, not only people who had their CPAN modules
changed for purley aesthetic consistency reasons.

Carp's only API is the string return value.
Additionally carp is with die our primary exception mechanism.

Changing the API would have required an API bump, like Carp2 or use Carp (-dot).
But that is already over, so I'm content with that change.
It was only a night of work to get CPAN fixed and all authors took the fixes.
--
Reini Urban
http://cpanel.net/   http://www.perl-compiler.org/
Re: [perl #106538] Carp is missing a dot [ In reply to ]
Reini Urban wrote:
>This made a lot of people angry,

Anything you can point at? Blogs?

>But that is already over, so I'm content with that change.

It's not a done deal. The dot change only exists in blead. I've
deliberately held off from making a CPAN release until we've made a
decision on whether we actually want it. The smoke tests that we get
from having it in blead are an important input to that decision.

In five days we'll have a 5.15.8 release, and whatever version of Carp it
has will also go to CPAN. If the dot remains in, that's when it becomes
widely visible. If we want the dot out, best to take it out before then.
That's why I'm asking now. If we leave it in at 5.15.8 and decide later
that we need it out for 5.16, we can do that, but it's messier.

>It was only a night of work to get CPAN fixed and all authors took the fixes.

By "CPAN" do you mean "all of the affected modules on CPAN"? I believe
we don't have a final tally of them yet.

-zefram
Re: [perl #106538] Carp is missing a dot [ In reply to ]
On Wed, Feb 15, 2012 at 11:07 AM, Zefram <zefram@fysh.org> wrote:
> Reini Urban wrote:
>>This made a lot of people angry,
>
> Anything you can point at?  Blogs?

Not publicly. Normal people do not blog or complain
upstream at the interior ministry. Ask around.

>>But that is already over, so I'm content with that change.
>
> It's not a done deal.  The dot change only exists in blead.  I've
> deliberately held off from making a CPAN release until we've made a
> decision on whether we actually want it.  The smoke tests that we get
> from having it in blead are an important input to that decision.
>
> In five days we'll have a 5.15.8 release, and whatever version of Carp it
> has will also go to CPAN.  If the dot remains in, that's when it becomes
> widely visible.  If we want the dot out, best to take it out before then.
> That's why I'm asking now.  If we leave it in at 5.15.8 and decide later
> that we need it out for 5.16, we can do that, but it's messier.
>
>>It was only a night of work to get CPAN fixed and all authors took the fixes.
>
> By "CPAN" do you mean "all of the affected modules on CPAN"?  I believe
> we don't have a final tally of them yet.

"All of CPAN" we use, that is 652 of 29916 packages. The most common fraction.
--
Reini Urban
http://cpanel.net/   http://www.perl-compiler.org/
Re: [perl #106538] Carp is missing a dot [ In reply to ]
On Wed, Feb 15, 2012 at 11:27:01AM -0600, Reini Urban wrote:
> On Wed, Feb 15, 2012 at 11:07 AM, Zefram <zefram@fysh.org> wrote:
> > Reini Urban wrote:
> >>This made a lot of people angry,
> >
> > Anything you can point at?  Blogs?
>
> Not publicly. Normal people do not blog or complain
> upstream at the interior ministry. Ask around.

So how are we to know that they exist? We can't really go around asking
every Perl user about every change that we make to core, and we can't
just stop making changes to core. What is the solution here?

-doy
Re: [perl #106538] Carp is missing a dot [ In reply to ]
On Wed, Feb 15, 2012 at 11:36 AM, Jesse Luehrs <doy@tozt.net> wrote:
> On Wed, Feb 15, 2012 at 11:27:01AM -0600, Reini Urban wrote:
>> On Wed, Feb 15, 2012 at 11:07 AM, Zefram <zefram@fysh.org> wrote:
>> > Reini Urban wrote:
>> >>This made a lot of people angry,
>> >
>> > Anything you can point at?  Blogs?
>>
>> Not publicly. Normal people do not blog or complain
>> upstream at the interior ministry. Ask around.
>
> So how are we to know that they exist? We can't really go around asking
> every Perl user about every change that we make to core, and we can't
> just stop making changes to core. What is the solution here?

Make the right decisions.
Don't upset people too much.
use common sense. yes, marc lehman is right most of the time
--
Reini Urban
http://cpanel.net/   http://www.perl-compiler.org/
Re: [perl #106538] Carp is missing a dot [ In reply to ]
On Wed, Feb 15, 2012 at 12:38:39PM -0600, Reini Urban wrote:
> On Wed, Feb 15, 2012 at 11:36 AM, Jesse Luehrs <doy@tozt.net> wrote:
> > On Wed, Feb 15, 2012 at 11:27:01AM -0600, Reini Urban wrote:
> >> On Wed, Feb 15, 2012 at 11:07 AM, Zefram <zefram@fysh.org> wrote:
> >> > Reini Urban wrote:
> >> >>This made a lot of people angry,
> >> >
> >> > Anything you can point at?  Blogs?
> >>
> >> Not publicly. Normal people do not blog or complain
> >> upstream at the interior ministry. Ask around.
> >
> > So how are we to know that they exist? We can't really go around asking
> > every Perl user about every change that we make to core, and we can't
> > just stop making changes to core. What is the solution here?
>
> Make the right decisions.

Oh, is it really that easy?

-doy
Re: [perl #106538] Carp is missing a dot [ In reply to ]
On Wed, Feb 15, 2012 at 12:40 PM, Jesse Luehrs <doy@tozt.net> wrote:
> On Wed, Feb 15, 2012 at 12:38:39PM -0600, Reini Urban wrote:
>> On Wed, Feb 15, 2012 at 11:36 AM, Jesse Luehrs <doy@tozt.net> wrote:
>> > On Wed, Feb 15, 2012 at 11:27:01AM -0600, Reini Urban wrote:
>> >> On Wed, Feb 15, 2012 at 11:07 AM, Zefram <zefram@fysh.org> wrote:
>> >> > Reini Urban wrote:
>> >> >>This made a lot of people angry,
>> >> >
>> >> > Anything you can point at?  Blogs?
>> >>
>> >> Not publicly. Normal people do not blog or complain
>> >> upstream at the interior ministry. Ask around.
>> >
>> > So how are we to know that they exist? We can't really go around asking
>> > every Perl user about every change that we make to core, and we can't
>> > just stop making changes to core. What is the solution here?
>>
>> Make the right decisions.
>
> Oh, is it really that easy?

Sorry, I forgot: marketing.

Persuade people why they must change their code.
Before people like me jump on them on other more-general aspects.
--
Reini Urban
http://cpanel.net/   http://www.perl-compiler.org/
Re: [perl #106538] Carp is missing a dot [ In reply to ]
On Wed, Feb 15, 2012 at 12:42:02PM -0600, Reini Urban wrote:
> On Wed, Feb 15, 2012 at 12:40 PM, Jesse Luehrs <doy@tozt.net> wrote:
> > On Wed, Feb 15, 2012 at 12:38:39PM -0600, Reini Urban wrote:
> >> On Wed, Feb 15, 2012 at 11:36 AM, Jesse Luehrs <doy@tozt.net> wrote:
> >> > On Wed, Feb 15, 2012 at 11:27:01AM -0600, Reini Urban wrote:
> >> >> On Wed, Feb 15, 2012 at 11:07 AM, Zefram <zefram@fysh.org> wrote:
> >> >> > Reini Urban wrote:
> >> >> >>This made a lot of people angry,
> >> >> >
> >> >> > Anything you can point at?  Blogs?
> >> >>
> >> >> Not publicly. Normal people do not blog or complain
> >> >> upstream at the interior ministry. Ask around.
> >> >
> >> > So how are we to know that they exist? We can't really go around asking
> >> > every Perl user about every change that we make to core, and we can't
> >> > just stop making changes to core. What is the solution here?
> >>
> >> Make the right decisions.
> >
> > Oh, is it really that easy?
>
> Sorry, I forgot: marketing.
>
> Persuade people why they must change their code.
> Before people like me jump on them on other more-general aspects.

Which people? The only method of communication we have with the majority
of Perl users is through deprecation warnings.

-doy
Re: [perl #106538] Carp is missing a dot [ In reply to ]
* Zefram <zefram@fysh.org> [2012-02-15T06:42:56]
> Steffen Mueller wrote:
> >http://users.perl5.git.perl.org/~tsee/carp_errmsg/
>
> Not yet complete, but now showing 28 distros that passed before and fail
> after and 20 that changed behaviour in some other way. Anyone want to
> argue that it's too many?

It's a bummer that, if released, this will be the second change to this
behavior. I hope nobody will be too put out having to fix tests a second time.

I think this should be corrected. Hopefully the next changes we have to make
on this front will be "replace the stack and exception mechanism with something
was awesomer" and not "add a missing dot!"

I had a quick glance over the smoke changes looking for core modules and the
only one that leaped out at me was autodie; presumably we can fix that in core
if we can't get Paul to issue a new version immediately.

Reini suggested on IRC, today, that he had already been in touch with all the
affected authors. Has this really been done? That would be great!

--
rjbs
Re: [perl #106538] Carp is missing a dot [ In reply to ]
On 02/16/2012 02:03 AM, Ricardo Signes wrote:
> * Zefram<zefram@fysh.org> [2012-02-15T06:42:56]
>> Steffen Mueller wrote:
>>> http://users.perl5.git.perl.org/~tsee/carp_errmsg/
>>
>> Not yet complete, but now showing 28 distros that passed before and fail
>> after and 20 that changed behaviour in some other way. Anyone want to
>> argue that it's too many?
>
> It's a bummer that, if released, this will be the second change to this
> behavior. I hope nobody will be too put out having to fix tests a second time.
>
> I think this should be corrected. Hopefully the next changes we have to make
> on this front will be "replace the stack and exception mechanism with something
> was awesomer" and not "add a missing dot!"
>
> I had a quick glance over the smoke changes looking for core modules and the
> only one that leaped out at me was autodie; presumably we can fix that in core
> if we can't get Paul to issue a new version immediately.
>
> Reini suggested on IRC, today, that he had already been in touch with all the
> affected authors. Has this really been done? That would be great!

Now up to ~30-35 degradations. Reini qualified his statement as "the
authors of all modules that we [presumably cPanel] use" which was on the
order of 600-700 out of tens of thousands modules on the CPAN. Since
authors of infrequently used modules are as likely to hard-core error
messages, I'd say that this is not yet a done deal.

I expect that at least a handful of the modules would require taking
over to make a new release or else they're dead wood.

--Steffen
Re: [perl #106538] Carp is missing a dot [ In reply to ]
Ricardo Signes wrote:
>I had a quick glance over the smoke changes looking for core modules and the
>only one that leaped out at me was autodie; presumably we can fix that in core

My commit to modify Carp did edit the autodie test in core. But not in
the correct way for the CPAN version: I changed it to *require* the dot,
which is OK in core, but the CPAN version needs to make the dot optional.

-zefram

1 2 3  View All