Environment-caused SyntaxError running build scripts (was Re: [squeak-dev] error when updating Squeak4.4-12327 to trunk)

Colin Putney colin at wiresong.com
Tue Mar 12 00:43:39 UTC 2013


On Mon, Mar 11, 2013 at 4:39 PM, Frank Shearar <frank.shearar at gmail.com>wrote:


> And _that_ would be because the latest version of Environments does
> funky stuff with class resolution. Yes?
>

Yes. There are actually two bugs here:

The first is that Environment>>at:put: doesn't pull existing bindings out
of Undeclared. Here's what happens: the Doit in prepare-test-image.st looks
basically like this:

Smalltalk at: #Log put: [:arg].
Log value: 'test'.


When this code is compiled, the reference to Log on line 2 is undeclared.
Then execution starts, and line 1 does an assignment to Log though sneaky
reflection, rather than assignment. SystemDictionary overrides #at:put: to
make sure this works, but Environments doesn't, so the binding on line 2
isn't affected. Then we execute line 2, and send #value: to nil, which
raises a MNU.

We get a debugger, click on the DoIt frame to see what happened, and boom,
a syntax error. The DoIt doesn't have a source pointer, because the code is
in a .st file, so we need to decompile it. The new binding classes in
Environments don't support decompilation well, so it produces invalid
source. I'm not sure why we're reparsing decompiled code, but clearly it's
not working.

I should be able to just commit fixes to the trunk, since this doesn't
break updating, just building the test image.

Colin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130311/6c5aa4a4/attachment.htm


More information about the Squeak-dev mailing list