ViennaConstrainedType>>name takes the block source from printString; Pharo 14 BlockClosure>>printOn: prints '[ ] in Class>>selector'. Repair fixes/tomooda-viennatalk.st (name uses sourceNode sourceCode) is committed but NOT run.
Next step: scripts/vmrun.sh pkgs --redo <work directory> 154 154; expect 1430 of 1430.
| Load | Stock Cog | iospharo VM |
|---|---|---|
| ok | tests=1430 P=1429 F=1 E=0 S=0 T=0 X=0 | tests=1430 P=1429 F=1 E=0 S=0 T=0 X=0 |
| Test | Stock Cog | iospharo VM |
|---|---|---|
ViennaConstrainedTypeTest>>testName | FAIL | FAIL |
"tomooda/ViennaTalk: ViennaConstrainedTypeTest>>testName fails the same way on the two VMs. ViennaConstrainedType>>name builds the name of the type from 'invariant printString'. In Pharo 14 BlockClosure>>printOn: prints '[ ] in Class>>#selector', not the source of the block, so the name is 'int inv [ ] in ViennaConstrainedTypeTest>>#testName' and not 'int inv [ :i | i < 0 ]'. The name is shown to the user as the text of the type, so the code must use the source text. The repair uses the source of the AST node of the block (BlockClosure>>sourceNode, sourceCode) for a block, and keeps printString for the other invariants (a Symbol such as #odd prints as #odd, as before). The test and its expected text stay as they are." fix value: #ViennaConstrainedType value: #name value: [ :source | source includesSubstring: ''' inv '' , invariant printString' ] value: 'name | text | text := invariant isBlock ifTrue: [ invariant sourceNode sourceCode ] ifFalse: [ '''' ]. ^ basetype name , '' inv '' , (text isEmpty ifTrue: [ invariant printString ] ifFalse: [ text ])'.
State of 2026-11-20. Made from the test records of the iospharo project (a second Pharo VM). The fixes are proposals for review.