[Cuis-dev] Bugfix: MethodNode>>sourceText can return a string with syntax errors

Juan Vuletich juan at cuis.st
Mon Oct 5 13:24:22 PDT 2026


Thanks Facu!

This is now at GitHub.

Cheers,

On 2026-10-04 1:28 PM, Facundo Javier Gelatti via Cuis-dev wrote:
> As MethodNode>>sourceText uses #printString, it can return a string 
> with invalid syntax if the method is very large. I attach some example 
> code to see this in a workspace (example1.workspace.st 
> <http://example1.workspace.st>).
>
> Note that it's not needed to have a method literally that large to 
> trigger this bug.
> For example, I've found this when running some tests with the 
> CodeCoverage package. The code of the method was not so long, but as 
> the coverage tool instruments the method, it increased its size by a 
> considerable amount.
> Another example of a short method triggering the bug can be found in 
> example2.workspace.st <http://example2.workspace.st>.
>
> The fix is to use #fullPrintString instead of #printString. I attach a 
> changeset to do this.
>
> Cheers!
> Facu
>
>
>
-- 
Juan Vuletich
www.cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20261005/86841217/attachment.htm>


More information about the Cuis-dev mailing list