The Trunk: Tools-mt.956.mcz

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

The Trunk: Tools-mt.956.mcz

Marcel Taeumel uploaded a new version of Tools to project The Trunk:

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

Name: Tools-mt.956
Author: mt
Time: 7 April 2020, 6:50:40.052763 pm
UUID: d6189563-c44f-9147-aaff-594e603002b7
Ancestors: Tools-mt.955

Minimal fix of an unfortunate bug in our dependency browser. I will backport this to 5.3 immediately. Only affects users ot CompiledBlocks, which is implied by SistaV1, which is not active in 5.3. So, we should be fine considering our dependency tests.

=============== Diff against Tools-mt.955 ===============

Item was changed:
  ----- Method: DependencyBrowser>>computePackageDependencies: (in category 'package deps') -----
  computePackageDependencies: pkgName
  "Compute the dependencies for the given package"
  | pi |
  classDeps := Dictionary new.
  packageDeps := Dictionary new.
  pkgName ifNil:[^self].
  pi := PackageOrganizer default packageNamed: pkgName ifAbsent:[^self]. "unloaded"
  pi classes do:[:pkgClass|
  (classDeps at: (pkgClass superclass ifNil:[ProtoObject]) name
  ifAbsentPut:[OrderedCollection new]) add:
  (MethodReference class: pkgClass selector: #Definition)].
+ pi methods do:[:mref|
+ mref compiledMethod allLiteralsDo:[:lit |
+ (lit isVariableBinding and: [lit value isBehavior]) ifTrue:[
- pi methods do:[:mref| | cm |
- cm := mref compiledMethod.
- 1 to: cm numLiterals do:[:i| | lit |
- ((lit := cm literalAt: i) isVariableBinding and:[lit value isBehavior]) ifTrue:[
  (classDeps at: lit value name ifAbsentPut:[OrderedCollection new])
+ add: mref]]].
- add: (MethodReference class: cm methodClass selector: cm selector)]]].
  classDeps keys do:[:className| | aClass pkg |
  aClass := Smalltalk classNamed: className.
  pkg := aClass ifNil: [nil] ifNotNil: [PackageOrganizer default packageOfClass: aClass ifNone:[nil]].
  pkg ifNil:[
  Transcript cr; show: 'WARNING: No package for ', className.
  (classDeps removeKey: className) do:[:each| Transcript crtab; show: each].
  ] ifNotNil:[
  (packageDeps at: pkg name ifAbsentPut:[OrderedCollection new]) add: className.
  (packageDeps removeKey: pkgName ifAbsent:[#()]) do:[:each|
  classDeps removeKey: each ifAbsent:[].