The Inbox: Monticello-cbc.399.mcz

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

The Inbox: Monticello-cbc.399.mcz

commits-2
A new version of Monticello was added to project The Inbox:
http://source.squeak.org/inbox/Monticello-cbc.399.mcz

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

Name: Monticello-cbc.399
Author: cbc
Time: 25 August 2010, 10:34:20.93 am
UUID: 93053817-da1d-5b4c-8fde-e689e7270cab
Ancestors: Monticello-cbc.398

Selectors for removing/adding packages to update mechanism names changed.  Update MonticelloConfigurations before loading this package version.

=============== Diff against Monticello-cbc.398 ===============

Item was changed:
  ----- Method: MCWorkingCopy>>merged: (in category 'operations') -----
  merged: aVersion
  ancestry addAncestor: aVersion info.
+ MCMcmUpdater enableUpdatesOfPackage: self package name.
- MCMcmUpdater startLoading: self package name.
  self changed!

Item was changed:
  ----- Method: MCPackage>>unload (in category 'as yet unclassified') -----
  unload
  "Flag this package to not automatically reload when updating from Trunk.
  To begin receiving trunk updates on this package again, manually reload package."
+ MCMcmUpdater disableUpdatesOfPackage: self name.
- MCMcmUpdater skipLoading: self name.
  ^ self workingCopy unload!

Item was changed:
  ----- Method: MCWorkingCopy>>loaded: (in category 'operations') -----
  loaded: aVersion
  ancestry := MCWorkingAncestry new addAncestor: aVersion info.
  requiredPackages := OrderedCollection withAll: (aVersion dependencies collect: [:ea | ea package]).
  self modified: false.
+ MCMcmUpdater enableUpdatesOfPackage: self package name.
- MCMcmUpdater startLoading: self package name.
  self changed!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-cbc.399.mcz

Bert Freudenberg
I committed your MCConfig changes to trunk. Thanks! :)

But I'm not so sure about the changes to MC, as below.

Did you verify it even works? I don't think MCPackage>>unload is actually used when unloading a package. A better place would be MCPackageManager>>unregister and MCPackageManager class>>forPackage:.

Also, this introduces a hard dependency on MCMcmUpdater into the Monticello package. So this should at least be protected using

        Smalltalk at: #MCMcmUpdater ifPresent: [:updater | ... ]

or using some other mechanism of decoupling.

E.g., I see MCPackageManager class sends "self changed: #allManagers" whenever a package is added or removed. Maybe listening to that would be better than adding these explicit notification?

- Bert -

>  ----- Method: MCPackage>>unload (in category 'as yet unclassified') -----
>  unload
>   "Flag this package to not automatically reload when updating from Trunk.
>   To begin receiving trunk updates on this package again, manually reload package."
> + MCMcmUpdater disableUpdatesOfPackage: self name.
>   ^ self workingCopy unload!
>
>  ----- Method: MCWorkingCopy>>merged: (in category 'operations') -----
>  merged: aVersion
>   ancestry addAncestor: aVersion info.
> + MCMcmUpdater enableUpdatesOfPackage: self package name.
>   self changed!
>
>  ----- Method: MCWorkingCopy>>loaded: (in category 'operations') -----
>  loaded: aVersion
>   ancestry := MCWorkingAncestry new addAncestor: aVersion info.
>   requiredPackages := OrderedCollection withAll: (aVersion dependencies collect: [:ea | ea package]).
>   self modified: false.
> + MCMcmUpdater enableUpdatesOfPackage: self package name.
>   self changed!


cbc
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-cbc.399.mcz

cbc
On Wed, Aug 25, 2010 at 11:49 AM, Bert Freudenberg <[hidden email]> wrote:
> But I'm not so sure about the changes to MC, as below.
>
> Did you verify it even works? I don't think MCPackage>>unload is actually used when unloading a package. A better place would be MCPackageManager>>unregister and MCPackageManager class>>forPackage:.

Yes, I did verify this works, at least for the
SmalltalkImage>>unloadAllKnownPackages (which was the original
starting point for this discussion).  That works.

> Also, this introduces a hard dependency on MCMcmUpdater into the Monticello package. So this should at least be protected using
>
>        Smalltalk at: #MCMcmUpdater ifPresent: [:updater | ... ]
>
> or using some other mechanism of decoupling.
>
> E.g., I see MCPackageManager class sends "self changed: #allManagers" whenever a package is added or removed. Maybe listening to that would be better than adding these explicit notification?
>
> - Bert -

I'll look into the rest of this later tonight when I get a chance - a
good time to understand more of the code.

-Chris

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-cbc.399.mcz

Bert Freudenberg

On 25.08.2010, at 22:09, Chris Cunningham <[hidden email]> wrote:

> On Wed, Aug 25, 2010 at 11:49 AM, Bert Freudenberg <[hidden email]> wrote:
>> But I'm not so sure about the changes to MC, as below.
>>
>> Did you verify it even works? I don't think MCPackage>>unload is actually used when unloading a package. A better place would be MCPackageManager>>unregister and MCPackageManager class>>forPackage:.
>
> Yes, I did verify this works, at least for the
> SmalltalkImage>>unloadAllKnownPackages (which was the original
> starting point for this discussion).  That works.

Ah. I was thinking about unloading a package from the Monticello UI.

>> Also, this introduces a hard dependency on MCMcmUpdater into the Monticello package. So this should at least be protected using
>>
>>        Smalltalk at: #MCMcmUpdater ifPresent: [:updater | ... ]
>>
>> or using some other mechanism of decoupling.
>>
>> E.g., I see MCPackageManager class sends "self changed: #allManagers" whenever a package is added or removed. Maybe listening to that would be better than adding these explicit notification?
>>
>> - Bert -
>
> I'll look into the rest of this later tonight when I get a chance - a
> good time to understand more of the code.
>
> -Chris

Sounds like a plan :)

- Bert -


cbc
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-cbc.399.mcz

cbc
Ok.  I've looked at this some more, and it is interesting.

First, workingCopy, I think I still want to tap in at #unload. The
notification that goes out seems to go out to the class after unload
(part of unregister) after the package is removed with no notice of
what was removed - so unless I keep a copy of all the MC working
copies, I don't think I can trap what was removed.

Actually, for the load, the situation is similar - all of the users of
changed: #allManagers just get the update and refresh their working
list with all of the packages in the system - brute force, but makes
sure there aren't any holes anywhere.  Still, that doesn't help in my
case - I need to know exactly which package was loaded or unloaded.  I
guess I could grab the full list of all packages in the image and make
sure those aren't in the SkipPackages list.  I don't really like that,
though.

The other interesting this is that if you drop the 'working copy', the
code stays in the image, but the 'package' is dropped.  Should this
still update from Trunk, or should it not?  If I used the changed:
#allManagers trick, the results would be not updating these packages;
if I intercepted the message, it would continue to update those
packages (code).

On a somewhat unrelated topic, there doesn't appear to be any way to
unload packages from the Trunk mechanism.  So, if we ever decided to
drop a package altogether, or split the original package into several
new one and remove the original one, that would require a non-trunk
process to handle.  Not critical, just an observation.

-Chris

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-cbc.399.mcz

Bert Freudenberg

On 26.08.2010, at 08:30, Chris Cunningham wrote:

> Ok.  I've looked at this some more, and it is interesting.
>
> First, workingCopy, I think I still want to tap in at #unload. The
> notification that goes out seems to go out to the class after unload
> (part of unregister) after the package is removed with no notice of
> what was removed - so unless I keep a copy of all the MC working
> copies, I don't think I can trap what was removed.
>
> Actually, for the load, the situation is similar - all of the users of
> changed: #allManagers just get the update and refresh their working
> list with all of the packages in the system - brute force, but makes
> sure there aren't any holes anywhere.  Still, that doesn't help in my
> case - I need to know exactly which package was loaded or unloaded.  I
> guess I could grab the full list of all packages in the image and make
> sure those aren't in the SkipPackages list.  I don't really like that,
> though.
>
> The other interesting this is that if you drop the 'working copy', the
> code stays in the image, but the 'package' is dropped.  Should this
> still update from Trunk, or should it not?  If I used the changed:
> #allManagers trick, the results would be not updating these packages;
> if I intercepted the message, it would continue to update those
> packages (code).
>
> On a somewhat unrelated topic, there doesn't appear to be any way to
> unload packages from the Trunk mechanism.  So, if we ever decided to
> drop a package altogether, or split the original package into several
> new one and remove the original one, that would require a non-trunk
> process to handle.  Not critical, just an observation.
>
> -Chris

Thinking about this more I would not automatically add unloaded packages to the skip list, nor remove them when loaded. People mucking with this should know what they are doing, and will discover the skip list on their own.

Instead, only add them to the list in unloadAllKnownPackages, which is the only "semi-supported" use case for now.

And this will not require changes to Monticello itself, so all is well.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-cbc.399.mcz

Hannes Hirzel
> Instead, only add them to the list in unloadAllKnownPackages, which is the
> only "semi-supported" use case for now.
 +1

And factor out the definition of the literal array to unload packages
into a method of it's own.

--Hannes