[squeak-dev] The Trunk: PackageInfo-Base-eem.76.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jun 11 17:44:37 UTC 2022


Eliot Miranda uploaded a new version of PackageInfo-Base to project The Trunk:
http://source.squeak.org/trunk/PackageInfo-Base-eem.76.mcz

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

Name: PackageInfo-Base-eem.76
Author: eem
Time: 11 June 2022, 10:44:36.386912 am
UUID: 0a39fe04-3bdd-45ae-94d1-8aff909211ce
Ancestors: PackageInfo-Base-mt.75

Fix PackageInfo>>#externalRefsSelect:thenCollect: to answer associations whose values include all external users, not just the last one.


[This has no effect on feature freeze since there are no senders of the two senders externalCallers & externalUsers.  So for me it does count as a bug fix.]

=============== Diff against PackageInfo-Base-mt.75 ===============

Item was changed:
  ----- Method: PackageInfo>>externalRefsSelect:thenCollect: (in category 'dependencies') -----
  externalRefsSelect: selBlock thenCollect: colBlock
  	| pkgMethods dependents extMethods otherClasses otherMethods classNames |
  
  	classNames := self classes collect: [:c | c name].
  	extMethods := self extensionMethods collect: [:mr | mr methodSymbol].
  	otherClasses := self externalClasses difference: self externalSubclasses.
  	otherMethods :=  otherClasses gather: [:c | c selectors].
  	pkgMethods := self methods asSet collect: [:mr | mr methodSymbol].
  	pkgMethods removeAllFoundIn: otherMethods.
  
  	dependents := Set new.
+ 	otherClasses do:
+ 		[:c |
- 	otherClasses do: [:c |
  		c selectorsAndMethodsDo:
+ 			[:sel :compiled | | refs |
- 			[:sel :compiled |
- 			| refs |
  			(extMethods includes: sel) ifFalse: 
  				[refs := compiled literals select: selBlock thenCollect: colBlock.
+ 				refs := refs select: [:ea | (classNames includes: ea) or: [pkgMethods includes: ea]].
+ 				refs isEmpty ifFalse:
+ 					[dependents add: (self referenceForMethod: sel ofClass: c) ->  (refs size = 1 ifTrue: [refs anyOne] ifFalse: [refs])]]]].
+ 	^dependents!
- 				refs do: [:ea |
- 					((classNames includes: ea) or: [pkgMethods includes: ea])
- 							ifTrue: [dependents add: (self referenceForMethod: sel ofClass: c) -> ea]]]]].
- 	^ dependents!



More information about the Squeak-dev mailing list