[squeak-dev] Obsoletes...

karl ramberg karlramberg at gmail.com
Mon Dec 30 19:23:31 UTC 2013


On Sun, Dec 29, 2013 at 5:28 PM, Tobias Pape <Das.Linux at gmx.de> wrote:

> Hi
>
> [Below, a "fix" to remove those obsoletes…]
>
> On 29.12.2013, at 14:15, Frank Shearar <frank.shearar at gmail.com> wrote:
>
> > On 29 December 2013 12:12, Tobias Pape <Das.Linux at gmx.de> wrote:
> >> Hi all,
> >>
> >> I just took the todays Trunk image (Squeak4.5-13148#712)
> (NameVersion-Update#CIJob)
> >
> > Ah, that's nice & specific! Thanks!
> (I wrote this mail prior to the other and hoped the order
> would stick)
>
> > (Nit: we might as well not bother
> > with update numbers, because our versioning is broken (*). The
> > SqueakTrunk builds' TrunkImage artifacts will have an "update number"
> > hundreds lower than a "full fat" image.
> >
> > (*) It's broken because an update number doesn't map in any meaningful
> > way to what's in the image. "Update number" just means "the sum of all
> > MC numbers of all packages in the latest update map that this image
> > currently contains." If your Collections package is one ahead of trunk
> > (because you have a local hack) while your Kernel package is one
> > behind, you have _the same update number_.
>
> Which is true.
> However, for the typically downloaded half-fat TrunkImage from FTP or
> jenkins,
> it is meaningful :)
> I think it is comparable to the local revision number in hg: Not meaningful
> around the globe but one can work with it in several scenarios.
>
>
> >
> >> and ran
> >>        SystemNavigation default obsoleteBehaviors
> >> and got
> >>        {AnObsoleteBlueSmallLandColorTheme .
> AnObsoleteSmallLandColorTheme . AnObsoleteSmallLandColorTheme class .
> AnObsoleteBlueSmallLandColorTheme class . AnObsoleteToolBuilderTests class
> . AnObsoleteToolBuilderTests . AnObsoleteBindingTest class .
> AnObsoleteBindingTest}
> >>
> >> We should fix that.
> >> It breaks at least
> >>        Smalltalk unloadReloadablePackages
> >
> > It also manifests as failing tests:
> > *
> http://build.squeak.org/job/SqueakTrunk/712/testReport/junit/Tests.Release/ReleaseTest/testNoObsoleteClasses/
> > *
> http://build.squeak.org/job/SqueakTrunk/712/testReport/junit/Tests.Release/ReleaseTest/testUndeclared/
>
> Well..
>
> >
> >> What is the best way?
> >> A postscript in a System Package change?
> >
> > I've been hoping someone would tell me! But Chris told us that the
> > SqueakTrunk base image's state is a little broken, and that he doesn't
> > see these tests failing. That would be well worth verifying. If so,
> > the solution is to hand-roll another base image for SqueakTrunk. I
> > have a candidate image that I've not quite finished preparing.
> >
> > As an aside, I think the reason the SqueakTrunk base image broke, at
> > least in part, was caused by Nicolas and I adding new _necessary_
> > packages to trunk. For instance, when I factored out
> > ToolBuilder-Tests, the base image was told not to update packages it
> > didn't have, so as not to reload unloaded packages (ST80, Universes,
> > ...)... but that also meant it didn't get UpdateStream and
> > ToolBuilder-Tests.
>
>
> Ok. Sounds reasonable.
> Apart from that, I try to get the image in a state I can do
> >> unloadReloadablePackages
> [1]
>
> In that process I crashed the current cog vm several times[2]
> as well as other vms with out-of-memory issues.
> (You can try it:
>         SystemNavigation default obsoleteBehaviors chasePointers
> )
> Sadly,
>         SystemNavigation default obsoleteBehaviors explorePointers
> yields no meaningful output :(
>
> It seems PointersExplorer works on single objects, not a array of objects.
So if you look at each item in the list of obsoletes you get valid results:

SystemNavigation default obsoleteBehaviors first explorePointers

Cheers,
Karl

>
> Ok. Different approach. The color theme stuff.
> By clicking around I found, ColorTheme's CurrentTheme held unto
> AnObsoleteBlueSmallLandColorTheme. Hence:
>
>         SystemNavigation default obsoleteBehaviors size. "8"
>         ColorTheme current: nil.
>         ColorTheme current.
>         Behavior flushObsoleteSubclasses.
>         Smalltalk garbageCollect; garbageCollect.
>         SystemNavigation default obsoleteBehaviors size. " 4"
>
> So, 4 less, but the Menus look different now.
>
> Here, my approach on finding the remaining culprits.
>         [| haystack |
>         "my pointer finder"
>         haystack :=  [:needle | SystemNavigation default allObjectsSelect:
> [:obj | obj pointsTo: needle]].
>
>         "First, onto the binding test."
>         (haystack value: SystemNavigation default obsoleteBehaviors last "
> AnObsoleteBindingTest"
>         ) in: [:stuff |
>           "only 2nd and 3d seem interesting"
>           (((stuff first: 3) last: 2) collect: [:needle2 | haystack value:
> needle2]) in: [:stuff2 |
>             "first of 1st is interesting"
>             (haystack value: stuff2 first first) in: [:stuff3 |
>               "first is interesting"
>               (haystack value: stuff3 first) "there's an export..." in:
> [:stuff4 |
>                 (haystack value: stuff4 first)
>                 "Smalltalk Enviornment, ie Environment default !!"
>         ]]]].
>
>         "Ok, see if the culprit is there"
>         [ |assocs |
>         assocs := (Environment default exports instVarNamed: 'namespace')
> associationsSelect: [:assoc |
>           assoc value isBehavior
>             ifTrue: [assoc value isObsolete]
>             ifFalse: [false]]. "an
> IdentityDictionary(#BindingTest->AnObsoleteBindingTest )"
>
>         assocs do: [:a | Environment default exports forgetName: a key]
>         ] value.
>
>         Behavior flushObsoleteSubclasses.
>         Smalltalk garbageCollect; garbageCollect.
>         SystemNavigation default obsoleteBehaviors size. " 2"
>
>         "Ok, 2 to go"
>         "Onto the toolbuildertest"
>         (haystack value: SystemNavigation default obsoleteBehaviors first
> "AnObsoleteToolBuilderTests")
>         in: [:stuff5 |
>                 stuff5 second " SUnitToolBuilderTests class" in:
> [:suspicious |
>                         suspicious superclass " AnObsoleteToolBuilderTests
> class"
>                         "Gotcha!"] ].
>         "I don't know... redo?"
>
>         "Redo.. we add artificial instvar here to assure new class."
>         ToolBuilderTests subclass: #SUnitToolBuilderTests
>                 instanceVariableNames: 'foo'
>                 classVariableNames: ''
>                 poolDictionaries: ''
>                 category: 'SUnitGUI-ToolBuilder'.
>         ToolBuilderTests subclass: #SUnitToolBuilderTests
>                 instanceVariableNames: ''
>                 classVariableNames: ''
>                 poolDictionaries: ''
>                 category: 'SUnitGUI-ToolBuilder'.
>
>         Behavior flushObsoleteSubclasses.
>         Smalltalk garbageCollect; garbageCollect.
>         SystemNavigation default obsoleteBehaviors size. " 0"
> Yay!
>
> I attached a better Script to handle this and on the way created the
> name uncle class :P
>
> Shall I make a System revision with post script?
>
> Best
>         -Tobias
>
>
>
> [1] Nit: unloadAllKnownPackages is gone forever, right?
> [2] See vm-dev
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20131230/63e514b3/attachment.htm


More information about the Squeak-dev mailing list