Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BBC: Blead Breaks Number::Format #20571

Closed
cjg-cguevara opened this issue Dec 2, 2022 · 13 comments · May be fixed by billward/number-format-perl#13
Closed

BBC: Blead Breaks Number::Format #20571

cjg-cguevara opened this issue Dec 2, 2022 · 13 comments · May be fixed by billward/number-format-perl#13
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) Release Blocker sendToCPAN

Comments

@cjg-cguevara
Copy link

This is a bug report for perl from "Carlos Guevara" [email protected],
generated with the help of perlbug 1.43 running under perl 5.37.7.


BBC: Blead Breaks Number::Format

Please see http://fast-matrix.cpantesters.org/?dist=Number::Format


Flags

  • category=core
  • severity=low

Perl configuration

Site configuration information for perl 5.37.7:

Configured by cpan at Thu Dec  1 22:39:47 EST 2022.

Summary of my perl5 (revision 5 version 37 subversion 7) configuration:
  Commit id: 4d21c0264d5bef34fde5eb757c28d3d1a1dc7fef
  Platform:
    osname=openbsd
    osvers=7.1
    archname=OpenBSD.amd64-openbsd-thread-multi
    uname='openbsd cjg-openbsd7 7.1 generic#3 amd64 '
    config_args='-des -Dprefix=~/bin/perl-blead -Dscriptdir=~/bin/perl-blead/bin -Dusedevel -Duse64bitall -Duseithreads'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
  Compiler:
    cc='cc'
    ccflags ='-pthread -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    optimize='-O2'
    cppflags='-pthread -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='OpenBSD Clang 13.0.0'
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='cc'
    ldflags ='-pthread -Wl,-E  -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/lib/clang/13.0.0/lib /usr/lib /usr/local/lib
    libs=-lpthread -lm -lutil -lc
    perllibs=-lpthread -lm -lutil -lc
    libc=/usr/lib/libc.so.96.1
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags='-DPIC -fPIC '
    lddlflags='-shared -fPIC  -L/usr/local/lib -fstack-protector-strong'


---
@INC for perl 5.37.7:
    /home/cpan/bin/perl-blead/lib/site_perl/5.37.7/OpenBSD.amd64-openbsd-thread-multi
    /home/cpan/bin/perl-blead/lib/site_perl/5.37.7
    /home/cpan/bin/perl-blead/lib/5.37.7/OpenBSD.amd64-openbsd-thread-multi
    /home/cpan/bin/perl-blead/lib/5.37.7

---
Environment for perl 5.37.7:
    HOME=/home/cpan
    LANG (unset)
    LANGUAGE (unset)
    LC_ALL=C
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/cpan/bin/perl-blead/bin:/home/cpan/bin:/home/cpan/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/bash
@jkeenan jkeenan added the BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) label Dec 2, 2022
@jkeenan
Copy link
Contributor

jkeenan commented Dec 2, 2022

This is a bug report for perl from "Carlos Guevara" [email protected], generated with the help of perlbug 1.43 running under perl 5.37.7.

BBC: Blead Breaks Number::Format

Please see http://fast-matrix.cpantesters.org/?dist=Number::Format

Bisecting with this invocation ...

perl Porting/bisect.pl \
--module=Number::Format \
--start=99d24a03f4f65d155416e04274b943ae7245dc21 \
--end=4d21c0264d5bef34fde5eb757c28d3d1a1dc7fef

... points to commit 04de022

commit 04de0222db2c455e25ec09919a16dd3550a2c9f2 (refs/bisect/bad)
Author:     Karl Williamson <[email protected]>
AuthorDate: Fri Nov 25 14:49:05 2022 -0700
Commit:     Karl Williamson <[email protected]>
CommitDate: Wed Nov 30 17:42:46 2022 -0700

    POSIX::localeconv: Return empty/special values

@khwilliamson, can you take a look?

khwilliamson added a commit to khwilliamson/perl5 that referenced this issue Dec 17, 2022
The blamed commit, 04de022, exposed a bug in the module itself.  I will
submit a PR to fix it.

But this ticket did tell me that there was a problem with that commit.
It returned a C language value, CHAR_MAX, which doesn't really have a
corresponding concept in Perl.  Instead we use -1 to indicate that a
positive-valued variable is in some abnormal state.  This commit changes
to do that, and documents the changes, which should have been done in
04de022.
khwilliamson added a commit to khwilliamson/perl5 that referenced this issue Dec 18, 2022
The blamed commit, 04de022, exposed a bug in the module itself.  I will
submit a PR to fix it.

But this ticket did tell me that there was a problem with that commit.
It returned a C language value, CHAR_MAX, which doesn't really have a
corresponding concept in Perl.  Instead we use -1 to indicate that a
positive-valued variable is in some abnormal state.  This commit changes
to do that, and documents the changes, which should have been done in
04de022.
khwilliamson added a commit to khwilliamson/perl5 that referenced this issue Dec 20, 2022
The blamed commit, 04de022, exposed a bug in the module itself.  I will
submit a PR to fix it.

But this ticket did tell me that there was a problem with that commit.
It returned a C language value, CHAR_MAX, which doesn't really have a
corresponding concept in Perl.  Instead we use -1 to indicate that a
positive-valued variable is in some abnormal state.  This commit changes
to do that, and documents the changes, which should have been done in
04de022.
khwilliamson added a commit that referenced this issue Dec 20, 2022
The blamed commit, 04de022, exposed a bug in the module itself.  I will
submit a PR to fix it.

But this ticket did tell me that there was a problem with that commit.
It returned a C language value, CHAR_MAX, which doesn't really have a
corresponding concept in Perl.  Instead we use -1 to indicate that a
positive-valued variable is in some abnormal state.  This commit changes
to do that, and documents the changes, which should have been done in
04de022.
khwilliamson added a commit to khwilliamson/number-format-perl that referenced this issue Jan 31, 2023
This fixes Perl/perl5#20571

The commit blamed in that tickect caused POSIX::localeconv() to return
all the defined fields in the lconv structure.  Number::Format had been
relying on it to suppress empty fields.

The solution is simply for Number::Format to instead ignore empty fields
itself.  This is entirely backwards compatible, as previously those
fields were never delivered to Number::Format.

There is a slight complication in that the POSIX standard allows for
the monetary decimal point and the monetary thousands separator to both
be empty.  There is a check in Number::Format against both being empty
that must be relaxed to allow this legal combination.  The check
previously was effectively useless as Number::Format would never see
those fields if they were empty, as POSIX::localeconv() would suppress
them.
@khwilliamson
Copy link
Contributor

I have submitted billward/number-format-perl#13 to get Number::Format to work with perls that have this commit, as well as earlier ones

@jkeenan
Copy link
Contributor

jkeenan commented Feb 2, 2023

I have submitted billward/number-format-perl#13 to get Number::Format to work with perls that have this commit, as well as earlier ones

I can confirm that that pull request will, when applied, address the breakage caused by 04de022 reported in this Issue.

I'm going to label this ticket both "sendToCPAN" and "Stalled". Number-Format has not had a new CPAN release since 2015. In the period 2015-17 there was some work committed to its GH repository, but that work has never been released to CPAN. Even that unreleased work has "BBC" errors, but those are simply due to upgrades in CPAN modules that ship with core. It will be the responsibility of the Number-Format maintainers to address those problems if and when they prepare a new CPAN release. In the meantime, Number-Format will unfortunately continue to generate CPANtesters FAILures, but we've done as much as we can do about this.

@demerphq
Copy link
Collaborator

demerphq commented Feb 3, 2023 via email

@Grinnz
Copy link
Contributor

Grinnz commented Feb 3, 2023

No, that's why the process to take ownership exists.

@demerphq
Copy link
Collaborator

demerphq commented Feb 3, 2023

That is a circular argument. "You can't fix this without taking ownership because we have an ownership process". If nobody is willing to take ownership then it doesn't get fixed? Isn't that a recipe for bitrot and doesn't it just undermine the perception and reputation of Perl and CPAN in longer term? Is that the best thing for the community in general? So again, I ask @andk, (not you @Grinnz ) is there anything we can do about this? I wouldn't mind putting in the work to fix some of these things on CPAN if it didn't mean an extended responsibility for maintenance than ownership implies.

@Grinnz
Copy link
Contributor

Grinnz commented Feb 3, 2023

That is not what I suggested; the process to take ownership exists because we cannot do anything else about it. The namespace belongs to those with permissions to the namespace, intentionally.

@Grinnz
Copy link
Contributor

Grinnz commented Feb 3, 2023

@karenetheridge
Copy link
Member

The best thing we can do is to create a distropref file that applies the patch(es), and convince people to use cpan clients that support distroprefs (cpanm does not, to my knowledge, which I feel is a shame).

@demerphq
Copy link
Collaborator

demerphq commented Feb 3, 2023

@Grinnz said: Relevant reading: https://github.com/andk/pause/blob/master/doc/operating-model.md
@karenetheridge said: The best thing we can do is...

I don't know if I agree with the certainty you guys are stating. To me this is pretty similar to the following case in 4.2. (Bold added by me):

If the first-come isn't responsive, but the module is clearly documented as feature complete, then do not ask for indexing permissions so you can release changes to the interface. If you only want to update the distribution to follow modern CPAN / packaging conventions (e.g. to ensure it includes metadata files), or to address a security issue, then the PAUSE admins may consider a permissions request. Such modules will be considered on a case-by-case basis.

My point is that a BBC patch that is peer reviewed on p5p (or via github in some way), which only attempts to "resurrect" a module to continue working on a new perl, does not change any interfaces, and attempts to minimize the changes to the least possible change seems is pretty close to the description above. If there were such a process I would say that the new release must include clear data on the specific changes made, the reason why, and the list of peer reviewers who validated that the the change was as conservative as possible and strictly limited to ensuring interoperability and compatible with modern perl releases.

I realize that "making it not die on a new perl" is not /quite/ the same thing as "follow modern CPAN/packaging conventions", nor is it /quite/ the same thing as "address a security issue", but it is not far off them either, especially the "follow modern ... conventions" part.

Also note that I specifically asked if there was a way we could set up a process where this would occur without changing indexing permissions, eg as a one-off to get the show on the road again. As a BBC responder I would not want to have to take co-maint to get the show on the road, but I would be willing to write the minimal patch that would get released to keep things working.

There is a big difference between "while you were away we made minor changes to your module so it did not fail on the latest perl" and "while you were away we removed your ownership so we could make minor changes to your module so it did not fail on the latest perl". One I would see as lending assistance, the other I would see as personal invasion.

It seems to me that @andk made the rules, and he can change them, and I don't think anything I have proposed here violates the spirit or intent of the principals behind CPAN. I think it represents a natural extension of rules already stated. You guys might disagree (although that is not entirely clear, you seem to be interpreting the existing rules more than stating a personal opinion about what you think the rules should be), and @andk certainly should take whatever your opinion is under advisement, but ultimately it seems to be that it his call to make (while taking interested parties viewpoints into account), and we should let him do his job as he sees appropriate.

IMO rules can and should change as circumstances need, and indeed the doc at https://github.com/andk/pause/blob/master/doc/operating-model.md is on version 2 so it has changed at least once in the past.

Also id like to point out this line from the document:

The PAUSE admins recognise that respect for ownership of code, respect for artistic control, proper credit, and active effort to prevent unintentional code skew or communication gaps is vital to the health of the community and CPAN itself.

I dont think anything I am saying in terms of this proposal violates that spirit. If I was long absent and when I returned I found out that p5p devs had patched my code to work on Perl 5.54 I would be happy that my code was still used and running after so much time away and I would be grateful that it was done. I think most developers (not every developer obviously) would similarly prefer that someone fixed their code while they were absent rather than have their module replaced because because nobody could fix it. I think most developers are like parents who would rather their code has a long life of happy usefulness instead of just being dead and broken, provided that their fundamental artistic perspectives and coding style etc, were respected in the process.

Repeating myself again I think there is a big difference between a collective like p5p making an ultra-minimal peer reviewed fix which results in a one-time upload to PAUSE/CPAN, and having the ownership /transferred/ to someone else who then gets to apply their own artistic license to the resulting product. For instance if I took ownership of a module one of the first things I would likely do to it would be to make sure it runs under strict and warnings, and I would pertidy it. However I would do none of those things if I was performing a "BBC continuity fix", in such a case I would be ultra-careful to follow to the best my ability and discernment the intent, style and preferences of the true owner, with the hope that when they return they would say "I can't even tell what changes you made without checking the doc/patch/changelog to see what they were".

@jkeenan
Copy link
Contributor

jkeenan commented Feb 3, 2023

@Grinnz said: Relevant reading: https://github.com/andk/pause/blob/master/doc/operating-model.md @karenetheridge said: The best thing we can do is...

I don't know if I agree with the certainty you guys are stating. To me this is pretty similar to the following case in 4.2. (Bold added by me):

This is a policy discussion which is way beyond the scope of a single BBC issue. Please move this discussion to the perl5-porters mailing list.

@rjbs
Copy link
Member

rjbs commented May 6, 2023

I have contacted @billward and the PAUSE admins.

pjacklam pushed a commit to pjacklam/perl5 that referenced this issue May 20, 2023
The blamed commit, 04de022, exposed a bug in the module itself.  I will
submit a PR to fix it.

But this ticket did tell me that there was a problem with that commit.
It returned a C language value, CHAR_MAX, which doesn't really have a
corresponding concept in Perl.  Instead we use -1 to indicate that a
positive-valued variable is in some abnormal state.  This commit changes
to do that, and documents the changes, which should have been done in
04de022.
pjacklam pushed a commit to pjacklam/perl5 that referenced this issue May 20, 2023
The blamed commit, 04de022, exposed a bug in the module itself.  I will
submit a PR to fix it.

But this ticket did tell me that there was a problem with that commit.
It returned a C language value, CHAR_MAX, which doesn't really have a
corresponding concept in Perl.  Instead we use -1 to indicate that a
positive-valued variable is in some abnormal state.  This commit changes
to do that, and documents the changes, which should have been done in
04de022.
@rjbs
Copy link
Member

rjbs commented May 26, 2023

I have made a new release, v1.76, with a fix that should work on both newer and older perls.

@rjbs rjbs closed this as completed May 26, 2023
@jkeenan jkeenan removed the Stalled label May 27, 2023
khwilliamson added a commit to khwilliamson/perl5 that referenced this issue Jul 10, 2023
The blamed commit, 04de022, exposed a bug in the module itself.  I will
submit a PR to fix it.

But this ticket did tell me that there was a problem with that commit.
It returned a C language value, CHAR_MAX, which doesn't really have a
corresponding concept in Perl.  Instead we use -1 to indicate that a
positive-valued variable is in some abnormal state.  This commit changes
to do that, and documents the changes, which should have been done in
04de022.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) Release Blocker sendToCPAN
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants