Skip to content

Commit 040bac7

Browse files
committed
Add passing test for RT#123272 verified not passing on <= 59f7cb9
This seems to adequately represent the since-fixed ABC precomp issues Note that it runs into run_alt problems when run directly from roast where there is no t/spec/packages directory unless you link said path to the roast packages/ directory. Will ensure it works from make spectest after this commit.
1 parent 1e61fd2 commit 040bac7

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

S10-packages/precompilation.t

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use lib 't/spec/packages';
22
use Test;
33
use Test::Util;
44

5-
plan 22;
5+
plan 27;
66

77
my @*MODULES; # needed for calling CompUnit::Repository::need directly
88
my $precomp-ext := $*VM.precomp-ext;
@@ -31,6 +31,33 @@ my @keys = Test::Util::run( q:to"--END--").lines;
3131

3232
is-deeply @keys, [<A B C>], 'Diamond relationship';
3333

34+
my @precompiled2 = Test::Util::run( q:to"--END--").lines;
35+
use lib 't/spec/packages';
36+
37+
for <T P D N S B G K C E F H R A U> {
38+
my $comp-unit = $*REPO.need(CompUnit::DependencySpecification.new(:short-name("Example2::$_")));
39+
say $comp-unit.precompiled;
40+
}
41+
--END--
42+
is @precompiled2.elems, 15;
43+
is $_, 'True' for @precompiled;
44+
45+
# RT #123272
46+
my @keys2 = Test::Util::run( q:to"--END--").lines;
47+
use v6;
48+
use lib 't/spec/packages';
49+
use Example2::T;
50+
51+
use Example2::G;
52+
use Example2::F;
53+
use Example2::A;
54+
use Example2::U;
55+
56+
.say for Example2::.keys.sort;
57+
--END--
58+
59+
is-deeply @keys2, [<C D E F H K N P R S>], 'Twisty maze of dependencies, all different';
60+
3461
#?rakudo.jvm skip 'RT #122896'
3562
#?rakudo.moar skip 'RT #122896'
3663
{

0 commit comments

Comments
 (0)