-
Notifications
You must be signed in to change notification settings - Fork 553
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
t/re/pat.t: Compilation error during make minitest due to @{^CAPTURE} #17293
Comments
|
@hvds I'm proposing that we schedule regular smokes of minitest in order to catch breaking changes like this. Can you offer insights into the importance of this? |
|
I was under the impression that miniperl can't load xs libraries. If that
is correct then named captures won't work under miniperl and we should skip
any XS related tests when we run under it.
Yves
…On Tue, 12 Nov 2019, 04:01 James E Keenan, ***@***.***> wrote:
When running make minitest on blead (following up on a #p5p comment by
@khwilliamson <https://github.com/khwilliamson>), t/re/pat.t fails to
compile. A trimmed-down version of the error message:
t/re/pat ....................... Can't locate Tie/Hash/NamedCapture.pm in @inc
(you may need to install the Tie::Hash::NamedCapture module)
***@***.*** contains: ../lib . ../ext/re
# ... long list of directories -- not including ext/Tie-Hash-NamedCapture ...
...
/home/jkeenan/gitwork/perl/lib .. . .) at re/pat.t line 674.
BEGIN failed--compilation aborted at re/pat.t line 674.
In the core distribution, we have
ext/Tie-Hash-NamedCapture/NamedCapture.pm. I tried various ways of
dealing with this failure. I tried adding ../ext/Tie-Hash-NamedCapture to
@inc. I tried adding a skip("message") if is_miniperl; statement (as in
t/re/subst.t). None of these worked, i.e., none of them enabled the file
to compile. Whenever I hit line 674 below, I got the fatal error.
672 $_= "ace";
673 /c(?=.$)/;
674 is($#{^CAPTURE}, -1, $message);
Any ideas?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#17293?email_source=notifications&email_token=AAAZ5RZZKH4TEWUXZREYJVDQTIMBJA5CNFSM4JL5REUKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HYSMZBA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZ5R5ZULM37CJ2KLEF5ITQTIMBJANCNFSM4JL5REUA>
.
|
|
On Tue, 12 Nov 2019, 04:01 James E Keenan, ***@***.***> wrote:
> When running make minitest on blead (following up on a #p5p comment by
> @khwilliamson <https://github.com/khwilliamson>), t/re/pat.t fails to
> compile. A trimmed-down version of the error message:
>
> t/re/pat ....................... Can't locate
Tie/Hash/NamedCapture.pm in @inc
> (you may need to install the Tie::Hash::NamedCapture module)
> ***@***.*** contains: ../lib . ../ext/re
> # ... long list of directories -- not including
ext/Tie-Hash-NamedCapture ...
> ...
> /home/jkeenan/gitwork/perl/lib .. . .) at re/pat.t line 674.
> BEGIN failed--compilation aborted at re/pat.t line 674.
>
> In the core distribution, we have
> ext/Tie-Hash-NamedCapture/NamedCapture.pm. I tried various ways of
> dealing with this failure. I tried adding ../ext/Tie-Hash-NamedCapture to
> @inc. I tried adding a skip("message") if is_miniperl; statement (as in
> t/re/subst.t). None of these worked, i.e., none of them enabled the file
> to compile. Whenever I hit line 674 below, I got the fatal error.
>
> 672 $_= "ace";
> 673 /c(?=.$)/;
> 674 is($#{^CAPTURE}, -1, $message);
>
> Any ideas?
>
On 11/12/19 1:07 PM, Yves Orton wrote:> I was under the impression that
miniperl can't load xs libraries. If that
is correct then named captures won't work under miniperl and we should skip
any XS related tests when we run under it.
Yves
Yves:
The thing is: Up until recently the test file was compiling and passing
under 'miniperl'. AFAICT, miniperl had no problem with this code from
the time you added it in 2016 until recently.
I am currently trying to bisect to find the point of failure.
As mentioned earlier in the thread, last night I tried to add a SKIP
block where the 'skip' condition was that test.pl's is_miniperl() sub
returned true. We have code like that in other files, e.g.,
t/re/subst.t. But miniperl reported a compile-time error when
attempting to run t/re/pat.t, so it never made it as far as running the
SKIP block.
jimk
|
|
I'll take a look later...
Yves
…On Tue, 12 Nov 2019, 20:25 James E Keenan, ***@***.***> wrote:
> On Tue, 12 Nov 2019, 04:01 James E Keenan, ***@***.***>
wrote:
>
> > When running make minitest on blead (following up on a #p5p comment by
> > @khwilliamson <https://github.com/khwilliamson>), t/re/pat.t fails to
> > compile. A trimmed-down version of the error message:
> >
> > t/re/pat ....................... Can't locate
> Tie/Hash/NamedCapture.pm in @inc
> > (you may need to install the Tie::Hash::NamedCapture module)
> > ***@***.*** contains: ../lib . ../ext/re
> > # ... long list of directories -- not including
> ext/Tie-Hash-NamedCapture ...
> > ...
> > /home/jkeenan/gitwork/perl/lib .. . .) at re/pat.t line 674.
> > BEGIN failed--compilation aborted at re/pat.t line 674.
> >
> > In the core distribution, we have
> > ext/Tie-Hash-NamedCapture/NamedCapture.pm. I tried various ways of
> > dealing with this failure. I tried adding ../ext/Tie-Hash-NamedCapture
to
> > @inc. I tried adding a skip("message") if is_miniperl; statement (as in
> > t/re/subst.t). None of these worked, i.e., none of them enabled the
file
> > to compile. Whenever I hit line 674 below, I got the fatal error.
> >
> > 672 $_= "ace";
> > 673 /c(?=.$)/;
> > 674 is($#{^CAPTURE}, -1, $message);
> >
> > Any ideas?
> >
On 11/12/19 1:07 PM, Yves Orton wrote:> I was under the impression that
miniperl can't load xs libraries. If that
> is correct then named captures won't work under miniperl and we should
skip
> any XS related tests when we run under it.
>
> Yves
>
Yves:
The thing is: Up until recently the test file was compiling and passing
under 'miniperl'. AFAICT, miniperl had no problem with this code from
the time you added it in 2016 until recently.
I am currently trying to bisect to find the point of failure.
As mentioned earlier in the thread, last night I tried to add a SKIP
block where the 'skip' condition was that test.pl's is_miniperl() sub
returned true. We have code like that in other files, e.g.,
t/re/subst.t. But miniperl reported a compile-time error when
attempting to run t/re/pat.t, so it never made it as far as running the
SKIP block.
jimk
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#17293?email_source=notifications&email_token=AAAZ5R3D6EI2DCVSQRV3OTDQTL7K5A5CNFSM4JL5REUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED3UCLY#issuecomment-553074991>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZ5R3DAE7RQDR72TBF6E3QTL7K5ANCNFSM4JL5REUA>
.
|
|
Bisection points to: 22f0578 Bisection invocation: @tonycoz, can you take a look? Thank you very much. |
|
My commit made access to I can see a few solutions, which are either non-trivial or could reduce performance:
I'm most inclined to go for the last. |
|
On 11/12/19 2:49 PM, Tony Cook wrote:
My commit made access to |*{^CAPTURE}| and |*{^CAPTURE_ALL}| load
|Tie::Hash::NamedCapture| unconditionally due to |gv_magicalize()| only
being called once for each GV with a name longer than one character,
which is why the use of @{^CAPTURE} in this code is trying (and failing)
to load it.
I can see a few solutions, which are either non-trivial or could reduce
performance:
* call gv_magicalize() every time and revert the gv.c changes - this
would add a performance penalty to every gv access.
* add a gvmini.o, like we have opmini.o and #ifdef out the
Tie::Hash::NamedCapture load for miniperl - I'm not fond of the
*mini.o hack
* move the implementation of |%{^CAPTURE}| and |%{^CAPTURE_ALL}| (and
|%+|, |%-|) into the core binary - this would be largely be moving
the tie code into universal.c
I'm most inclined to go for the last.
I think that merely skipping this test under minitest is the way to go.
Unless this has uncovered a performance issue. minitest is known to be
crippled, and many tests are skipped in it that would require a load.
…
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17293?email_source=notifications&email_token=AAA2DH7WEZCWD4KOP5GPKYTQTMQGXA5CNFSM4JL5REUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED4B65I#issuecomment-553131893>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA2DH2PTZDS5NVLWTZD4LTQTMQGXANCNFSM4JL5REUA>.
|
|
I'd go for the last too.
Yves
Ps on a phone sorry for top posting...
…On Tue, 12 Nov 2019, 22:49 Tony Cook, ***@***.***> wrote:
My commit made access to *{^CAPTURE} and *{^CAPTURE_ALL} load
Tie::Hash::NamedCapture unconditionally due to gv_magicalize() only being
called once for each GV with a name longer than one character, which is why
the use of @{^CAPTURE} in this code is trying (and failing) to load it.
I can see a few solutions, which are either non-trivial or could reduce
performance:
- call gv_magicalize() every time and revert the gv.c changes - this
would add a performance penalty to every gv access.
- add a gvmini.o, like we have opmini.o and #ifdef out the
Tie::Hash::NamedCapture load for miniperl - I'm not fond of the *mini.o hack
- move the implementation of %{^CAPTURE} and %{^CAPTURE_ALL} (and %+,
%-) into the core binary - this would be largely be moving the tie
code into universal.c
I'm most inclined to go for the last.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#17293?email_source=notifications&email_token=AAAZ5R4FYYHAACSFUGGXSYDQTMQGXA5CNFSM4JL5REUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED4B65I#issuecomment-553131893>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZ5R7W4UDZOL746G5IMMLQTMQGXANCNFSM4JL5REUA>
.
|
The gv is magicalized at compile-time, to prevent it under minitest we'd have to move the relevant tests to a new file or put them in a string eval, both of which is ugly. |
|
TonyC wrote:
The last sounds good to me, too. |
|
khw wrote:
As I wrote previously, I made several attempts to skip this test (or, at least, the tests within the file that pertain to Thanks. |
I think it would be valuable to do so, but the value is limited: it's handy for it to work when you want it, but if the full test suite is not failing it's likely only telling you something about the testsuite rather than about perl - in most cases one could just as usefully discover and fix that at the point one tries to use it. As for the fix: I agree that string eval is probably the way to go. Hugo |
Previousl this could cause problems during minitest. Fixes Perl#17293
Previousl this could cause problems during minitest. Fixes Perl#17293
Previousl this could cause problems during minitest. Fixes Perl#17293
When running
make miniteston blead (following up on a #p5p comment by @khwilliamson),t/re/pat.tfails to compile. A trimmed-down version of the error message:In the core distribution, we have
ext/Tie-Hash-NamedCapture/NamedCapture.pm. I tried various ways of dealing with this failure. I tried adding../ext/Tie-Hash-NamedCaptureto@INC. I tried adding askip("message") if is_miniperl;statement (as int/re/subst.t). None of these worked, i.e., none of them enabled the file to compile. Whenever I hit line 674 below, I got the fatal error.Any ideas?
The text was updated successfully, but these errors were encountered: