[squeak-dev] The Trunk: Tools-mt.978.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Sat Jun 13 12:58:02 UTC 2020


Hi Marcel,


thanks for extending this helpful tool! :-)


Hm, this artificial syntax does not really appear intuitive to me, especially for beginners. You prove this yourself by writing an extra explanation of these symbols. ;-) I would not want myself to need to google what this notation could mean ... There are already too many tools in the dark outside of Squeak that lack a proper self-description.


Couldn't we simply write "Collections (defs+exts)" or maybe "Collection (super) *exts"?

Maybe we could also display some helpful hints in the text pane when you select a depending package only.


Or ideally: Use some kind of text attribute to highlight the parts of the source that actually make up dependency. Quick and dirty prototypes:

[cid:2378228f-6909-4df2-a592-6b1f4dd946fd]

[cid:1e3eb367-a535-42c4-b93f-781b7ae5a0da]


I think this would make it much easier to use this tool. Just my two cents :-)

<http://www.hpi.de/>

Best,
Christoph
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Samstag, 13. Juni 2020 12:23:03
An: squeak-dev
Betreff: Re: [squeak-dev] The Trunk: Tools-mt.978.mcz

[cid:9e199013-ffb2-464c-a87c-eea4df827fe5]

For example, "BitBlt ()" means that (1) you need it as a base class and (2) you actually reference the class "BitBlt" in your code and (3) you make no extensions to that class.

For another example, "Kernel () *" means that (1) you need some class from Kernel package as base class and (2) you add extension methods to at least one class from the Kernel package. It does not reveal whether you reference a class from that Kernel package in your code.

For a last example, "Files" means that (1) you reference a class from the Files package and (2) you do not need any class as a base class from there and (3) you do not put extensions into any of those classes from Files.

Well, if there would be no hidden dependencies -- but there often are, e.g. Etoys msg sends  -- considering modularity, it is preferrable to get rid of "*" and "*exts only" first. Then go for changing "()" into "(defs only)". In any case remove the number of items in the second to fifth panes. :-D

Best,
Marcel

Am 13.06.2020 12:12:25 schrieb commits at source.squeak.org <commits at source.squeak.org>:

Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.978.mcz

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

Name: Tools-mt.978
Author: mt
Time: 13 June 2020, 12:12:13.228814 pm
UUID: 2b303276-0f03-1643-80da-7a436f6d2f89
Ancestors: Tools-mt.977

In the deps browser, reveal whether there is any class-definition or extension dependency at all as early as possible.

Feel free to adjust the labels. For now, they are:

2nd / 3rd pane
... ()
... *
... () *
... *exts only
... (defs only)
4th pane:
... (class definition)
*extensions

=============== Diff against Tools-mt.977 ===============

Item was changed:
----- Method: DependencyBrowser>>classDepsList (in category 'class deps') -----
classDepsList
"Class dependencies for the currently selected package"

+ | checkDef checkExt |
+ checkDef := [:mref | mref selector = #Definition].
+ checkExt := [:mref | mref category notNil and: [mref category first = $*]].
+
^ classDepsList ifNil: [
classDepsList := self classDeps.
classDepsList := classDepsList collect: [:className |
+ String streamContents: [:label |
+ label nextPutAll: className.
+ (self depsForClassNamed: className allSatisfy: checkDef)
+ ifTrue: [label nextPutAll: ' (defs only)']
+ ifFalse: [(self depsForClassNamed: className allSatisfy: checkExt)
+ ifTrue: [label nextPutAll: ' *exts only']
+ ifFalse: [
+ (self depsForClassNamed: className anySatisfy: checkDef)
+ ifTrue: [label nextPutAll: ' ()'].
+ (self depsForClassNamed: className anySatisfy: checkExt)
+ ifTrue: [label nextPutAll: ' *']]]]]]!
- (self
- depsForClassNamed: className
- allSatisfy: [:mref | mref selector = #Definition])
- ifTrue: [className, ' (defs only)']
- ifFalse: [(self
- depsForClassNamed: className
- allSatisfy: [:mref | mref category notNil and: [mref category first = $*]])
- ifTrue: [className, ' *ext only*']
- ifFalse: [className]]].
- classDepsList]!

Item was added:
+ ----- Method: DependencyBrowser>>depsForClassNamed:anySatisfy: (in category 'enumerating') -----
+ depsForClassNamed: className anySatisfy: workBlock
+
+ self
+ depsForClassNamed: className
+ do: [:mref | (workBlock value: mref) ifTrue: [^ true]].
+ ^ false!

Item was added:
+ ----- Method: DependencyBrowser>>depsForPackageNamed:anySatisfy: (in category 'enumerating') -----
+ depsForPackageNamed: packageName anySatisfy: workBlock
+
+ self
+ depsForPackageNamed: packageName
+ do: [:mref | (workBlock value: mref) ifTrue: [^ true]].
+ ^ false!

Item was changed:
----- Method: DependencyBrowser>>packageDepsList (in category 'package deps') -----
packageDepsList
"Package dependencies for the currently selected package"

+ | checkDef checkExt |
+ checkDef := [:mref | mref selector = #Definition].
+ checkExt := [:mref | mref category notNil and: [mref category first = $*]].
+
^ packageDepsList ifNil: [
packageDepsList := self packageDeps.
packageDepsList := packageDepsList collect: [:packageName |
+ String streamContents: [:label |
+ label nextPutAll: packageName.
+ (self depsForPackageNamed: packageName allSatisfy: checkDef)
+ ifTrue: [label nextPutAll: ' (defs only)']
+ ifFalse: [(self depsForPackageNamed: packageName allSatisfy: checkExt)
+ ifTrue: [label nextPutAll: ' *exts only']
+ ifFalse: [
+ (self depsForPackageNamed: packageName anySatisfy: checkDef)
+ ifTrue: [label nextPutAll: ' ()'].
+ (self depsForPackageNamed: packageName anySatisfy: checkExt)
+ ifTrue: [label nextPutAll: ' *']]]]]]!
- (self
- depsForPackageNamed: packageName
- allSatisfy: [:mref | mref selector = #Definition])
- ifTrue: [packageName, ' (defs only)']
- ifFalse: [(self
- depsForPackageNamed: packageName
- allSatisfy: [:mref | mref category notNil and: [mref category first = $*]])
- ifTrue: [packageName, ' *ext only*']
- ifFalse: [packageName]]].
- packageDepsList]!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200613/4caeba05/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 66944 bytes
Desc: image.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200613/4caeba05/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 54977 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200613/4caeba05/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 64240 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200613/4caeba05/attachment-0005.png>


More information about the Squeak-dev mailing list