[squeak-dev] #recompile:from: does not apply syntax error fixes

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Mon Mar 16 22:38:16 UTC 2020


Hi all,
I guess that Christoph corrected code directly in the SyntaxError window
that pops up. This has an effect on compiledCode, but not on sourceCode...

Le lun. 16 mars 2020 à 23:06, Levente Uzonyi <leves at caesar.elte.hu> a
écrit :

> Hi Christoph,
>
> The trailer can hold many different things, but it's main goal is to
> make it possible to recreate the source code of a method. Normally (in
> case of a regular method with sources and changes files available) it
> holds an offset to the sources or changes file. At that offset starts the
> source chunk of the method.
> So, changing the trailer only makes sense when the source code changes,
> and new code is written to the changes file.
>
> #recompile:from: assumes that the source code has not been changed, so
> leaving the trailer intact seems reasonable to me.
>
> Should there be an error with the source code during #recompile:from:,
> you've got no way to fix it because of the above. The error must be
> detected beforehand, and the method must not be recompiled but compiled.
>
>
> Levente
>
> On Mon, 16 Mar 2020, Thiede, Christoph wrote:
>
> >
> > Hi all,
> >
> >
> > 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
> > 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
> > simply starting with a fresh one.
> >
> >
> > 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:.
> >
> >
> > Best,
> >
> > Christoph
> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200316/657c3b8e/attachment.html>


More information about the Squeak-dev mailing list