[Cuis-dev] Question about package building and system classes

Phil B pbpublist at gmail.com
Tue Dec 1 17:53:18 PST 2020


Mauro,

On Tue, Dec 1, 2020 at 8:18 PM Mauro Rizzi <mrizzi at fi.uba.ar> wrote:

> Hello Phil!
>
> Thanks a lot, the postPackageInstall and postPackageInstall methods will
> resolve multiple of my concerns!
>

Glad it was useful.  I did the video because this question has come up
numerous times over the years on the list.  Good to put it to work!


>
> I'm gonna use this chain and ask, the package manager doesn't actually
> remove the packages when you click remove right? So in theory I shouldn't
> worry about having that var removed when someone removes the package
> correct?.
>

Right, truly removing a package would require uninstalling/undoing
everything that the package did during installation.  AFAIK, no one to date
has been daring enough to take that on as doing it properly
(safely/completely) would likely require much more infrastructure than the
image currently provides.


>
> Cheers!
>
> *Mauro Rizzi*
>
>
Thanks,
Phil


> El mar, 1 dic 2020 a las 21:25, Phil B (<pbpublist at gmail.com>) escribió:
>
>> Mauro,
>>
>> I did a screencast a while back that might be helpful (the link jumps
>> right to the point where I start talking about adding a class variable):
>> https://youtu.be/jXuoFEkg6UA?t=586
>>
>> Hope that helps,
>> Phil
>>
>> On Tue, Dec 1, 2020 at 5:40 PM Mauro Rizzi via Cuis-dev <
>> cuis-dev at lists.cuis.st> wrote:
>>
>>> Hello everyone!
>>>
>>> I'm looking into using packages as ways to deliver feature packs and
>>> found myself in an issue where I need to add a class variable to a system
>>> class.
>>>
>>> I have no issue adding the variable to the class, the problem is when I
>>> try to reflect this change on a package. So far the only way I see of
>>> adding or removing things from a package is changing the category name of
>>> methods/classes so they fit into the package file.
>>>
>>> However I don't think it would be a good idea to move the whole Utility
>>> class into a package system category just to add a single var.
>>>
>>> So far i'm just considering either adding it through the
>>> addClassVarName: method (after checking if it doesn't exist) in one of the
>>> methods that uses that variable regularly or straight up injecting the code
>>> into the package file so it's executed on fileIn.
>>>
>>> Both ways seem like hacky workarounds that might actually cause problems
>>> (for example if the package is later removed that variable won't be removed
>>> at all).
>>>
>>> Is there any other way to add the modification of the Utility class into
>>> my package? Or is the idea that package modifications are identified and
>>> tracked by the categories only?
>>>
>>> And before you say changesets. Yes I know they can reflect this, but
>>> packages allow me to work on different things on the system without having
>>> to have a separate image for each or touching up the contents of the
>>> changesets.
>>>
>>> Kind regards,
>>>
>>> *Mauro Rizzi*
>>>
>>>
>>> --
>>> 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/20201201/a8c3e172/attachment-0001.htm>


More information about the Cuis-dev mailing list