[squeak-dev] The Trunk: Monticello-ct.715.mcz

Jakob Reschke forums.jakob at resfarm.de
Thu Apr 9 22:02:37 UTC 2020


It looks like this broke the writing of postscripts in FileTree repositories.

MCFileTreePackageStructureStWriter>>acceptVisitor:forDefinitions:
(MCDependencySorter sortItems: aCollection) does not include an
MCPostscriptDefinition that is still present in aCollection.

MCDependencySorter class>>sortItems:
The sorter includes the MCPostscriptDefinition in the new deferred
list, but not in the orderedItems. Therefore it is not included in the
result of sortItems:, because it only returns the orderedItems, not
the deferred ones.

Christoph, can and must sortItems: be fixed or a different method?


Am Do., 5. März 2020 um 21:05 Uhr schrieb <commits at source.squeak.org>:
>
> Nicolas Cellier uploaded a new version of Monticello to project The Trunk:
> http://source.squeak.org/trunk/Monticello-ct.715.mcz
>
> ==================== Summary ====================
>
> Name: Monticello-ct.715
> Author: ct
> Time: 6 February 2020, 6:58:26.533648 pm
> UUID: 199bf8a3-5eee-1045-a44b-89ad30fa5523
> Ancestors: Monticello-cmm.708
>
> Fixes wrong load and unload order of MCScriptDefinitions
>
> See http://forum.world.st/Monticello-Bug-Preamble-of-removal-is-executed-too-late-tp5108401.html. Regression tests are in Tests-ct.426.
>
> Please review!
>
> =============== Diff against Monticello-cmm.708 ===============
>
> Item was added:
> + ----- Method: MCDefinition>>wantsToBeOutermost (in category 'testing') -----
> + wantsToBeOutermost
> +
> +       ^ false!
>
> Item was changed:
>   Object subclass: #MCDependencySorter
> +       instanceVariableNames: 'required provided deferred orderedItems'
> -       instanceVariableNames: 'required provided orderedItems'
>         classVariableNames: ''
>         poolDictionaries: ''
>         category: 'Monticello-Loading'!
>
> Item was changed:
>   ----- Method: MCDependencySorter>>add: (in category 'building') -----
>   add: anItem
>         | requirements |
> +       (anItem wantsToBeOutermost)
> +               ifTrue: [^self addDeferred: anItem].
>         requirements := self unresolvedRequirementsFor: anItem.
>         requirements isEmpty
>                 ifTrue: [self addToOrder: anItem]
>                 ifFalse: [self addRequirements: requirements for: anItem].
>         ^anItem!
>
> Item was added:
> + ----- Method: MCDependencySorter>>addDeferred (in category 'building') -----
> + addDeferred
> +       deferred do: [:ea |
> +               self addToOrder: ea].!
>
> Item was added:
> + ----- Method: MCDependencySorter>>addDeferred: (in category 'private') -----
> + addDeferred: anItem
> +       ^ deferred add: anItem!
>
> Item was changed:
>   ----- Method: MCDependencySorter>>initialize (in category 'initialize-release') -----
>   initialize
>         provided := Set new.
>         required := Dictionary new.
> +       orderedItems := OrderedCollection new.
> +       deferred := OrderedCollection new.!
> -       orderedItems := OrderedCollection new.!
>
> Item was changed:
>   ----- Method: MCPackageLoader>>sorterForItems: (in category 'private') -----
>   sorterForItems: aCollection
>         | sorter |
>         sorter := MCDependencySorter items: aCollection.
>         sorter addExternalProvisions: self provisions.
> +       sorter addDeferred.
>         ^ sorter!
>
> Item was added:
> + ----- Method: MCPostscriptDefinition>>wantsToBeOutermost (in category 'nil') -----
> + wantsToBeOutermost
> +
> +       ^ true!
>
> Item was added:
> + ----- Method: MCRemovalPreambleDefinition>>wantsToBeOutermost (in category 'testing') -----
> + wantsToBeOutermost
> +
> +       ^ true!
>
>


More information about the Squeak-dev mailing list