[Cuis-dev] Bug? running system category tests

Hernan Wilkinson hernan.wilkinson at gmail.com
Fri Feb 4 13:36:58 PST 2022


I fixed the cmd+y behavior.
SmalltalkEditor knows its codeProvider that knows the selected system
category.

Cheers!
Hernan.

On Fri, Feb 4, 2022 at 6:26 PM Hernan Wilkinson <hernan.wilkinson at gmail.com>
wrote:

> Hi Luciano
>  thank you for the change! It is on github now.
>
>  Regarding #testCaseClassesAt: I left it in SystemOrganizer because I use
> it a lot when scripting :-)
>
>  Regarding #linesOfCode:, etc., those methods are the result of doing an
> extract method from a bigger method a long time ago. I do not really use
> them, in fact they are disabled in CuisUniversity because they slow down
> the whole system as you notice for top system categories.
>  We talked with Juan about this issue and the best thing to do would be to
> change from lines of code to message sends (lines of code is an old metric,
> it made sense in cobol or fortran where one line was one instruction, but
> it does not make that much sense in Smalltalk because you can have one or
> many message send per line) and count message sends from the bytecodes, not
> the source code. That would be much faster, but the problem is the
> optimized message sends like ifTrue: and so on...
>
>  Regarding cmd+y, I'll take a look later to see what we can do.
>
>  BTW, I found another unexpected behavior. When loading a package the
> browser is not updated with the new system categories of the package.
>  If you can look at it, it would be great, if not let me know and I'll
> take a look.
>
> Cheers!
> Hernan.
>
> On Fri, Feb 4, 2022 at 3:44 AM Luciano Notarfrancesco <luchiano at gmail.com>
> wrote:
>
>> Hi Hernan,
>> I think this should fix cmd-t. I never used this and I'm not sure how you
>> use it, can you test it and let me know if it behaves as you expect? Notice
>> that I moved #classesAt: from Categorizer to SystemOrganizer because the
>> Categorizer is more general (it is used for method categories too), and
>> then I removed #testCaseClassesAt: and put that line of code in the caller
>> (because it made the SystemOrganizer know about test cases and I thought
>> that was unnecessary). I don't think I broke anything, I searched for
>> senders in other packages, but let me know what you think.
>>
>> Also I saw the methods for #linesOfCodeOf:, #instanceMethodCountOf: and
>> #classMethodCountOf: you added to SystemOrganizer to show that information
>> in annotations. Currently, they return 0 for top categories without any
>> classes. I made the experiment of including all classes in all
>> subcategories, but it became too slow so I reverted to the original
>> behavior.
>>
>> Regarding cmd-y I think there's not much we can do without getting
>> dirty... at the level of SmalltalkEditor we don't know anything of the
>> Browser, what system category is selected, etc, and I wouldn't want to hack
>> my way into a fix. What do you think?
>>
>>
>> On Wed, Feb 2, 2022 at 3:08 PM Hernan Wilkinson via Cuis-dev <
>> cuis-dev at lists.cuis.st> wrote:
>>
>>> Hi Luciano,
>>>  I found another bug... well, I do not know if it is a bug really, maybe
>>> a "desired behavior" :-)
>>>  It is related to running the tests for a system category.
>>>  Currently, if you have the mouse over a system category and pressed
>>> cmd+t, it runs all the tests of that category. That works ok for the
>>> subcategories but if you are in a root category it only runs the tests for
>>> that root category and I think it should run the tests of all the
>>> categories because they are shown in the class list.
>>>
>>>  The same thing should happen when pressing cmd+y in the code pane.
>>> cmd+y runs the tests of the system category, so if you are in a root system
>>> category it should behave as described in the previous paragraph.
>>>
>>>  Does it make sense to you?
>>>
>>> Cheers!
>>> Hernan.
>>> --
>>> Cuis-dev mailing list
>>> Cuis-dev at lists.cuis.st
>>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220204/7f467be0/attachment.htm>


More information about the Cuis-dev mailing list