The Inbox: System-kfr.1036.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: System-kfr.1036.mcz

commits-2
A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-kfr.1036.mcz

==================== Summary ====================

Name: System-kfr.1036
Author: kfr
Time: 21 June 2018, 8:49:18.217801 pm
UUID: 4150334e-4f5f-744c-b5b7-814cef973cc0
Ancestors: System-kfr.1035

Remove classes from SmartRefStream instanceVariable renamed that not are in structures so we avoid false positives

=============== Diff against System-kfr.1035 ===============

Item was changed:
  ----- Method: SmartRefStream>>reshapedClassesIn: (in category 'import image segment') -----
  reshapedClassesIn: outPointers
  "Look for classes in the outPointer array that have changed shape.  Make a fake class for the old shape.  Return a dictionary mapping Fake classes to Real classes.  Substitute fake classes for real ones in outPointers."
 
  | mapFakeClassesToReal |
 
  self flag: #bobconv.
+ "make sure we don't try to convert classes not in structures to renamed classes"
+ renamed keysDo:[ :renamedClass | structures at: renamedClass ifAbsent:[ renamed removeKey: renamedClass]].
 
-
  mapFakeClassesToReal := IdentityDictionary new.
  outPointers withIndexDo: [:outp :ind | | originalName fakeCls |
  outp isBehavior ifTrue: [
  originalName := renamed keyAtValue: outp name
  ifAbsent: [renamedConv at: ind ifAbsent: [outp name]].
+ "in DiskProxy>>comeFullyUpOnReload: we saved the name at the index"
- structures at: originalName ifAbsent: [originalName := outp name]. "check for false positives in renamed"
- "in DiskProxy>>comeFullyUpOnReload: we saved the name at the index"
  fakeCls := self mapClass: outp origName: originalName.
  fakeCls == outp ifFalse: [
  mapFakeClassesToReal at: fakeCls put: outp.
  outPointers at: ind put: fakeCls]]].
  ^ mapFakeClassesToReal!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: System-kfr.1036.mcz

Hannes Hirzel
Adding the two lines

"make sure we don't try to convert classes not in structures to renamed classes"
renamed keysDo:[ :renamedClass | structures at: renamedClass
ifAbsent:[ renamed removeKey: renamedClass]].


to

SmartRefStream>>reshapedClassesIn:


makes a number of *.pr  (SqueakLand project files) load into Squeak
5.2a which previously did not load.  See screen shot. This does not
necessarily mean that they work, but they load without an error
message.

The instance variable 'renamed' of SmartRefStream contains a
dictionary of Classes who have a different name.

When loading a project an instance of the new class is made and a
conversion call is sent to that instance.

(old class name symbol -> new class name).


The instance variable 'structures' contains the structure of classes
(class version and order and names of instance variables written then
the *.pr file was saved

Example:

structures

Dictionary of (#Rectangle -> #(<classVersionInteger> 'origin' 'corner')).

Inst var names are strings.


----------------------------------------------------------------------------------
Recommendation: This fix should be moved to the trunk
----------------------------------------------------------------------------------




On Thu, 21 Jun 2018 18:49:47 0000, [hidden email]
<[hidden email]> wrote:

> A new version of System was added to project The Inbox:
> http://source.squeak.org/inbox/System-kfr.1036.mcz
>
> ==================== Summary ====================
>
> Name: System-kfr.1036
> Author: kfr
> Time: 21 June 2018, 8:49:18.217801 pm
> UUID: 4150334e-4f5f-744c-b5b7-814cef973cc0
> Ancestors: System-kfr.1035
>
> Remove classes from SmartRefStream instanceVariable renamed that not are in
> structures so we avoid false positives
>
> =============== Diff against System-kfr.1035 ===============
>
> Item was changed:
>   ----- Method: SmartRefStream>>reshapedClassesIn: (in category 'import
> image segment') -----
>   reshapedClassesIn: outPointers
>   "Look for classes in the outPointer array that have changed shape.  Make
> a fake class for the old shape.  Return a dictionary mapping Fake classes to
> Real classes.  Substitute fake classes for real ones in outPointers."
>
>   | mapFakeClassesToReal |
>
>   self flag: #bobconv.
> + "make sure we don't try to convert classes not in structures to renamed
> classes"
> + renamed keysDo:[ :renamedClass | structures at: renamedClass ifAbsent:[
> renamed removeKey: renamedClass]].
>
> -
>   mapFakeClassesToReal := IdentityDictionary new.
>   outPointers withIndexDo: [:outp :ind | | originalName fakeCls |
>   outp isBehavior ifTrue: [
>   originalName := renamed keyAtValue: outp name
>   ifAbsent: [renamedConv at: ind ifAbsent: [outp name]].
> + "in DiskProxy>>comeFullyUpOnReload: we saved the name at the index"
> - structures at: originalName ifAbsent: [originalName := outp name].
> "check for false positives in renamed"
> - "in DiskProxy>>comeFullyUpOnReload: we saved the name at the index"
>   fakeCls := self mapClass: outp origName: originalName.
>   fakeCls == outp ifFalse: [
>   mapFakeClassesToReal at: fakeCls put: outp.
>   outPointers at: ind put: fakeCls]]].
>   ^ mapFakeClassesToReal!
>
>
>



SmartRefStream_instanceVar_called_renamed_fix_2018-06-23.png (339K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: System-kfr.1036.mcz

David T. Lewis
On Sat, Jun 23, 2018 at 04:02:29PM +0200, H. Hirzel wrote:

> Adding the two lines
>
> "make sure we don't try to convert classes not in structures to renamed classes"
> renamed keysDo:[ :renamedClass | structures at: renamedClass
> ifAbsent:[ renamed removeKey: renamedClass]].
>
>
> to
>
> SmartRefStream>>reshapedClassesIn:
>
>
> makes a number of *.pr  (SqueakLand project files) load into Squeak
> 5.2a which previously did not load.  See screen shot. This does not
> necessarily mean that they work, but they load without an error
> message.

Thanks for the explanation, and the screen shot illustrates nicely :-)


>
> The instance variable 'renamed' of SmartRefStream contains a
> dictionary of Classes who have a different name.
>
> When loading a project an instance of the new class is made and a
> conversion call is sent to that instance.
>
> (old class name symbol -> new class name).
>
>
> The instance variable 'structures' contains the structure of classes
> (class version and order and names of instance variables written then
> the *.pr file was saved
>
> Example:
>
> structures
>
> Dictionary of (#Rectangle -> #(<classVersionInteger> 'origin' 'corner')).
>
> Inst var names are strings.
>
>
> ----------------------------------------------------------------------------------
> Recommendation: This fix should be moved to the trunk
> ----------------------------------------------------------------------------------
>

+1

Any objections?

This would be good to move to trunk. I don't think it causes any issues
for the upcoming release, and it is a good improvement (since after all,
you cannot debug Etoys projects if you cannot even load them in the first place.

I do have one question. Is this a workaround for a bug elsewhere in SmarRefStream?
It seems like #reshapedClassesIn: is expecting that anything in the renamed
dictionary should already be in the structures dictionary. If that is not
the case, is that because of a bug, or is it simply the case the the situation
occurs normally when dealing with a class that does not exist in the system
at all?

I tried loading EtoysProjects/Home.007.pr to check this in a debugger, and
I can see that the condition occurs when trying to load FlasherMorph, which
is not in my image. That suggests this is a "normal" condition, and the
end result after loading this project would be unresolved references to
that missing class.

Sorry for the long question, I'm just trying to understand how this works.

Either way, +1 for moving to trunk.

Dave

>
>
>
> On Thu, 21 Jun 2018 18:49:47 0000, [hidden email]
> <[hidden email]> wrote:
> > A new version of System was added to project The Inbox:
> > http://source.squeak.org/inbox/System-kfr.1036.mcz
> >
> > ==================== Summary ====================
> >
> > Name: System-kfr.1036
> > Author: kfr
> > Time: 21 June 2018, 8:49:18.217801 pm
> > UUID: 4150334e-4f5f-744c-b5b7-814cef973cc0
> > Ancestors: System-kfr.1035
> >
> > Remove classes from SmartRefStream instanceVariable renamed that not are in
> > structures so we avoid false positives
> >
> > =============== Diff against System-kfr.1035 ===============
> >
> > Item was changed:
> >   ----- Method: SmartRefStream>>reshapedClassesIn: (in category 'import
> > image segment') -----
> >   reshapedClassesIn: outPointers
> >   "Look for classes in the outPointer array that have changed shape.  Make
> > a fake class for the old shape.  Return a dictionary mapping Fake classes to
> > Real classes.  Substitute fake classes for real ones in outPointers."
> >
> >   | mapFakeClassesToReal |
> >
> >   self flag: #bobconv.
> > + "make sure we don't try to convert classes not in structures to renamed
> > classes"
> > + renamed keysDo:[ :renamedClass | structures at: renamedClass ifAbsent:[
> > renamed removeKey: renamedClass]].
> >
> > -
> >   mapFakeClassesToReal := IdentityDictionary new.
> >   outPointers withIndexDo: [:outp :ind | | originalName fakeCls |
> >   outp isBehavior ifTrue: [
> >   originalName := renamed keyAtValue: outp name
> >   ifAbsent: [renamedConv at: ind ifAbsent: [outp name]].
> > + "in DiskProxy>>comeFullyUpOnReload: we saved the name at the index"
> > - structures at: originalName ifAbsent: [originalName := outp name].
> > "check for false positives in renamed"
> > - "in DiskProxy>>comeFullyUpOnReload: we saved the name at the index"
> >   fakeCls := self mapClass: outp origName: originalName.
> >   fakeCls == outp ifFalse: [
> >   mapFakeClassesToReal at: fakeCls put: outp.
> >   outPointers at: ind put: fakeCls]]].
> >   ^ mapFakeClassesToReal!
> >
> >
> >


>


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: System-kfr.1036.mcz

Hannes Hirzel
I did a re-test with loading

https://freudenbergs.de/bert/squeakjs/Etoys/Home.007.pr

No problem with loading and FlasherMorph.
http://wiki.squeak.org/squeak/1169

The car moves around.

A unrelated problem as it seems with a script though.

--Hannes

On 6/23/18, David T. Lewis <[hidden email]> wrote:

> On Sat, Jun 23, 2018 at 04:02:29PM +0200, H. Hirzel wrote:
>> Adding the two lines
>>
>> "make sure we don't try to convert classes not in structures to renamed
>> classes"
>> renamed keysDo:[ :renamedClass | structures at: renamedClass
>> ifAbsent:[ renamed removeKey: renamedClass]].
>>
>>
>> to
>>
>> SmartRefStream>>reshapedClassesIn:
>>
>>
>> makes a number of *.pr  (SqueakLand project files) load into Squeak
>> 5.2a which previously did not load.  See screen shot. This does not
>> necessarily mean that they work, but they load without an error
>> message.
>
> Thanks for the explanation, and the screen shot illustrates nicely :-)
>
>
>>
>> The instance variable 'renamed' of SmartRefStream contains a
>> dictionary of Classes who have a different name.
>>
>> When loading a project an instance of the new class is made and a
>> conversion call is sent to that instance.
>>
>> (old class name symbol -> new class name).
>>
>>
>> The instance variable 'structures' contains the structure of classes
>> (class version and order and names of instance variables written then
>> the *.pr file was saved
>>
>> Example:
>>
>> structures
>>
>> Dictionary of (#Rectangle -> #(<classVersionInteger> 'origin' 'corner')).
>>
>> Inst var names are strings.
>>
>>
>> ----------------------------------------------------------------------------------
>> Recommendation: This fix should be moved to the trunk
>> ----------------------------------------------------------------------------------
>>
>
> +1
>
> Any objections?
>
> This would be good to move to trunk. I don't think it causes any issues
> for the upcoming release, and it is a good improvement (since after all,
> you cannot debug Etoys projects if you cannot even load them in the first
> place.
>
> I do have one question. Is this a workaround for a bug elsewhere in
> SmarRefStream?
> It seems like #reshapedClassesIn: is expecting that anything in the renamed
> dictionary should already be in the structures dictionary. If that is not
> the case, is that because of a bug, or is it simply the case the the
> situation
> occurs normally when dealing with a class that does not exist in the system
> at all?
>
> I tried loading EtoysProjects/Home.007.pr to check this in a debugger, and
> I can see that the condition occurs when trying to load FlasherMorph, which
> is not in my image. That suggests this is a "normal" condition, and the
> end result after loading this project would be unresolved references to
> that missing class.
>
> Sorry for the long question, I'm just trying to understand how this works.
>
> Either way, +1 for moving to trunk.
>
> Dave
>
>>
>>
>>
>> On Thu, 21 Jun 2018 18:49:47 0000, [hidden email]
>> <[hidden email]> wrote:
>> > A new version of System was added to project The Inbox:
>> > http://source.squeak.org/inbox/System-kfr.1036.mcz
>> >
>> > ==================== Summary ====================
>> >
>> > Name: System-kfr.1036
>> > Author: kfr
>> > Time: 21 June 2018, 8:49:18.217801 pm
>> > UUID: 4150334e-4f5f-744c-b5b7-814cef973cc0
>> > Ancestors: System-kfr.1035
>> >
>> > Remove classes from SmartRefStream instanceVariable renamed that not are
>> > in
>> > structures so we avoid false positives
>> >
>> > =============== Diff against System-kfr.1035 ===============
>> >
>> > Item was changed:
>> >   ----- Method: SmartRefStream>>reshapedClassesIn: (in category 'import
>> > image segment') -----
>> >   reshapedClassesIn: outPointers
>> >   "Look for classes in the outPointer array that have changed shape.
>> > Make
>> > a fake class for the old shape.  Return a dictionary mapping Fake
>> > classes to
>> > Real classes.  Substitute fake classes for real ones in outPointers."
>> >
>> >   | mapFakeClassesToReal |
>> >
>> >   self flag: #bobconv.
>> > + "make sure we don't try to convert classes not in structures to
>> > renamed
>> > classes"
>> > + renamed keysDo:[ :renamedClass | structures at: renamedClass
>> > ifAbsent:[
>> > renamed removeKey: renamedClass]].
>> >
>> > -
>> >   mapFakeClassesToReal := IdentityDictionary new.
>> >   outPointers withIndexDo: [:outp :ind | | originalName fakeCls |
>> >   outp isBehavior ifTrue: [
>> >   originalName := renamed keyAtValue: outp name
>> >   ifAbsent: [renamedConv at: ind ifAbsent: [outp name]].
>> > + "in DiskProxy>>comeFullyUpOnReload: we saved the name at the index"
>> > - structures at: originalName ifAbsent: [originalName := outp name].
>> > "check for false positives in renamed"
>> > - "in DiskProxy>>comeFullyUpOnReload: we saved the name at the
>> > index"
>> >   fakeCls := self mapClass: outp origName: originalName.
>> >   fakeCls == outp ifFalse: [
>> >   mapFakeClassesToReal at: fakeCls put: outp.
>> >   outPointers at: ind put: fakeCls]]].
>> >   ^ mapFakeClassesToReal!
>> >
>> >
>> >
>
>
>>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: System-kfr.1036.mcz

Karl Ramberg
FlasherMorph to Flasher is a known rename. But if you use Flasher in a new project in trunk 5.2 it would create a false positive rename on loading.
This is a hopefully a fix for that issue.

Best,
Karl
On Sat, 23 Jun 2018 at 19:58, H. Hirzel <[hidden email]> wrote:
I did a re-test with loading

https://freudenbergs.de/bert/squeakjs/Etoys/Home.007.pr

No problem with loading and FlasherMorph.
http://wiki.squeak.org/squeak/1169

The car moves around.

A unrelated problem as it seems with a script though.

--Hannes

On 6/23/18, David T. Lewis <[hidden email]> wrote:
> On Sat, Jun 23, 2018 at 04:02:29PM +0200, H. Hirzel wrote:
>> Adding the two lines
>>
>> "make sure we don't try to convert classes not in structures to renamed
>> classes"
>> renamed keysDo:[ :renamedClass | structures at: renamedClass
>> ifAbsent:[ renamed removeKey: renamedClass]].
>>
>>
>> to
>>
>> SmartRefStream>>reshapedClassesIn:
>>
>>
>> makes a number of *.pr  (SqueakLand project files) load into Squeak
>> 5.2a which previously did not load.  See screen shot. This does not
>> necessarily mean that they work, but they load without an error
>> message.
>
> Thanks for the explanation, and the screen shot illustrates nicely :-)
>
>
>>
>> The instance variable 'renamed' of SmartRefStream contains a
>> dictionary of Classes who have a different name.
>>
>> When loading a project an instance of the new class is made and a
>> conversion call is sent to that instance.
>>
>> (old class name symbol -> new class name).
>>
>>
>> The instance variable 'structures' contains the structure of classes
>> (class version and order and names of instance variables written then
>> the *.pr file was saved
>>
>> Example:
>>
>> structures   
>>
>> Dictionary of (#Rectangle -> #(<classVersionInteger> 'origin' 'corner')).
>>
>> Inst var names are strings.
>>
>>
>> ----------------------------------------------------------------------------------
>> Recommendation: This fix should be moved to the trunk
>> ----------------------------------------------------------------------------------
>>
>
> +1
>
> Any objections?
>
> This would be good to move to trunk. I don't think it causes any issues
> for the upcoming release, and it is a good improvement (since after all,
> you cannot debug Etoys projects if you cannot even load them in the first
> place.
>
> I do have one question. Is this a workaround for a bug elsewhere in
> SmarRefStream?
> It seems like #reshapedClassesIn: is expecting that anything in the renamed
> dictionary should already be in the structures dictionary. If that is not
> the case, is that because of a bug, or is it simply the case the the
> situation
> occurs normally when dealing with a class that does not exist in the system
> at all?
>
> I tried loading EtoysProjects/Home.007.pr to check this in a debugger, and
> I can see that the condition occurs when trying to load FlasherMorph, which
> is not in my image. That suggests this is a "normal" condition, and the
> end result after loading this project would be unresolved references to
> that missing class.
>
> Sorry for the long question, I'm just trying to understand how this works.
>
> Either way, +1 for moving to trunk.
>
> Dave
>
>>
>>
>>
>> On Thu, 21 Jun 2018 18:49:47 0000, [hidden email]
>> <[hidden email]> wrote:
>> > A new version of System was added to project The Inbox:
>> > http://source.squeak.org/inbox/System-kfr.1036.mcz
>> >
>> > ==================== Summary ====================
>> >
>> > Name: System-kfr.1036
>> > Author: kfr
>> > Time: 21 June 2018, 8:49:18.217801 pm
>> > UUID: 4150334e-4f5f-744c-b5b7-814cef973cc0
>> > Ancestors: System-kfr.1035
>> >
>> > Remove classes from SmartRefStream instanceVariable renamed that not are
>> > in
>> > structures so we avoid false positives
>> >
>> > =============== Diff against System-kfr.1035 ===============
>> >
>> > Item was changed:
>> >   ----- Method: SmartRefStream>>reshapedClassesIn: (in category 'import
>> > image segment') -----
>> >   reshapedClassesIn: outPointers
>> >    "Look for classes in the outPointer array that have changed shape.
>> > Make
>> > a fake class for the old shape.  Return a dictionary mapping Fake
>> > classes to
>> > Real classes.  Substitute fake classes for real ones in outPointers."
>> >
>> >    | mapFakeClassesToReal |
>> >
>> >    self flag: #bobconv.   
>> > +  "make sure we don't try to convert classes not in structures to
>> > renamed
>> > classes"
>> > +  renamed keysDo:[ :renamedClass | structures at: renamedClass
>> > ifAbsent:[
>> > renamed removeKey: renamedClass]].
>> >
>> > -
>> >    mapFakeClassesToReal := IdentityDictionary new.
>> >    outPointers withIndexDo: [:outp :ind | | originalName fakeCls |
>> >            outp isBehavior ifTrue: [
>> >                    originalName := renamed keyAtValue: outp name
>> >                            ifAbsent: [renamedConv at: ind ifAbsent: [outp name]].
>> > +                  "in DiskProxy>>comeFullyUpOnReload: we saved the name at the index"
>> > -                  structures at: originalName ifAbsent: [originalName := outp name].
>> > "check for false positives in renamed"
>> > -                          "in DiskProxy>>comeFullyUpOnReload: we saved the name at the
>> > index"
>> >                    fakeCls := self mapClass: outp origName: originalName.
>> >                    fakeCls == outp ifFalse: [
>> >                            mapFakeClassesToReal at: fakeCls put: outp.
>> >                            outPointers at: ind put: fakeCls]]].
>> >    ^ mapFakeClassesToReal!
>> >
>> >
>> >
>
>
>>
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: System-kfr.1036.mcz

Hannes Hirzel
Retest of loading this version

http://etoys.laptop.org/src/Content/ExampleEtoys/CarAndPen.014.pr

still works after applying System-kfr.1036.mcz

On 6/23/18, karl ramberg <[hidden email]> wrote:

> FlasherMorph to Flasher is a known rename. But if you use Flasher in a new
> project in trunk 5.2 it would create a false positive rename on loading.
> This is a hopefully a fix for that issue.
>
> Best,
> Karl
> On Sat, 23 Jun 2018 at 19:58, H. Hirzel <[hidden email]> wrote:
>
>> I did a re-test with loading
>>
>> https://freudenbergs.de/bert/squeakjs/Etoys/Home.007.pr
>>
>> No problem with loading and FlasherMorph.
>> http://wiki.squeak.org/squeak/1169
>>
>> The car moves around.
>>
>> A unrelated problem as it seems with a script though.
>>
>> --Hannes
>>
>> On 6/23/18, David T. Lewis <[hidden email]> wrote:
>> > On Sat, Jun 23, 2018 at 04:02:29PM +0200, H. Hirzel wrote:
>> >> Adding the two lines
>> >>
>> >> "make sure we don't try to convert classes not in structures to
>> >> renamed
>> >> classes"
>> >> renamed keysDo:[ :renamedClass | structures at: renamedClass
>> >> ifAbsent:[ renamed removeKey: renamedClass]].
>> >>
>> >>
>> >> to
>> >>
>> >> SmartRefStream>>reshapedClassesIn:
>> >>
>> >>
>> >> makes a number of *.pr  (SqueakLand project files) load into Squeak
>> >> 5.2a which previously did not load.  See screen shot. This does not
>> >> necessarily mean that they work, but they load without an error
>> >> message.
>> >
>> > Thanks for the explanation, and the screen shot illustrates nicely :-)
>> >
>> >
>> >>
>> >> The instance variable 'renamed' of SmartRefStream contains a
>> >> dictionary of Classes who have a different name.
>> >>
>> >> When loading a project an instance of the new class is made and a
>> >> conversion call is sent to that instance.
>> >>
>> >> (old class name symbol -> new class name).
>> >>
>> >>
>> >> The instance variable 'structures' contains the structure of classes
>> >> (class version and order and names of instance variables written then
>> >> the *.pr file was saved
>> >>
>> >> Example:
>> >>
>> >> structures
>> >>
>> >> Dictionary of (#Rectangle -> #(<classVersionInteger> 'origin'
>> 'corner')).
>> >>
>> >> Inst var names are strings.
>> >>
>> >>
>> >>
>> ----------------------------------------------------------------------------------
>> >> Recommendation: This fix should be moved to the trunk
>> >>
>> ----------------------------------------------------------------------------------
>> >>
>> >
>> > +1
>> >
>> > Any objections?
>> >
>> > This would be good to move to trunk. I don't think it causes any issues
>> > for the upcoming release, and it is a good improvement (since after
>> > all,
>> > you cannot debug Etoys projects if you cannot even load them in the
>> > first
>> > place.
>> >
>> > I do have one question. Is this a workaround for a bug elsewhere in
>> > SmarRefStream?
>> > It seems like #reshapedClassesIn: is expecting that anything in the
>> renamed
>> > dictionary should already be in the structures dictionary. If that is
>> > not
>> > the case, is that because of a bug, or is it simply the case the the
>> > situation
>> > occurs normally when dealing with a class that does not exist in the
>> system
>> > at all?
>> >
>> > I tried loading EtoysProjects/Home.007.pr to check this in a debugger,
>> and
>> > I can see that the condition occurs when trying to load FlasherMorph,
>> which
>> > is not in my image. That suggests this is a "normal" condition, and the
>> > end result after loading this project would be unresolved references to
>> > that missing class.
>> >
>> > Sorry for the long question, I'm just trying to understand how this
>> works.
>> >
>> > Either way, +1 for moving to trunk.
>> >
>> > Dave
>> >
>> >>
>> >>
>> >>
>> >> On Thu, 21 Jun 2018 18:49:47 0000, [hidden email]
>> >> <[hidden email]> wrote:
>> >> > A new version of System was added to project The Inbox:
>> >> > http://source.squeak.org/inbox/System-kfr.1036.mcz
>> >> >
>> >> > ==================== Summary ====================
>> >> >
>> >> > Name: System-kfr.1036
>> >> > Author: kfr
>> >> > Time: 21 June 2018, 8:49:18.217801 pm
>> >> > UUID: 4150334e-4f5f-744c-b5b7-814cef973cc0
>> >> > Ancestors: System-kfr.1035
>> >> >
>> >> > Remove classes from SmartRefStream instanceVariable renamed that not
>> are
>> >> > in
>> >> > structures so we avoid false positives
>> >> >
>> >> > =============== Diff against System-kfr.1035 ===============
>> >> >
>> >> > Item was changed:
>> >> >   ----- Method: SmartRefStream>>reshapedClassesIn: (in category
>> 'import
>> >> > image segment') -----
>> >> >   reshapedClassesIn: outPointers
>> >> >    "Look for classes in the outPointer array that have changed
>> >> > shape.
>> >> > Make
>> >> > a fake class for the old shape.  Return a dictionary mapping Fake
>> >> > classes to
>> >> > Real classes.  Substitute fake classes for real ones in
>> >> > outPointers."
>> >> >
>> >> >    | mapFakeClassesToReal |
>> >> >
>> >> >    self flag: #bobconv.
>> >> > +  "make sure we don't try to convert classes not in structures to
>> >> > renamed
>> >> > classes"
>> >> > +  renamed keysDo:[ :renamedClass | structures at: renamedClass
>> >> > ifAbsent:[
>> >> > renamed removeKey: renamedClass]].
>> >> >
>> >> > -
>> >> >    mapFakeClassesToReal := IdentityDictionary new.
>> >> >    outPointers withIndexDo: [:outp :ind | | originalName fakeCls |
>> >> >            outp isBehavior ifTrue: [
>> >> >                    originalName := renamed keyAtValue: outp name
>> >> >                            ifAbsent: [renamedConv at: ind ifAbsent:
>> [outp name]].
>> >> > +                  "in DiskProxy>>comeFullyUpOnReload: we saved the
>> name at the index"
>> >> > -                  structures at: originalName ifAbsent:
>> [originalName := outp name].
>> >> > "check for false positives in renamed"
>> >> > -                          "in DiskProxy>>comeFullyUpOnReload: we
>> saved the name at the
>> >> > index"
>> >> >                    fakeCls := self mapClass: outp origName:
>> originalName.
>> >> >                    fakeCls == outp ifFalse: [
>> >> >                            mapFakeClassesToReal at: fakeCls put:
>> >> > outp.
>> >> >                            outPointers at: ind put: fakeCls]]].
>> >> >    ^ mapFakeClassesToReal!
>> >> >
>> >> >
>> >> >
>> >
>> >
>> >>
>> >
>> >
>> >
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: System-kfr.1036.mcz

David T. Lewis
I moved System-kfr.1036 to trunk. I'm sure if someone thinks it's a bad
idea, they will speak up soon :-)

Dave

On Sat, Jun 23, 2018 at 09:15:50PM +0200, H. Hirzel wrote:

> Retest of loading this version
>
> http://etoys.laptop.org/src/Content/ExampleEtoys/CarAndPen.014.pr
>
> still works after applying System-kfr.1036.mcz
>
> On 6/23/18, karl ramberg <[hidden email]> wrote:
> > FlasherMorph to Flasher is a known rename. But if you use Flasher in a new
> > project in trunk 5.2 it would create a false positive rename on loading.
> > This is a hopefully a fix for that issue.
> >
> > Best,
> > Karl
> > On Sat, 23 Jun 2018 at 19:58, H. Hirzel <[hidden email]> wrote:
> >
> >> I did a re-test with loading
> >>
> >> https://freudenbergs.de/bert/squeakjs/Etoys/Home.007.pr
> >>
> >> No problem with loading and FlasherMorph.
> >> http://wiki.squeak.org/squeak/1169
> >>
> >> The car moves around.
> >>
> >> A unrelated problem as it seems with a script though.
> >>
> >> --Hannes
> >>
> >> On 6/23/18, David T. Lewis <[hidden email]> wrote:
> >> > On Sat, Jun 23, 2018 at 04:02:29PM +0200, H. Hirzel wrote:
> >> >> Adding the two lines
> >> >>
> >> >> "make sure we don't try to convert classes not in structures to
> >> >> renamed
> >> >> classes"
> >> >> renamed keysDo:[ :renamedClass | structures at: renamedClass
> >> >> ifAbsent:[ renamed removeKey: renamedClass]].
> >> >>
> >> >>
> >> >> to
> >> >>
> >> >> SmartRefStream>>reshapedClassesIn:
> >> >>
> >> >>
> >> >> makes a number of *.pr  (SqueakLand project files) load into Squeak
> >> >> 5.2a which previously did not load.  See screen shot. This does not
> >> >> necessarily mean that they work, but they load without an error
> >> >> message.
> >> >
> >> > Thanks for the explanation, and the screen shot illustrates nicely :-)
> >> >
> >> >
> >> >>
> >> >> The instance variable 'renamed' of SmartRefStream contains a
> >> >> dictionary of Classes who have a different name.
> >> >>
> >> >> When loading a project an instance of the new class is made and a
> >> >> conversion call is sent to that instance.
> >> >>
> >> >> (old class name symbol -> new class name).
> >> >>
> >> >>
> >> >> The instance variable 'structures' contains the structure of classes
> >> >> (class version and order and names of instance variables written then
> >> >> the *.pr file was saved
> >> >>
> >> >> Example:
> >> >>
> >> >> structures
> >> >>
> >> >> Dictionary of (#Rectangle -> #(<classVersionInteger> 'origin'
> >> 'corner')).
> >> >>
> >> >> Inst var names are strings.
> >> >>
> >> >>
> >> >>
> >> ----------------------------------------------------------------------------------
> >> >> Recommendation: This fix should be moved to the trunk
> >> >>
> >> ----------------------------------------------------------------------------------
> >> >>
> >> >
> >> > +1
> >> >
> >> > Any objections?
> >> >
> >> > This would be good to move to trunk. I don't think it causes any issues
> >> > for the upcoming release, and it is a good improvement (since after
> >> > all,
> >> > you cannot debug Etoys projects if you cannot even load them in the
> >> > first
> >> > place.
> >> >
> >> > I do have one question. Is this a workaround for a bug elsewhere in
> >> > SmarRefStream?
> >> > It seems like #reshapedClassesIn: is expecting that anything in the
> >> renamed
> >> > dictionary should already be in the structures dictionary. If that is
> >> > not
> >> > the case, is that because of a bug, or is it simply the case the the
> >> > situation
> >> > occurs normally when dealing with a class that does not exist in the
> >> system
> >> > at all?
> >> >
> >> > I tried loading EtoysProjects/Home.007.pr to check this in a debugger,
> >> and
> >> > I can see that the condition occurs when trying to load FlasherMorph,
> >> which
> >> > is not in my image. That suggests this is a "normal" condition, and the
> >> > end result after loading this project would be unresolved references to
> >> > that missing class.
> >> >
> >> > Sorry for the long question, I'm just trying to understand how this
> >> works.
> >> >
> >> > Either way, +1 for moving to trunk.
> >> >
> >> > Dave
> >> >
> >> >>
> >> >>
> >> >>
> >> >> On Thu, 21 Jun 2018 18:49:47 0000, [hidden email]
> >> >> <[hidden email]> wrote:
> >> >> > A new version of System was added to project The Inbox:
> >> >> > http://source.squeak.org/inbox/System-kfr.1036.mcz
> >> >> >
> >> >> > ==================== Summary ====================
> >> >> >
> >> >> > Name: System-kfr.1036
> >> >> > Author: kfr
> >> >> > Time: 21 June 2018, 8:49:18.217801 pm
> >> >> > UUID: 4150334e-4f5f-744c-b5b7-814cef973cc0
> >> >> > Ancestors: System-kfr.1035
> >> >> >
> >> >> > Remove classes from SmartRefStream instanceVariable renamed that not
> >> are
> >> >> > in
> >> >> > structures so we avoid false positives
> >> >> >
> >> >> > =============== Diff against System-kfr.1035 ===============
> >> >> >
> >> >> > Item was changed:
> >> >> >   ----- Method: SmartRefStream>>reshapedClassesIn: (in category
> >> 'import
> >> >> > image segment') -----
> >> >> >   reshapedClassesIn: outPointers
> >> >> >    "Look for classes in the outPointer array that have changed
> >> >> > shape.
> >> >> > Make
> >> >> > a fake class for the old shape.  Return a dictionary mapping Fake
> >> >> > classes to
> >> >> > Real classes.  Substitute fake classes for real ones in
> >> >> > outPointers."
> >> >> >
> >> >> >    | mapFakeClassesToReal |
> >> >> >
> >> >> >    self flag: #bobconv.
> >> >> > +  "make sure we don't try to convert classes not in structures to
> >> >> > renamed
> >> >> > classes"
> >> >> > +  renamed keysDo:[ :renamedClass | structures at: renamedClass
> >> >> > ifAbsent:[
> >> >> > renamed removeKey: renamedClass]].
> >> >> >
> >> >> > -
> >> >> >    mapFakeClassesToReal := IdentityDictionary new.
> >> >> >    outPointers withIndexDo: [:outp :ind | | originalName fakeCls |
> >> >> >            outp isBehavior ifTrue: [
> >> >> >                    originalName := renamed keyAtValue: outp name
> >> >> >                            ifAbsent: [renamedConv at: ind ifAbsent:
> >> [outp name]].
> >> >> > +                  "in DiskProxy>>comeFullyUpOnReload: we saved the
> >> name at the index"
> >> >> > -                  structures at: originalName ifAbsent:
> >> [originalName := outp name].
> >> >> > "check for false positives in renamed"
> >> >> > -                          "in DiskProxy>>comeFullyUpOnReload: we
> >> saved the name at the
> >> >> > index"
> >> >> >                    fakeCls := self mapClass: outp origName:
> >> originalName.
> >> >> >                    fakeCls == outp ifFalse: [
> >> >> >                            mapFakeClassesToReal at: fakeCls put:
> >> >> > outp.
> >> >> >                            outPointers at: ind put: fakeCls]]].
> >> >> >    ^ mapFakeClassesToReal!
> >> >> >
> >> >> >
> >> >> >
> >> >
> >> >
> >> >>
> >> >
> >> >
> >> >
> >>
> >>
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: System-kfr.1036.mcz

Edgar De Cleene
In reply to this post by Hannes Hirzel
+1 and is another step forward.
Thanks Hannes


On 23/06/2018, 11:02, "H. Hirzel" <[hidden email]> wrote:

> Adding the two lines
>
> "make sure we don't try to convert classes not in structures to renamed
> classes"
> renamed keysDo:[ :renamedClass | structures at: renamedClass
> ifAbsent:[ renamed removeKey: renamedClass]].
>
>
> to
>
> SmartRefStream>>reshapedClassesIn:
>
>
> makes a number of *.pr  (SqueakLand project files) load into Squeak
> 5.2a which previously did not load.  See screen shot. This does not
> necessarily mean that they work, but they load without an error
> message.
>
> The instance variable 'renamed' of SmartRefStream contains a
> dictionary of Classes who have a different name.
>
> When loading a project an instance of the new class is made and a
> conversion call is sent to that instance.
>
> (old class name symbol -> new class name).
>
>
> The instance variable 'structures' contains the structure of classes
> (class version and order and names of instance variables written then
> the *.pr file was saved
>
> Example:
>
> structures  
>
> Dictionary of (#Rectangle -> #(<classVersionInteger> 'origin' 'corner')).
>
> Inst var names are strings.
>
>
> ------------------------------------------------------------------------------
> ----
> Recommendation: This fix should be moved to the trunk
> ------------------------------------------------------------------------------
> ----