<div dir="ltr"><div>Hi all,</div><div>I guess that Christoph corrected code directly in the SyntaxError window that pops up. This has an effect on compiledCode, but not on sourceCode...<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 16 mars 2020 à 23:06, Levente Uzonyi <<a href="mailto:leves@caesar.elte.hu">leves@caesar.elte.hu</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Christoph,<br>
<br>
The trailer can hold many different things, but it's main goal is to <br>
make it possible to recreate the source code of a method. Normally (in <br>
case of a regular method with sources and changes files available) it <br>
holds an offset to the sources or changes file. At that offset starts the <br>
source chunk of the method.<br>
So, changing the trailer only makes sense when the source code changes, <br>
and new code is written to the changes file.<br>
<br>
#recompile:from: assumes that the source code has not been changed, so <br>
leaving the trailer intact seems reasonable to me.<br>
<br>
Should there be an error with the source code during #recompile:from:, <br>
you've got no way to fix it because of the above. The error must be <br>
detected beforehand, and the method must not be recompiled but compiled.<br>
<br>
<br>
Levente<br>
<br>
On Mon, 16 Mar 2020, Thiede, Christoph wrote:<br>
<br>
> <br>
> Hi all,<br>
> <br>
> <br>
> you remember Compiler-ct.417? I have been carrying this change around with my image for a few months, and when the migration to Sista was published recently, I got a number of SyntaxErrors from Trunk methods that do not follow the vertical bar rule we agreed on. I'll fix these errors, depending on<br>
> Compiler-ct.417, soon - however, I think there could be a problem with the current #recompile:from: logic. After fixing the Syntax errors while all selectors were being recompiled, the new source code had not been applied to the methods. I think the reason could be that we reuse the old method trailer instead of<br>
> simply starting with a fresh one.<br>
> <br>
> <br>
> But I don't know many details about CompiledMethodTrailers. Would it be a good idea to discard the old trailer when recompiling any method? Concretely, we could send #generate to methodNode rather than #generate:.<br>
> <br>
> <br>
> Best,<br>
> <br>
> Christoph<br>
> <br>
> <br>
><br>
</blockquote></div>