develooper Front page | perl.perl5.changes | Postings from November 2022

[Perl/perl5] 689fd9: ParseXS - sort things that might produce output

From:
Yves Orton via perl5-changes
Date:
November 16, 2022 09:10
Subject:
[Perl/perl5] 689fd9: ParseXS - sort things that might produce output
Message ID:
Perl/perl5/push/refs/heads/blead/52917b-eae812@github.com
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 689fd929dc23e1e44110fab168b5b306a3ca60cc
      https://github.com/Perl/perl5/commit/689fd929dc23e1e44110fab168b5b306a3ca60cc
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-11-16 (Wed, 16 Nov 2022)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm

  Log Message:
  -----------
  ParseXS - sort things that might produce output

Make sure our output is deterministic.


  Commit: 21af17c9676c11a2cd0c4db8f6e4c3119441c346
      https://github.com/Perl/perl5/commit/21af17c9676c11a2cd0c4db8f6e4c3119441c346
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-11-16 (Wed, 16 Nov 2022)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t
    A dist/ExtUtils-ParseXS/t/XSTightDirectives.xs

  Log Message:
  -----------
  ParseXS - handle #else and #endif without blank line prefixes

This patch makes it possible to omit some of the whitespace around
preprocessor directives. It teaches fetch_para() to understand
that a #else or #endif directive that does not end a #if that
was seen in the current "paragraph" should not be parsed as part
of that paragraph. This means that a conditional block that defines
the same sub under different define conditions need not have extra
whitespace after each sub definition.


  Commit: cc287082fe0f4c739f72c46369fb792fe63fb177
      https://github.com/Perl/perl5/commit/cc287082fe0f4c739f72c46369fb792fe63fb177
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-11-16 (Wed, 16 Nov 2022)

  Changed paths:
    M MANIFEST
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
    M dist/ExtUtils-ParseXS/lib/perlxs.pod
    M dist/ExtUtils-ParseXS/t/001-basic.t
    A dist/ExtUtils-ParseXS/t/XSAlias.xs

  Log Message:
  -----------
  ParseXS - better support for duplicate ALIASes

Sometimes you *want* to create multiple names for the same
functionality, but doing so with the ALIAS functionality requires
awkward workarounds. This adds a new "symbolic alias" that does
not warn on dupes as creating a dupe is its whole point. For a
symbolic alias the value is the name of an existing alias.

This also cleans up some of the warnings related to aliases so
we distinguish between when a duplicate is truly ignored or
where it overrides a previous value. And deal with a few other
edge cases properly.


  Commit: adc598353407e7a922eeb5b498fc508877e3ca9f
      https://github.com/Perl/perl5/commit/adc598353407e7a922eeb5b498fc508877e3ca9f
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-11-16 (Wed, 16 Nov 2022)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t
    M dist/ExtUtils-ParseXS/t/XSAlias.xs

  Log Message:
  -----------
  ParseXS - allow symbolic alias of default function

Also normalize warnings. It used to be if you created an alias
of the root function (0) no warning would be produced. Now
we will produce a warning, but we also allow symbolic references
to defuse the warning.


  Commit: e40be2b6bb0ae1729a840962a1bddbe075eec01c
      https://github.com/Perl/perl5/commit/e40be2b6bb0ae1729a840962a1bddbe075eec01c
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-11-16 (Wed, 16 Nov 2022)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm

  Log Message:
  -----------
  ParseXS - add support for elifdef and elifndef

The upcoming C++23 and C23 standards add #elifdef, #elifndef.


  Commit: ba6b3529afbdc2affcfcc8e5b0f9b009aa4cc429
      https://github.com/Perl/perl5/commit/ba6b3529afbdc2affcfcc8e5b0f9b009aa4cc429
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-11-16 (Wed, 16 Nov 2022)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pod
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
    M dist/ExtUtils-ParseXS/t/001-basic.t
    M dist/ExtUtils-ParseXS/t/002-more.t
    M dist/ExtUtils-ParseXS/t/003-usage.t

  Log Message:
  -----------
  ParseXS - make testing easier

Use warn instead of print STDERR, and provide a way to make
errors trigger a die instead of an exit(1).

Currently the module code is written as though the only way
it will be used is via the xsubpp script, so the library does
annoying things like calling exit() instead of die() to signal
an exception. It also uses print STDERR instead of warn,
which means the test code can't just use a $SIG{__WARN__} hook
to see its warnings, and instead has to include PrimitiveCapture
in the t directory. These two things combine annoyingly in our
test code such that when you break the module you can see tests
exiting early, but with no useful diagnostics as to why.

This patch reworks this to use "warn" instead of print STDERR,
and to provide a way to enable the use of "die" instead of exit.
Thus making debugging failing tests far easier.


  Commit: eae81231471af18d22af6f186f0af65ce46dafb1
      https://github.com/Perl/perl5/commit/eae81231471af18d22af6f186f0af65ce46dafb1
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-11-16 (Wed, 16 Nov 2022)

  Changed paths:
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm
    M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
    M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps.pm
    M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Cmd.pm
    M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/InputMap.pm
    M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/OutputMap.pm
    M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Type.pm
    M dist/ExtUtils-ParseXS/lib/perlxs.pod
    M dist/ExtUtils-ParseXS/t/001-basic.t

  Log Message:
  -----------
  ParseXS - version bump to 3.48 and test perlxs.pod has the right version

The version in the pod has been long wrong. We are on 3.48 now, it was 3.13_01.


Compare: https://github.com/Perl/perl5/compare/52917b368fe2...eae81231471a



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About