The Trunk: Monticello-mt.719.mcz

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

The Trunk: Monticello-mt.719.mcz

commits-2
Marcel Taeumel uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-mt.719.mcz

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

Name: Monticello-mt.719
Author: mt
Time: 4 June 2020, 9:53:25.322143 am
UUID: e0ec209e-b0cb-5642-884e-0f91bf15f893
Ancestors: Monticello-jr.718, Monticello-ct.717

Merges regression fix about script load/unload order.

=============== Diff against Monticello-jr.718 ===============

Item was changed:
  ----- Method: MCDefinition>>wantsToBeOutermost (in category 'testing') -----
  wantsToBeOutermost
+ "Outermost definitions are installed after all other definitions. In particular, this hook is crucial for the correct behavior of removal preambles. See MCDependencySorter >> #addDeferred:."
 
  ^ false!

Item was changed:
  Object subclass: #MCDependencySorter
+ instanceVariableNames: 'nondeferred deferred required provided'
- instanceVariableNames: 'required provided deferred orderedItems'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Monticello-Loading'!
+
+ !MCDependencySorter commentStamp: 'ct 4/18/2020 16:38' prior: 0!
+ I sort a set of passed MCDefinitions, resolving all dependency conflicts automatically.
+
+ To use me, first add some items to me using the building protocol or my class-side #items: selector. After that, send #orderedItems to me and I will tell you all items in a loadable order.
+
+ Instance Variables
+ nondeferred: <SequenceableCollection>
+ Usual items that do not require special sorting mechanics.
+ deferred: <SequenceableCollection>
+ Items that are added after all nondeferred items. See MCDefinition >> #wantsToBeOutermost.
+ required: <Set>
+ provided: <Set>!

Item was changed:
  ----- Method: MCDependencySorter class>>sortItems: (in category 'utility') -----
  sortItems: aCollection
  | sorter |
  sorter := self items: aCollection.
  sorter externalRequirements do: [:req  | sorter addProvision: req].
+ ^ sorter orderedItems!
- ^ sorter orderedItems.!

Item was removed:
- ----- Method: MCDependencySorter>>addDeferred (in category 'building') -----
- addDeferred
- deferred do: [:ea |
- self addToOrder: ea].!

Item was changed:
  ----- Method: MCDependencySorter>>addDeferred: (in category 'private') -----
  addDeferred: anItem
+ "Add an item to the derred list. Deferred items will be appended to #orderedItems after all nondeferred items. See #wantsToBeOutermost."
+
  ^ deferred add: anItem!

Item was changed:
  ----- Method: MCDependencySorter>>addToOrder: (in category 'private') -----
  addToOrder: anItem
+ nondeferred add: anItem.
- orderedItems add: anItem.
  anItem provisions do: [:ea | self addProvision: ea].!

Item was changed:
  ----- Method: MCDependencySorter>>initialize (in category 'initialize-release') -----
  initialize
  provided := Set new.
  required := Dictionary new.
+ nondeferred := OrderedCollection new.
- orderedItems := OrderedCollection new.
  deferred := OrderedCollection new.!

Item was changed:
+ ----- Method: MCDependencySorter>>orderedItems (in category 'accessing') -----
- ----- Method: MCDependencySorter>>orderedItems (in category 'sorting') -----
  orderedItems
+ "Return all ordered items, first nondeferred items, second deferred (outermost) items."
+
+ ^ nondeferred , deferred!
- ^ orderedItems!

Item was changed:
  ----- Method: MCPackageLoader>>sorterForItems: (in category 'private') -----
  sorterForItems: aCollection
  | sorter |
  sorter := MCDependencySorter items: aCollection.
  sorter addExternalProvisions: self provisions.
- sorter addDeferred.
  ^ sorter!