The Inbox: Monticello-ct.715.mcz

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

The Inbox: Monticello-ct.715.mcz

commits-2
Christoph Thiede uploaded a new version of Monticello to project The Inbox:
http://source.squeak.org/inbox/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!