Environment-caused SyntaxError running build scripts (was Re:
[squeak-dev] error when updating Squeak4.4-12327 to trunk)
Frank Shearar
frank.shearar at gmail.com
Mon Mar 11 23:39:34 UTC 2013
This smells fishy:
LiteralNode >> printOn: aStream indent: level
Transcript showln: 'ping'.
key isVariableBinding
ifTrue:
[key key isNil
ifTrue:
[aStream nextPutAll: '###'; nextPutAll: key value soleInstance name]
ifFalse:
[aStream nextPutAll: '##'; nextPutAll: key key]]
ifFalse:
[key storeOn: aStream]
Note the '##'. I don't mean _this_ guy's fishy; I think that key has
changed somehow to be a `key isVariableBinding and: [key notNil]` kind
of thing where it used to be a `key isVariableBinding not` thing.
And _that_ would be because the latest version of Environments does
funky stuff with class resolution. Yes?
frank
On 11 March 2013 23:31, Nicolas Cellier
<nicolas.cellier.aka.nice at gmail.com> wrote:
> Also note that DecompilerTests are now failing (in updated trunk after
> update-cwp.227)
>
> Nicolas
>
> 2013/3/12 Frank Shearar <frank.shearar at gmail.com>:
>> On 11 March 2013 23:13, Bert Freudenberg <bert at freudenbergs.de> wrote:
>>>
>>> On 2013-03-12, at 00:11, Frank Shearar <frank.shearar at gmail.com> wrote:
>>>
>>>> It is Environments, and it's _after_ the image is updated: first the
>>>> CI job runs update-image.st, copies this updated artifact, and in the
>>>> copy runs prepare-test-image.st. That then fails because of a
>>>> SyntaxError being thrown, saying this:
>>>>
>>>> DoIt
>>>> Smalltalk
>>>> at: #Log
>>>> put: [:t1 |
>>>> | t2 |
>>>> t2 := #Invalid literal character ->#DateAndTime value now
>>>> printString , ': ' , t1.
>>>> FileStream stdout nextPutAll: t2;
>>>> nextPut: Character lf;
>>>> flush.
>>>> ##Transcript value cr; show: t2].
>>>>
>>>> Compare that to the original source, from prepare-test-image.st in the CI job:
>>>>
>>>> Smalltalk at: #Log put: [:msg | | str |
>>>> str := DateAndTime now printString, ': ', msg.
>>>> FileStream stdout nextPutAll: str; nextPut: Character lf; flush.
>>>> Transcript cr; show: str].
>>>>
>>>> Note the ## marks prepended to (some of) the class names. Colin? Thoughts?
>>>
>>> I've seen that too. It happens I think when code gets decompiled.
>>
>> Odd, but I think I can imagine how it happens: Foo gets turned into a
>> Symbol which is printed out as #Foo which then gets... printed out as
>> a Symbol by something that thinks it has a String, resulting in ##Foo?
>> And then something ELSE takes this broken source and tries to compile
>> it. I guess?
>>
>> OK, stepping through, I can see it gets as far as Compiler >>
>> #evaluate:cue:ifFailed:logged. There we turn the source into an AST
>> (succeeds), and then compile that (succeeds)... but that
>> CompiledMethod screws up decompilation, putting in the extra #s.
>>
>> I can't seem to step into MethodNode >> #generate:using: though to see
>> what's going on.
>>
>> frank
>>
>>> - Bert -
>>>
>>>
>>>
>>
>
More information about the Squeak-dev
mailing list
|