Perl / perl5

šŸŖ The Perl programming language
https://dev.perl.org/perl5/
Other
1.96k stars 555 forks source link

[PATCH] Add capability to exclude non-XS extensions #10844

Closed p5pRT closed 7 years ago

p5pRT commented 13 years ago

Migrated from rt.perl.org#79538 (status was 'rejected')

Searchable as RT79538$

p5pRT commented 13 years ago

From @jdhedden

In order to save time building and testing Perl\, I use the -Dnoextensions=... option in Configure to exclude over a dozen XS extensions when building Perl. These include extensions I don't need (e.g.\, Sys/Syslog)\, don't want (e.g.\, Text/Soundex) or that aren't supported on my current architecture (e.g.\, IPC/SysV).

I wanted the same exclusion capability for non-XS extensions so I created the attached patch. It allows both the -Dnoextensions=... and -Donlyextensions=... options in Configure to work for XS as well as non-XS extensions.

Using this patch\, I now exclude over 50 non-XS modules from my Perl builds. This gains me a 25% (5.12.x) to 35% (blead) reduction in the time needed to build\, test and install Perl. (In blead\, for example\, from 4 hrs. down to 2.5).

Perl Info ``` Flags: category=core severity=wishlist Site configuration information for perl 5.12.2: Configured by Jerry at Wed Nov 17 22:26:32 EST 2010. Summary of my perl5 (revision 5 version 12 subversion 2 patch 42531) configuration: Snapshot of: 7a3b65c9d99f69553fffe01f73d49fe9abf95120 Platform: osname=cygwin, osvers=1.5.25(0.15642), archname=cygwin-thread-multi-64int uname='cygwin_nt-5.1 seymour 1.5.25(0.15642) 2008-06-12 19:34 i686 cygwin ' config_args='-de -Duse64bitint -Dusethreads -Dinc_version_list=none -Dnoextensions=Devel/DProf Devel/Peek Filter/Util/Call GDBM_File Hash/Util/FieldHash I18N/Langinfo IPC/SysV Math/BigInt/FastCalc NDBM_File ODBM_File Sys/Syslog Text/Soundex Time/Piece Unicode/Normalize attrs re Archive/Extract Archive/Tar Attribute/Handlers B/Debug B/Lint Class/ISA CGI CPANPLUS CPANPLUS/Dist/Build Devel/SelfStubber Digest File/Fetch FileCache Filter/Simple I18N/LangTags IO/Zlib IPC/Cmd IPC/Open2 Locale/Codes Locale/Maketext Locale/Maketext/Simple Log/Message Log/Message/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/Build Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Pluggable NEXT Object/Accessor Package/Constants Params/Check Parse/CPAN/Meta PerlIO/via/QuotedPrint Pod/Html Pod/LaTeX Pod/Plainer SelfLoader Switch Term/UI Text/Balanced Tie/File Tie/Memoize Unicode/Collate autodie autouse bignum encoding/warnings -A append:ccflags= -DNO_MATHOMS -A define:optimize=-Os -pipe -funit-at-a-time -march=pentium4 -mfpmath=sse -mieee-fp -mmmx -msse -msse2' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=y, bincompat5005=undef Compiler: cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -DNO_MATHOMS -fno-strict-aliasing -pipe', optimize='-Os -pipe -funit-at-a-time -march=pentium4 -mfpmath=sse -mieee-fp -mmmx -msse -msse2', cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -DNO_MATHOMS -fno-strict-aliasing -pipe' ccversion='', gccversion='3.4.4 (cygming special, gdc 0.12, using dmd 0.125)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -s' libpth=/usr/lib /lib libs=-lgdbm -ldl -lcrypt -lgdbm_compat perllibs=-ldl -lcrypt libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=cygperl5_12_2.dll gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s' cccdlflags=' ', lddlflags=' --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -s' Locally applied patches: @INC for perl 5.12.2: /usr/lib/perl5/site_perl/5.12.2/cygwin /usr/lib/perl5/site_perl/5.12.2 /usr/lib/perl5/5.12.2/cygwin /usr/lib/perl5/5.12.2 . Environment for perl 5.12.2: CYGWIN=ntsec HOME=/home/Jerry LANG=C LANGUAGE=C LC_ALL=C LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/Jerry/bin:/usr/local/src/perl/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/c/Dev-Cpp/bin/:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/Program Files/ATI Technologies/ATI Control Panel:/c/PROGRA~1/COMMON~1/SONICS~1:/c/Program Files/QuickTime/QTSystem/:/c/Program Files/ATI Technologies/ATI.ACE/Core-Static:/c/WINDOWS/system32/WindowsPowerShell/v1.0:/c/WINDOWS/system32/WindowsPowerShell/v1.0:. PERLIO=perlio PERL_BADLANG (unset) SHELL (unset) ```
p5pRT commented 13 years ago

From @jdhedden

0001-Add-capability-to-exclude-non-XS-extensions.patch ```diff From 06352382d9fc6cff4a3e2c232011f3f300d71ceb Mon Sep 17 00:00:00 2001 From: Jerry D. Hedden Date: Sun, 21 Nov 2010 18:13:25 -0500 Subject: [PATCH] Add capability to exclude non-XS extensions Currently, the -Dnoextensions=... and -Donlyextensions=... options in Configure only work for XS extensions. This patch adds the capabilty for these options to also work for non-XS extensions. --- Configure | 69 +++++++++++++++++++++++++++++++++++++---------------- INSTALL | 9 ++++--- Porting/Glossary | 13 +++++++--- installperl | 6 ++++ t/TEST | 16 ++++++++++-- t/harness | 2 +- 6 files changed, 82 insertions(+), 33 deletions(-) diff --git a/Configure b/Configure index 793f8fa..8f1b5c7 100755 --- a/Configure +++ b/Configure @@ -220,6 +220,7 @@ dynamic_ext='' extensions='' known_extensions='' nonxs_ext='' +known_nonxs_ext='' static_ext='' useopcode='' useposix='' @@ -21851,7 +21852,7 @@ echo "Looking for extensions..." >&4 : If we are using the old config.sh, known_extensions may contain : old or inaccurate or duplicate values. known_extensions='' -nonxs_extensions='' +known_nonxs_ext='' : We do not use find because it might not be available. : We do not just use MANIFEST because the user may have dropped : some additional extensions into the source tree and expect them @@ -21872,7 +21873,7 @@ find_extensions=' if $test -f $xxx/$leaf.xs -o -f $xxx/$leaf.c; then known_extensions="$known_extensions $1$this_ext"; elif $test -f $xxx/Makefile.PL; then - nonxs_extensions="$nonxs_extensions $1$this_ext"; + known_nonxs_ext="$known_nonxs_ext $1$this_ext"; else if $test -d $xxx -a $# -lt 10; then set $1$xxx/ $*; @@ -21889,7 +21890,7 @@ find_extensions=' elif $contains "\.c$" $$.tmp > /dev/null 2>&1; then known_extensions="$known_extensions $this_ext"; elif $test -d $xxx; then - nonxs_extensions="$nonxs_extensions $this_ext"; + known_nonxs_ext="$known_nonxs_ext $this_ext"; fi; $rm -f $$.tmp; fi @@ -21922,9 +21923,9 @@ fi set X $known_extensions shift known_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '` -set X $nonxs_extensions +set X $known_nonxs_ext shift -nonxs_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '` +known_nonxs_ext=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '` cd "$tdir" : Now see which are supported on this system. @@ -22057,14 +22058,21 @@ for xxx in $known_extensions ; do esac done -set X $avail_ext -shift -avail_ext="$*" +: Now see which nonxs extensions are supported on this system. +: For now assume all are. +nonxs_ext='' +for xxx in $known_nonxs_ext ; do + case "$xxx" in + *) nonxs_ext="$nonxs_ext $xxx" + ;; + esac +done case "$onlyextensions" in '') ;; -*) keepextensions='' - echo "You have requested that only certains extensions be included..." >&4 +*) echo "You have requested that only certains extensions be included..." >&4 + + keepextensions='' for i in $onlyextensions; do case " $avail_ext " in *" $i "*) @@ -22075,13 +22083,26 @@ case "$onlyextensions" in esac done avail_ext="$keepextensions" + + keepextensions='' + for i in $onlyextensions; do + case " $nonxs_ext " in + *" $i "*) + echo "Keeping extension $i." + keepextensions="$keepextensions $i" + ;; + *) echo "Ignoring extension $i." ;; + esac + done + nonxs_ext="$keepextensions" ;; esac case "$noextensions" in '') ;; -*) keepextensions='' - echo "You have requested that certain extensions be ignored..." >&4 +*) echo "You have requested that certain extensions be ignored..." >&4 + + keepextensions='' for i in $avail_ext; do case " $noextensions " in *" $i "*) echo "Ignoring extension $i." ;; @@ -22091,18 +22112,23 @@ case "$noextensions" in esac done avail_ext="$keepextensions" + + keepextensions='' + for i in $nonxs_ext; do + case " $noextensions " in + *" $i "*) echo "Ignoring extension $i." ;; + *) echo "Keeping extension $i."; + keepextensions="$keepextensions $i" + ;; + esac + done + nonxs_ext="$keepextensions" ;; esac -: Now see which nonxs extensions are supported on this system. -: For now assume all are. -nonxs_ext='' -for xxx in $nonxs_extensions ; do - case "$xxx" in - *) nonxs_ext="$nonxs_ext $xxx" - ;; - esac -done +set X $avail_ext +shift +avail_ext="$*" set X $nonxs_ext shift @@ -23182,6 +23208,7 @@ nm='$nm' nm_opt='$nm_opt' nm_so_opt='$nm_so_opt' nonxs_ext='$nonxs_ext' +known_nonxs_ext='$known_nonxs_ext' nroff='$nroff' nvEUformat='$nvEUformat' nvFUformat='$nvFUformat' diff --git a/INSTALL b/INSTALL index c4347ef..d6c3b5c 100644 --- a/INSTALL +++ b/INSTALL @@ -941,7 +941,7 @@ simple D script that uses them: =head2 Extensions Perl ships with a number of standard extensions. These are contained -in the ext/ subdirectory. +in the ext/, cpan/ and dist/ subdirectories. By default, Configure will offer to build every extension which appears to be supported. For example, Configure will offer to build GDBM_File @@ -949,8 +949,8 @@ only if it is able to find the gdbm library. To disable certain extensions so that they are not built, use the -Dnoextensions=... and -Donlyextensions=... options. They both accept -a space-separated list of extensions, such as C. The extensions -listed in +a space-separated list of extensions, such as C. They both +accept XS and non-XS extensions. The extensions listed in C are removed from the list of extensions to build, while the C is rather more severe and builds only the listed extensions. The latter should be used with extreme caution since @@ -961,7 +961,8 @@ these options is first C (if present), then C (if present). Of course, you may always run Configure interactively and select only the extensions you want. -If you unpack any additional extensions in the ext/ directory before +If you unpack any additional extensions in the ext/, cpan/ or dist/ +directories before running Configure, then Configure will offer to build those additional extensions as well. Most users probably shouldn't have to do this -- it is usually easier to build additional extensions later after perl diff --git a/Porting/Glossary b/Porting/Glossary index 909d801..95681c5 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -2630,8 +2630,8 @@ expr (Loc.U): extensions (Extensions.U): This variable holds a list of all extension files (both XS and - non-xs linked into the package. It is propagated to Config.pm - and is typically used to test whether a particular extesion + non-XS) linked into the package. It is propagated to Config.pm + and is typically used to test whether a particular extension is available. extern_C (Csym.U): @@ -3582,6 +3582,10 @@ known_extensions (Extensions.U): This variable holds a list of all XS extensions included in the package. +known_nonxs_ext (Extensions.U): + This variable holds a list of all non-XS extensions included + in the package. + ksh (Loc.U): This variable is defined but not used by Configure. The value is the empty string and is not useful. @@ -3944,8 +3948,9 @@ nm_so_opt (usenm.U): Maybe Linux should just always set usenm=false. nonxs_ext (Extensions.U): - This variable holds a list of all non-xs extensions included - in the package. All of them will be built. + This variable holds a list of the non-XS extensions linked + into the package. It is propagated to Config.pm, and can be + used to test whether a particular non-XS extension is available. nroff (Loc.U): This variable is used internally by Configure to determine the diff --git a/installperl b/installperl index d1eafe6..37403a6 100755 --- a/installperl +++ b/installperl @@ -118,6 +118,12 @@ while () { next if /^#/; s/\s*#\s*pod\s*=.*//; # install script regardless of pod location next if /a2p/; # a2p is binary, to be installed separately + # Ignore scripts from unbuilt extensions + if (/^[^\/]+\/([^\/]+)\/blib\//) { + (my $mod = $1) =~ s/-/\//g; + my $ext = " $Config{extensions} "; + next if ($ext !~ / $mod /); + } chomp; if (/(\S*)\s*#\s*link\s*=\s*(\S*)/) { push @scripts, $1; diff --git a/t/TEST b/t/TEST index 945015f..c3db4da 100755 --- a/t/TEST +++ b/t/TEST @@ -376,14 +376,18 @@ sub _populate_hash { } sub _tests_from_manifest { - my ($extensions, $known_extensions) = @_; + my ($extensions, $known_extensions, $known_nonxs_ext) = @_; my %skip; my %extensions = _populate_hash($extensions); my %known_extensions = _populate_hash($known_extensions); + my %known_nonxs_ext = _populate_hash($known_nonxs_ext); foreach (keys %known_extensions) { $skip{$_} = 1 unless $extensions{$_}; } + foreach (keys %known_nonxs_ext) { + $skip{$_} = 1 unless $extensions{$_}; + } my @results; my $mani = '../MANIFEST'; @@ -427,7 +431,7 @@ unless (@ARGV) { # for skipping tests on non-default builds, so it is allowed to fail. # What we want to to is make a list of extensions which we did not build. my $configsh = '../config.sh'; - my ($extensions, $known_extensions); + my ($extensions, $known_extensions, $known_nonxs_ext); if (-f $configsh) { open FH, $configsh or die "Can't open $configsh: $!"; while () { @@ -437,6 +441,12 @@ unless (@ARGV) { elsif (/^known_extensions=['"](.*)['"]$/) { $known_extensions = $1; } + elsif (/^known_nonxs_ext=['"](.*)['"]$/) { + $known_nonxs_ext = $1; + } + } + if (!defined $known_nonxs_ext) { + warn "No known_nonxs_ext line found in $configsh"; } if (!defined $known_extensions) { warn "No known_extensions line found in $configsh"; @@ -449,7 +459,7 @@ unless (@ARGV) { # a list, might fail if perl is really hosed, but they aren't needed for # make minitest, and the building of extensions will likely also fail if # something is that badly wrong. - push @ARGV, _tests_from_manifest($extensions, $known_extensions); + push @ARGV, _tests_from_manifest($extensions, $known_extensions, $known_nonxs_ext); unless ($::core) { _find_tests('x2p'); _find_tests('porting'); diff --git a/t/harness b/t/harness index 7748c26..9b3fc9a 100644 --- a/t/harness +++ b/t/harness @@ -162,7 +162,7 @@ if (@ARGV) { my @last; push @last, sort { lc $a cmp lc $b } - _tests_from_manifest($Config{extensions}, $Config{known_extensions}); + _tests_from_manifest($Config{extensions}, $Config{known_extensions}, $Config{known_nonxs_ext}); push @last, ; my %times; -- 1.6.1.2 ```
p5pRT commented 13 years ago

From @obra

On Sun\, Nov 21\, 2010 at 03​:19​:21PM -0800\, Jerry D. Hedden wrote​:

In order to save time building and testing Perl\, I use the -Dnoextensions=... option in Configure to exclude over a dozen XS extensions when building Perl. These include extensions I don't need (e.g.\, Sys/Syslog)\, don't want (e.g.\, Text/Soundex) or that aren't supported on my current architecture (e.g.\, IPC/SysV).

Using this patch\, I now exclude over 50 non-XS modules from my Perl builds. This gains me a 25% (5.12.x) to 35% (blead) reduction in the time needed to build\, test and install Perl. (In blead\, for example\, from 4 hrs. down to 2.5).

Hi Jerry\,

As I mentioned on Thursday\, I'd prefer that we not end up with this functionality as something used by/for porters. Similarly\, the additional conditionalization of the test suite makes me somewhat uncomfortable for the same reasons.

Best\,

-Jesse

p5pRT commented 13 years ago

The RT System itself - Status changed from 'new' to 'open'

p5pRT commented 13 years ago

From @jdhedden

The consensus seems to be in favor of this patch. You're argument about conditionalizing the test suite is quite moot as that is the standard and not the exception. If excluding modules is not to be allowed\, then should we remove the -Dnoextensions=... and -Donlyextensions=... options to Configure? (That's a rhetorical question. The answer\, of course\, is 'Hell\, no'.)

The most fundamental philosophy of Perl it the capability to 'roll your own'\, and there is nothing in the current architecture that is sacrosanct to modification and flexibility.

Yes\, coding up tests correctly to account for modules not being present can be a pain\, but doing otherwise\, IMHO\, is a bug. I've dealt with that for years with the modules I've supported\, and I don't think it would be appropriate to reverse that mentality.

On Sun\, Nov 21\, 2010 at 19​:21\, Jesse Vincent \jesse@​fsck\.com wrote​:

On Sun\, Nov 21\, 2010 at 03​:19​:21PM -0800\, Jerry D. Hedden wrote​:

In order to save time building and testing Perl\, I use the -Dnoextensions=... option in Configure to exclude over a dozen XS extensions when building Perl. Ā These include extensions I don't need (e.g.\, Sys/Syslog)\, don't want (e.g.\, Text/Soundex) or that aren't supported on my current architecture (e.g.\, IPC/SysV).

Using this patch\, I now exclude over 50 non-XS modules from my Perl builds. Ā This gains me a 25% (5.12.x) to 35% (blead) reduction in the time needed to build\, test and install Perl. Ā (In blead\, for example\, from 4 hrs. down to 2.5).

Hi Jerry\,

As I mentioned on Thursday\, I'd prefer that we not end up with this functionality as something used by/for porters. Ā Similarly\, the additional conditionalization of the test suite makes me somewhat uncomfortable for the same reasons.

Best\, -Jesse

p5pRT commented 13 years ago

From @andk

On Sun\, 21 Nov 2010 19​:55​:48 -0500\, "Jerry D. Hedden" \jdhedden@​cpan\.org said​:

  > The consensus seems to be in favor of this patch. You're argument   > about conditionalizing the test suite is quite moot as that is the standard   > and not the exception. If excluding modules is not to be allowed\, then   > should we remove the -Dnoextensions=... and -Donlyextensions=...   > options to Configure? (That's a rhetorical question. The answer\, of   > course\, is 'Hell\, no'.)

  > The most fundamental philosophy of Perl it the capability to 'roll your   > own'\, and there is nothing in the current architecture that is sacrosanct   > to modification and flexibility.

  > Yes\, coding up tests correctly to account for modules not being   > present can be a pain\, but doing otherwise\, IMHO\, is a bug. I've dealt   > with that for years with the modules I've supported\, and I don't think   > it would be appropriate to reverse that mentality.

+1 # like @​cpantesters​: testers invent their personal testbed

-- andreas

p5pRT commented 13 years ago

From @tux

On Sun\, 21 Nov 2010 15​:19​:21 -0800\, "Jerry D. Hedden" (via RT) \perlbug\-followup@​perl\.org wrote​:

In order to save time building and testing Perl\, I use the -Dnoextensions=... option in Configure to exclude over a dozen XS extensions when building Perl. These include extensions I don't need (e.g.\, Sys/Syslog)\, don't want (e.g.\, Text/Soundex) or that aren't supported on my current architecture (e.g.\, IPC/SysV).

Not-supported by the system/OS/architecture seems like a good reason to exclude the module from the start. If tests are well written\, they will be skipped anyway in the harness suite.

OTOH I don't think that excluding default modules from the CORE\, in whatever way\, should be supported in Configure for speeding up the build and tests. As Nicholas already mentioned.

I also see that these two statements have a conflicting overlap. It is up to the boss(es) to take a decision.

I wanted the same exclusion capability for non-XS extensions so I created the attached patch. It allows both the -Dnoextensions=... and -Donlyextensions=... options in Configure to work for XS as well as non-XS extensions.

Using this patch\, I now exclude over 50 non-XS modules from my Perl builds. This gains me a 25% (5.12.x) to 35% (blead) reduction in the time needed to build\, test and install Perl. (In blead\, for example\, from 4 hrs. down to 2.5).

There is another way to do this.

If you run Configure\, it will see if config.arch exists and run it if present​: --8\<--- : configuration may be unconditionally patched via a 'config.arch' file if $test -f config.arch; then   echo "I see a config.arch file\, loading it." >&4   . ./config.arch fi -->8---

So\, if you create one of your own\, and put it in the build folder just before you run Configure\, you can write a shell script (config.arch should be plain sh) that modifies $extensions to exclude the ones you do not want. YMMV

-- H.Merijn Brand http​://tux.nl Perl Monger http​://amsterdam.pm.org/ using 5.00307 through 5.12 and porting perl5.13.x on HP-UX 10.20\, 11.00\, 11.11\, 11.23 and 11.31\, OpenSuSE 10.1\, 11.0 .. 11.3 and AIX 5.2 and 5.3. http​://mirrors.develooper.com/hpux/ http​://www.test-smoke.org/ http​://qa.perl.org http​://www.goldmark.org/jeff/stupid-disclaimers/

p5pRT commented 13 years ago

From @demerphq

On 22 November 2010 09​:01\, H.Merijn Brand \h\.m\.brand@&#8203;xs4all\.nl wrote​:

On Sun\, 21 Nov 2010 15​:19​:21 -0800\, "Jerry D. Hedden" (via RT) \perlbug\-followup@&#8203;perl\.org wrote​:

In order to save time building and testing Perl\, I use the -Dnoextensions=... option in Configure to exclude over a dozen XS extensions when building Perl. Ā These include extensions I don't need (e.g.\, Sys/Syslog)\, don't want (e.g.\, Text/Soundex) or that aren't supported on my current architecture (e.g.\, IPC/SysV).

Not-supported by the system/OS/architecture seems like a good reason to exclude the module from the start. If tests are well written\, they will be skipped anyway in the harness suite.

OTOH I don't think that excluding default modules from the CORE\, in whatever way\, should be supported in Configure for speeding up the build and tests. As Nicholas already mentioned.

I dont entirely agree. And we have precedent. When I was working on the regex engine it become extremely irritating to have to rebuild every extension so often.

I hacked the make file to make a minimal target which rebuilt the regex engine only\, with no other modules.

Its been in-core for years now.

I dont think its unreasonable to want to do this /in this way/.

That is\, i think it would be ok to have a

make homebrew mkae homebrew test

or something which did a reduced build cycle\, so long as the normal make/make test and configure behaviour stays the same.

And actually Jerry could use git rerere to set up alocal makefile patch that created such a target based on the make reonly and make test-reonly targets.

Yves

p5pRT commented 13 years ago

From @jandubois

On Mon\, 22 Nov 2010\, demerphq wrote​:

On 22 November 2010 09​:01\, H.Merijn Brand \h\.m\.brand@&#8203;xs4all\.nl wrote​:

On Sun\, 21 Nov 2010 15​:19​:21 -0800\, "Jerry D. Hedden" (via RT) \perlbug\-followup@&#8203;perl\.org wrote​:

In order to save time building and testing Perl\, I use the -Dnoextensions=... option in Configure to exclude over a dozen XS extensions when building Perl. Ā These include extensions I don't need (e.g.\, Sys/Syslog)\, don't want (e.g.\, Text/Soundex) or that aren't supported on my current architecture (e.g.\, IPC/SysV).

Not-supported by the system/OS/architecture seems like a good reason to exclude the module from the start. If tests are well written\, they will be skipped anyway in the harness suite.

OTOH I don't think that excluding default modules from the CORE\, in whatever way\, should be supported in Configure for speeding up the build and tests. As Nicholas already mentioned.

I dont entirely agree. And we have precedent. When I was working on the regex engine it become extremely irritating to have to rebuild every extension so often.

Not building all the extensions also helps with bisecting (even though a Configure based mechanism alone won't help on Windows\, which needs help the most).

[...]

And actually Jerry could use git rerere to set up alocal makefile patch that created such a target based on the make reonly and make test-reonly targets.

Would you mind adding some tutorial-style docs for this approach to the bisecting sample in perlrepository.pod?

Cheers\, -Jan

p5pRT commented 13 years ago

From @doughera88

On Mon\, 22 Nov 2010\, Jan Dubois wrote​:

On Mon\, 22 Nov 2010\, demerphq wrote​:

On 22 November 2010 09​:01\, H.Merijn Brand \h\.m\.brand@&#8203;xs4all\.nl wrote​:

On Sun\, 21 Nov 2010 15​:19​:21 -0800\, "Jerry D. Hedden" (via RT) \perlbug\-followup@&#8203;perl\.org wrote​:

In order to save time building and testing Perl\, I use the -Dnoextensions=... option in Configure to exclude over a dozen XS extensions when building Perl. Ā These include extensions I don't need (e.g.\, Sys/Syslog)\, don't want (e.g.\, Text/Soundex) or that aren't supported on my current architecture (e.g.\, IPC/SysV).

Not building all the extensions also helps with bisecting (even though a Configure based mechanism alone won't help on Windows\, which needs help the most).

On balance\, I'm in favor of this extension to an existing command-line option. For a variety of reasons\, there are times when you definitely want Configure to hand you more rope.

Equally emphatically\, however\, I don't think any compensating changes to the test suite are appropriate at this time. If I deliberately exclude an extension that "we" expect to be there\, then I must live with the consequences. If I go out of my way to build a broken perl\, I expect the test suite to fail.

Incidentally\, as H.Merijn has pointed out\, you can already do this with an override file. Simply assign the list of extensions you actually want in a file 'config.over' and Configure will automatically read it in at the very end. (Or\, you could put code in config.over to weed out the extensions you don't want.)

--   Andy Dougherty doughera@​lafayette.edu

p5pRT commented 13 years ago

From @nwc10

On Sun\, Nov 21\, 2010 at 07​:55​:48PM -0500\, Jerry D. Hedden wrote​:

The consensus seems to be in favor of this patch. You're argument

What consensus? There was very little comment. I think that you're being premature in using the term.

Nicholas Clark

p5pRT commented 13 years ago

From @jdhedden

On Tue\, Nov 23\, 2010 at 11​:07\, Nicholas Clark \nick@&#8203;ccl4\.org wrote​:

On Sun\, Nov 21\, 2010 at 07​:55​:48PM -0500\, Jerry D. Hedden wrote​:

The consensus seems to be in favor of this patch. Ā You're argument

What consensus? There was very little comment. I think that you're being premature in using the term.

Nicholas Clark

Agreed. It was premature. However\, there are some that are in favor.

p5pRT commented 12 years ago

From @cpansprout

On Tue Nov 23 07​:36​:50 2010\, doughera wrote​:

On Mon\, 22 Nov 2010\, Jan Dubois wrote​:

On Mon\, 22 Nov 2010\, demerphq wrote​:

On 22 November 2010 09​:01\, H.Merijn Brand \h\.m\.brand@&#8203;xs4all\.nl wrote​:

On Sun\, 21 Nov 2010 15​:19​:21 -0800\, "Jerry D. Hedden" (via RT) \perlbug\-followup@&#8203;perl\.org wrote​:

In order to save time building and testing Perl\, I use the -Dnoextensions=... option in Configure to exclude over a dozen XS extensions when building Perl. ļæ½These include extensions I don't need (e.g.\, Sys/Syslog)\, don't want (e.g.\, Text/Soundex) or that aren't supported on my current architecture (e.g.\, IPC/SysV).

Not building all the extensions also helps with bisecting (even though a Configure based mechanism alone won't help on Windows\, which needs help the most).

On balance\, I'm in favor of this extension to an existing command-line option. For a variety of reasons\, there are times when you definitely want Configure to hand you more rope.

Equally emphatically\, however\, I don't think any compensating changes to the test suite are appropriate at this time. If I deliberately exclude an extension that "we" expect to be there\, then I must live with the consequences. If I go out of my way to build a broken perl\, I expect the test suite to fail.

Iā€™m in favour of this patch\, as long as we donā€™t modify the test suite to accommodate broken builds.

--

Father Chrysostomos

p5pRT commented 11 years ago

From @jkeenan

On Fri Jan 06 23​:46​:45 2012\, sprout wrote​:

On Tue Nov 23 07​:36​:50 2010\, doughera wrote​:

On Mon\, 22 Nov 2010\, Jan Dubois wrote​:

On Mon\, 22 Nov 2010\, demerphq wrote​:

On 22 November 2010 09​:01\, H.Merijn Brand \h\.m\.brand@&#8203;xs4all\.nl wrote​:

On Sun\, 21 Nov 2010 15​:19​:21 -0800\, "Jerry D. Hedden" (via RT) \perlbug\-followup@&#8203;perl\.org wrote​:

In order to save time building and testing Perl\, I use the -Dnoextensions=... option in Configure to exclude over a dozen XS extensions when building Perl. ļæ½These include extensions I don't need (e.g.\, Sys/Syslog)\, don't want (e.g.\, Text/Soundex) or that aren't supported on my current architecture (e.g.\, IPC/SysV).

Not building all the extensions also helps with bisecting (even though a Configure based mechanism alone won't help on Windows\, which needs help the most).

On balance\, I'm in favor of this extension to an existing command-line option. For a variety of reasons\, there are times when you definitely want Configure to hand you more rope.

Equally emphatically\, however\, I don't think any compensating changes to the test suite are appropriate at this time. If I deliberately exclude an extension that "we" expect to be there\, then I must live with the consequences. If I go out of my way to build a broken perl\, I expect the test suite to fail.

Iā€™m in favour of this patch\, as long as we donā€™t modify the test suite to accommodate broken builds.

A patch to permit exclusion of non-XS extensions was originally submitted by Jerry Hedden in Nov 2010. Jesse Vincent was skeptical. Others were more favorably inclined. Both Andy Dougherty and Father C. spoke in favor provided we don't spend time modifying the test suite to accommodate such an exclusion.

I suspect that if we were to adopt this patch\, the maintenance burden would fall on the Configure maintainers. I also suspect that the patch is old enough that it wouldn't apply cleanly\, though I haven't tested that.

Do we want to move forward with this?

Thank you very much. Jim Keenan

p5pRT commented 11 years ago

From @nwc10

On Fri\, Sep 06\, 2013 at 07​:12​:46PM -0700\, James E Keenan via RT wrote​:

On Fri Jan 06 23​:46​:45 2012\, sprout wrote​:

On Tue Nov 23 07​:36​:50 2010\, doughera wrote​:

On Mon\, 22 Nov 2010\, Jan Dubois wrote​:

On Mon\, 22 Nov 2010\, demerphq wrote​:

On 22 November 2010 09​:01\, H.Merijn Brand \h\.m\.brand@&#8203;xs4all\.nl wrote​:

On Sun\, 21 Nov 2010 15​:19​:21 -0800\, "Jerry D. Hedden" (via RT) \perlbug\-followup@&#8203;perl\.org wrote​:

In order to save time building and testing Perl\, I use the -Dnoextensions=... option in Configure to exclude over a dozen XS extensions when building Perl. These include extensions I don't need (e.g.\, Sys/Syslog)\, don't want (e.g.\, Text/Soundex) or that aren't supported on my current architecture (e.g.\, IPC/SysV).

Not building all the extensions also helps with bisecting (even though a Configure based mechanism alone won't help on Windows\, which needs help the most).

On balance\, I'm in favor of this extension to an existing command-line option. For a variety of reasons\, there are times when you definitely want Configure to hand you more rope.

Equally emphatically\, however\, I don't think any compensating changes to the test suite are appropriate at this time. If I deliberately exclude an extension that "we" expect to be there\, then I must live with the consequences. If I go out of my way to build a broken perl\, I expect the test suite to fail.

I'm in favour of this patch\, as long as we don't modify the test suite to accommodate broken builds.

A patch to permit exclusion of non-XS extensions was originally submitted by Jerry Hedden in Nov 2010. Jesse Vincent was skeptical. Others were more favorably inclined. Both Andy Dougherty and Father C. spoke in favor provided we don't spend time modifying the test suite to accommodate such an exclusion.

I suspect that if we were to adopt this patch\, the maintenance burden would fall on the Configure maintainers. I also suspect that the patch is old enough that it wouldn't apply cleanly\, though I haven't tested that.

Do we want to move forward with this?

Yes\, I think that we should\, but specifically as sprout states\, that we don't modify the test suite to (attempt to) compensate for user-disabled modules.

I don't think that it will a significant ongoing burden on the Configure maintainers to have this functionality in place. (Once it is added).

It would be a long term cost if we start to feel the need to add skip()s in various test suites to ensure no tests failed for user-disabled modules\, because this has the potential to be a combinatorial explosion of permutations\, and a lot of manual work prone to errors.

Nicholas Clark

p5pRT commented 7 years ago

From @jkeenan

On Fri\, 13 Sep 2013 12​:38​:30 GMT\, nicholas wrote​:

On Fri\, Sep 06\, 2013 at 07​:12​:46PM -0700\, James E Keenan via RT wrote​:

On Fri Jan 06 23​:46​:45 2012\, sprout wrote​:

On Tue Nov 23 07​:36​:50 2010\, doughera wrote​:

On Mon\, 22 Nov 2010\, Jan Dubois wrote​:

On Mon\, 22 Nov 2010\, demerphq wrote​:

On 22 November 2010 09​:01\, H.Merijn Brand \h\.m\.brand@&#8203;xs4all\.nl wrote​:

On Sun\, 21 Nov 2010 15​:19​:21 -0800\, "Jerry D. Hedden" (via RT) \perlbug\-followup@&#8203;perl\.org wrote​:

In order to save time building and testing Perl\, I use the -Dnoextensions=... option in Configure to exclude over a dozen XS extensions when building Perl. These include extensions I don't need (e.g.\, Sys/Syslog)\, don't want (e.g.\, Text/Soundex) or that aren't supported on my current architecture (e.g.\, IPC/SysV).

Not building all the extensions also helps with bisecting (even though a Configure based mechanism alone won't help on Windows\, which needs help the most).

On balance\, I'm in favor of this extension to an existing command-line option. For a variety of reasons\, there are times when you definitely want Configure to hand you more rope.

Equally emphatically\, however\, I don't think any compensating changes to the test suite are appropriate at this time. If I deliberately exclude an extension that "we" expect to be there\, then I must live with the consequences. If I go out of my way to build a broken perl\, I expect the test suite to fail.

I'm in favour of this patch\, as long as we don't modify the test suite to accommodate broken builds.

A patch to permit exclusion of non-XS extensions was originally submitted by Jerry Hedden in Nov 2010. Jesse Vincent was skeptical. Others were more favorably inclined. Both Andy Dougherty and Father C. spoke in favor provided we don't spend time modifying the test suite to accommodate such an exclusion.

I suspect that if we were to adopt this patch\, the maintenance burden would fall on the Configure maintainers. I also suspect that the patch is old enough that it wouldn't apply cleanly\, though I haven't tested that.

Do we want to move forward with this?

Yes\, I think that we should\, but specifically as sprout states\, that we don't modify the test suite to (attempt to) compensate for user- disabled modules.

I don't think that it will a significant ongoing burden on the Configure maintainers to have this functionality in place. (Once it is added).

It would be a long term cost if we start to feel the need to add skip()s in various test suites to ensure no tests failed for user-disabled modules\, because this has the potential to be a combinatorial explosion of permutations\, and a lot of manual work prone to errors.

Nicholas Clark

Jerry (original poster)​:

Would you like to draw a new version of this patch against blead and re-submit it?

That would give us something to consider after 5.26.0 is released.

(Otherwise\, the ticket is so old that it should be closed.)

Thank you very much.

-- James E Keenan (jkeenan@​cpan.org)

p5pRT commented 7 years ago

From @jdhedden

I no longer involve myself with building custom versions of perl as I did in the past\, so I'm afraid I can't easily generate an updated version of this patch. Yes\, you should probably just close the ticket. Thanks.

On Sun\, Feb 26\, 2017 at 6​:46 PM\, James E Keenan via RT \< perlbug-followup@​perl.org> wrote​:

On Fri\, 13 Sep 2013 12​:38​:30 GMT\, nicholas wrote​:

On Fri\, Sep 06\, 2013 at 07​:12​:46PM -0700\, James E Keenan via RT wrote​:

On Fri Jan 06 23​:46​:45 2012\, sprout wrote​:

On Tue Nov 23 07​:36​:50 2010\, doughera wrote​:

On Mon\, 22 Nov 2010\, Jan Dubois wrote​:

On Mon\, 22 Nov 2010\, demerphq wrote​:

On 22 November 2010 09​:01\, H.Merijn Brand \h\.m\.brand@&#8203;xs4all\.nl wrote​:

On Sun\, 21 Nov 2010 15​:19​:21 -0800\, "Jerry D. Hedden" (via RT) \perlbug\-followup@&#8203;perl\.org wrote​:

In order to save time building and testing Perl\, I use the -Dnoextensions=... option in Configure to exclude over a dozen XS extensions when building Perl. These include extensions I don't need (e.g.\, Sys/Syslog)\, don't want (e.g.\, Text/Soundex) or that aren't supported on my current architecture (e.g.\, IPC/SysV).

Not building all the extensions also helps with bisecting (even though a Configure based mechanism alone won't help on Windows\, which needs help the most).

On balance\, I'm in favor of this extension to an existing command-line option. For a variety of reasons\, there are times when you definitely want Configure to hand you more rope.

Equally emphatically\, however\, I don't think any compensating changes to the test suite are appropriate at this time. If I deliberately exclude an extension that "we" expect to be there\, then I must live with the consequences. If I go out of my way to build a broken perl\, I expect the test suite to fail.

I'm in favour of this patch\, as long as we don't modify the test suite to accommodate broken builds.

A patch to permit exclusion of non-XS extensions was originally submitted by Jerry Hedden in Nov 2010. Jesse Vincent was skeptical. Others were more favorably inclined. Both Andy Dougherty and Father C. spoke in favor provided we don't spend time modifying the test suite to accommodate such an exclusion.

I suspect that if we were to adopt this patch\, the maintenance burden would fall on the Configure maintainers. I also suspect that the patch is old enough that it wouldn't apply cleanly\, though I haven't tested that.

Do we want to move forward with this?

Yes\, I think that we should\, but specifically as sprout states\, that we don't modify the test suite to (attempt to) compensate for user- disabled modules.

I don't think that it will a significant ongoing burden on the Configure maintainers to have this functionality in place. (Once it is added).

It would be a long term cost if we start to feel the need to add skip()s in various test suites to ensure no tests failed for user-disabled modules\, because this has the potential to be a combinatorial explosion of permutations\, and a lot of manual work prone to errors.

Nicholas Clark

Jerry (original poster)​:

Would you like to draw a new version of this patch against blead and re-submit it?

That would give us something to consider after 5.26.0 is released.

(Otherwise\, the ticket is so old that it should be closed.)

Thank you very much.

-- James E Keenan (jkeenan@​cpan.org)

p5pRT commented 7 years ago

From @jkeenan

On Tue\, 28 Feb 2017 02​:50​:47 GMT\, jdhedden@​cpan.org wrote​:

I no longer involve myself with building custom versions of perl as I did in the past\, so I'm afraid I can't easily generate an updated version of this patch. Yes\, you should probably just close the ticket. Thanks.

Accordingly\, closing. Thanks for getting back to us on this.

-- James E Keenan (jkeenan@​cpan.org)

p5pRT commented 7 years ago

@jkeenan - Status changed from 'open' to 'rejected'