Commit 321ca79
Fix jcpan -t DateTime regressions: XSLoader @isa fallback and scopeExitCleanup
Three issues fixed:
1. XSLoader @isa fallback too broad (from #441): When a module like Clone
has @isa=(Exporter) and XSLoader::load fails to find the Java XS class,
the fallback code treated any non-empty @isa as proof the module can work
through inheritance. This prevented Clone::PP from loading, breaking the
entire DateTime dependency chain. Fix: add NON_FUNCTIONAL_ISA set
(Exporter, DynaLoader, AutoLoader, XSLoader) and only succeed on @isa
fallback when a functional parent is present.
2. scopeExitCleanup closing shared IO handles (from #440): The foreach body
null-stores with closeIO=true called scopeExitCleanup on ALL scalars,
including copies of shared filehandle references. This broke Test2 TODO
mechanism because Test2::Formatter::TAP copies STDOUT handles into a
loop variable, and scopeExitCleanup closed them prematurely. Fix: add
ioOwner flag to RuntimeScalar, set only by IOOperator.open() when
creating a new anonymous glob. scopeExitCleanup now only closes IO on
scalars marked as IO owners. Copies via set() do not inherit the flag.
3. TAP::Parser::Iterator::Process warnings: Guard sysread return value
against empty string, skip $fh == $err comparison when $err is not a
real filehandle (empty string in PerlOnJava), and protect err handle
close against missing refs.
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent 0ce54d5 commit 321ca79
5 files changed
Lines changed: 68 additions & 9 deletions
File tree
- src/main
- java/org/perlonjava
- core
- runtime
- operators
- perlmodule
- runtimetypes
- perl/lib/TAP/Parser/Iterator
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
616 | 621 | | |
617 | 622 | | |
618 | 623 | | |
| |||
Lines changed: 43 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
17 | 32 | | |
18 | 33 | | |
19 | 34 | | |
| |||
94 | 109 | | |
95 | 110 | | |
96 | 111 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
101 | 121 | | |
102 | 122 | | |
103 | | - | |
| 123 | + | |
104 | 124 | | |
105 | 125 | | |
106 | 126 | | |
| |||
164 | 184 | | |
165 | 185 | | |
166 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
167 | 205 | | |
168 | 206 | | |
169 | 207 | | |
| |||
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
68 | 81 | | |
69 | 82 | | |
70 | 83 | | |
| |||
1798 | 1811 | | |
1799 | 1812 | | |
1800 | 1813 | | |
1801 | | - | |
| 1814 | + | |
1802 | 1815 | | |
1803 | 1816 | | |
1804 | 1817 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| 257 | + | |
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
260 | 261 | | |
261 | | - | |
| 262 | + | |
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| |||
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
343 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
344 | 347 | | |
345 | 348 | | |
346 | 349 | | |
| |||
0 commit comments