<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Nice. Integrated.<br>
<br>
Thanks!<br>
<br>
On 5/6/2025 7:22 PM, Hernán Wilkinson via Cuis-dev wrote:
<blockquote
cite="mid:CAGgF3Gx51BEEG+8_9HSbfdxbtqk+peFYyFSJ8Utu0M2VTUL61A@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div> attached is a change I propose to DecompilerTests (it
should be called DecompilerTest, singular, a change I did not
include to facilitate merging).</div>
<div> Currently DecompilerTests decompiles all classes in the
image. This contradicts a testing rule that is that "the test
must be in control of everything". In these tests, they do not
control the setup because the decompiled classes will change
based on the classes in the image, that is the reason Nico, me
and for sure other people get a test failure when running that
test.</div>
<div> To minimize the impact I changed the tests to run only on
the base classes, that is classes on Kernel, Graphics, System,
etc.</div>
<div> BTW, I don't know what DecompilerTestFailuresCollector is
there for... it has no tests and no references...</div>
<div><br>
</div>
<div>Cheers!</div>
<div>Hernan.</div>
</div>
<br>
<div class="gmail_quote gmail_quote_container">
<div dir="ltr" class="gmail_attr">On Mon, May 5, 2025 at 1:13 PM
Juan Vuletich via Cuis-dev <<a moz-do-not-send="true"
href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff"> On 5/5/2025 1:04 PM, Nicolás Papagna
Maldonado via Cuis-dev wrote:
<blockquote type="cite">
<div dir="ltr">Hi Juan, all!
<div><br>
</div>
<div>Thanks for the clarification.</div>
<div><br>
</div>
<div>CodeCoverage de-optimizes methods to do its thing,
so <span style="font-family: monospace;">CodeCoverageTest
temporaryVariable</span> is actually a valid
use-case (it's used to check whether the temporary
variable declaration is marked as 'covered' when the
variable is read.</div>
<div><br>
</div>
<div>Is there any way I can exclude such tests from <span
style="font-family: monospace;">DecompilerTests?</span></div>
I'm building a custom image where I need to check that I
didn't break any tests in the base image and that
failing tests is breaking my CI builds, preventing the
build from suceeding.
<div><br>
</div>
<div>Cheers!</div>
<div>Nico PM</div>
</div>
</blockquote>
<br>
Yes, you can add it to #expectedFailures . BaseImageTests
has some examples of this.<br>
<br>
Cheers,<br>
<br>
<blockquote type="cite"><br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, May 5, 2025 at
12:54 PM Juan Vuletich <<a moz-do-not-send="true"
href="mailto:juan@cuis.st" target="_blank">juan@cuis.st</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px
0px 0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff"> Hi Nico.<br>
<br>
I don't think this is a bug. Decompiler creates
Smalltalk code from actual bytecode. Dead code had
been removed when generating the bytecode. Looks
fine to me.<br>
<br>
Does it make sense to add some use of the 'a'
variable, so it is kept during compilation? I mean,
it is difficult to imagine that CodeCoverageTest can
do something interesting with a method that had all
its code optimized out...<br>
<br>
Cheers,<br>
<br>
On 5/4/2025 1:49 PM, Nicolás Papagna Maldonado via
Cuis-dev wrote:
<blockquote type="cite">
<div dir="ltr">Hi folks,
<div><br>
</div>
<div>I don't know if this is a bug or the
expected behavior.</div>
<div><br>
</div>
<div>Today I ran the tests in <font
face="monospace">BaseImageTests</font> with
the <font face="monospace">CodeCoverage</font>
package (<a moz-do-not-send="true"
href="https://github.com/npapagna/cuis-code-coverage"
target="_blank">https://github.com/npapagna/cuis-code-coverage</a>)
loaded and one of the <span
style="font-family: monospace;">DecompilerTests </span>failed.</div>
<div>The reason seems to be that <font
face="monospace">Decompiler</font> does not
restore unused temporary variables.</div>
<div><br>
</div>
<div>In particular, <font face="monospace">DecompilerTests>>#testDecompilerInClassesCNtoCZ</font>
was failing on <font face="monospace">CodeCoverageTest
temporaryVariable</font>:<br>
<div>(For context: this method is needed to
reproduce a test scenario for the
CodeCoverage tool)</div>
<div><br>
</div>
<div><font face="monospace">CodeCoverageTest
>> #temporaryVariable<br>
| a |<br>
a</font>.</div>
<div><font face="monospace"><br>
</font></div>
To reproduce without the CodeCoverage package,
evaluate:
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace">Object compile:
'm1 |a| a'.<br>
<br>
newCodeString := (Decompiler new<br>
decompile: #m1<br>
in: Object<br>
method: Object >> #m1)
decompileString.</font></div>
</div>
<div><font face="monospace"><br>
</font></div>
Notice that <font face="monospace">newCodeString</font>
is <font face="monospace">'m1 ^ self.'</font> and
it should be <font face="monospace">'m1 |a| a'</font>(if
this is really a bug).
<div><font face="monospace"><br>
</font></div>
<div>The code above was run on HEAD at the
moment
(6c13d4eda2e9a8c56362ae3363d7b013917227c5).</div>
<div><br>
</div>
<div>Is this something that needs to be fixed?</div>
<div>
<div><font face="monospace"><br>
</font></div>
Best,<br>
Nico PM</div>
</div>
</blockquote>
<br>
<br>
<pre cols="72">--
Juan Vuletich
<a moz-do-not-send="true" href="http://www.cuis-smalltalk.org" target="_blank">www.cuis-smalltalk.org</a>
<a moz-do-not-send="true" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev" target="_blank">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a moz-do-not-send="true" href="https://github.com/jvuletich" target="_blank">https://github.com/jvuletich</a>
<a moz-do-not-send="true" href="https://www.linkedin.com/in/juan-vuletich-75611b3" target="_blank">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
<a moz-do-not-send="true" href="https://independent.academia.edu/JuanVuletich" target="_blank">https://independent.academia.edu/JuanVuletich</a>
<a moz-do-not-send="true" href="https://www.researchgate.net/profile/Juan-Vuletich" target="_blank">https://www.researchgate.net/profile/Juan-Vuletich</a>
<a moz-do-not-send="true" href="https://patents.justia.com/inventor/juan-manuel-vuletich" target="_blank">https://patents.justia.com/inventor/juan-manuel-vuletich</a>
<a moz-do-not-send="true" href="https://twitter.com/JuanVuletich" target="_blank">https://twitter.com/JuanVuletich</a></pre>
</div>
</blockquote>
</div>
<div><br clear="all">
</div>
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature"><br>
Nicolás Papagna</div>
</blockquote>
<br>
<br>
<pre cols="72">--
Juan Vuletich
<a moz-do-not-send="true" href="http://cuis.st" target="_blank">cuis.st</a>
<a moz-do-not-send="true" href="http://github.com/jvuletich" target="_blank">github.com/jvuletich</a>
<a moz-do-not-send="true" href="http://researchgate.net/profile/Juan-Vuletich" target="_blank">researchgate.net/profile/Juan-Vuletich</a>
<a moz-do-not-send="true" href="http://independent.academia.edu/JuanVuletich" target="_blank">independent.academia.edu/JuanVuletich</a>
<a moz-do-not-send="true" href="http://patents.justia.com/inventor/juan-manuel-vuletich" target="_blank">patents.justia.com/inventor/juan-manuel-vuletich</a>
<a moz-do-not-send="true" href="http://linkedin.com/in/juan-vuletich-75611b3" target="_blank">linkedin.com/in/juan-vuletich-75611b3</a>
<a moz-do-not-send="true" href="http://twitter.com/JuanVuletich" target="_blank">twitter.com/JuanVuletich</a></pre>
</div>
-- <br>
Cuis-dev mailing list<br>
<a moz-do-not-send="true" href="mailto:Cuis-dev@lists.cuis.st"
target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a moz-do-not-send="true"
href="https://lists.cuis.st/mailman/listinfo/cuis-dev"
rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote>
</div>
<div><br clear="all">
</div>
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div style="font-size: small;">
<div dir="ltr">
<div dir="ltr">
<div style="font-size: 12.8px;"><span
style="font-family: tahoma,sans-serif;
font-size: xx-small; border-collapse: collapse;"><strong><span
style="font-size: 8pt;"><span
style="font-size: small;"><font size="2"><span
style="font-weight: normal;"><span
style="font-weight: bold;">Hernán
Wilkinson</span><br>
Agile Software Development, Teaching
& Coaching</span></font></span></span></strong></span></div>
<div style="font-size: 12.8px;"><span
style="font-family: tahoma,sans-serif;
font-size: xx-small; border-collapse: collapse;"><strong><span
style="font-size: 8pt;"><span
style="font-size: small;"><font size="2"><span
style="font-weight: normal;">Phone:
+54-011</span></font></span></span></strong></span><font
size="2" face="tahoma, sans-serif">-4893-2057</font></div>
<div style="font-size: 12.8px;"><strong
style="font-family: tahoma,sans-serif;
font-size: xx-small;"><span style="font-size:
8pt;"><span style="font-size: small;"><font
size="2"><span style="font-weight:
normal;">Twitter: @HernanWilkinson</span></font></span></span></strong></div>
<div style="font-size: 12.8px;"><span
style="font-family: tahoma,sans-serif;
font-size: xx-small; border-collapse: collapse;"><strong><span
style="font-size: 8pt;"><span
style="font-size: small;"><font size="2"><span
style="font-weight: normal;">site: <a
moz-do-not-send="true"
href="http://www.10pines.com/"
style="color: rgb(17, 65, 112);"
target="_blank">http://www.10Pines.com</a></span></font></span></span></strong></span></div>
<div style="font-size: 12.8px;"><font face="tahoma,
sans-serif"><span style="border-collapse:
collapse;">Address: Alem 896</span></font>,
Floor 6, Buenos Aires, Argentina</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
</body>
</html>