the mystery of dirty package

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

the mystery of dirty package

Usman Bhatti
Hi,

It is second time in a week that I have to analyze a problem related to a package getting dirty because of loading another package. But when looking for changes, the first package becomes clean again.


One occurrence of the problem can be seen in the latest moose image:
- download the latest image here:https://ci.inria.fr/moose/job/moose-5.0/
- monticello browser -> Collections-Abstract -> changes and the package becomes clean.

Any idea how to determine which method(s) from the incoming package might be causing changes in the loaded package? Or generally, how to go about correcting this problem?

usman

 
Reply | Threaded
Open this post in threaded view
|

Re: the mystery of dirty package

Goubier Thierry
Hi Usman,

look if the loaded package has overrides on other packages. If yes, it
will dirty them, and looking for changes will clean them.

Thierry

Le 28/05/2014 15:59, Usman Bhatti a écrit :

> Hi,
>
> It is second time in a week that I have to analyze a problem related to
> a package getting dirty because of loading another package. But when
> looking for changes, the first package becomes clean again.
>
>
> One occurrence of the problem can be seen in the latest moose image:
> - download the latest image here:https://ci.inria.fr/moose/job/moose-5.0/
> - monticello browser -> Collections-Abstract -> changes and the package
> becomes clean.
>
> Any idea how to determine which method(s) from the incoming package
> might be causing changes in the loaded package? Or generally, how to go
> about correcting this problem?
>
> usman
>

--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95

Reply | Threaded
Open this post in threaded view
|

Re: the mystery of dirty package

Usman Bhatti
Tx for the pointer Thierry.

So, I did a small script (because there were 314 methods) to see number of non-class-extension methods with and without loading the dirty marker package and I could spot the culprit.

Running this script before and after loading the second package and doing a difference on the two sets shows determining the overridden method.

methods := (RPackage organizer packageNamed: packageName) definedClasses flatCollect: [:class | class  methodDict values].
methods := methods select: [:aMethod | aMethod category asString includesSubstring: '*'].


regards,
usman


On Wed, May 28, 2014 at 4:30 PM, Goubier Thierry <[hidden email]> wrote:
Hi Usman,

look if the loaded package has overrides on other packages. If yes, it will dirty them, and looking for changes will clean them.

Thierry

Le 28/05/2014 15:59, Usman Bhatti a écrit :

Hi,

It is second time in a week that I have to analyze a problem related to
a package getting dirty because of loading another package. But when
looking for changes, the first package becomes clean again.


One occurrence of the problem can be seen in the latest moose image:
- download the latest image here:https://ci.inria.fr/moose/job/moose-5.0/
- monticello browser -> Collections-Abstract -> changes and the package
becomes clean.

Any idea how to determine which method(s) from the incoming package
might be causing changes in the loaded package? Or generally, how to go
about correcting this problem?

usman


--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: <a href="tel:%2B33%20%280%29%201%2069%2008%2032%2092" value="+33169083292" target="_blank">+33 (0) 1 69 08 32 92 / 83 95


Reply | Threaded
Open this post in threaded view
|

Re: the mystery of dirty package

Tudor Girba-2
I do not quite understand.

If it is an overriden method, the dirtyness should not go away when looking for changes, no? In our case, there are no changes found.

@Usman: what is the problematic method?

Doru


On Fri, May 30, 2014 at 1:11 PM, Usman Bhatti <[hidden email]> wrote:
Tx for the pointer Thierry.

So, I did a small script (because there were 314 methods) to see number of non-class-extension methods with and without loading the dirty marker package and I could spot the culprit.

Running this script before and after loading the second package and doing a difference on the two sets shows determining the overridden method.

methods := (RPackage organizer packageNamed: packageName) definedClasses flatCollect: [:class | class  methodDict values].
methods := methods select: [:aMethod | aMethod category asString includesSubstring: '*'].


regards,
usman



On Wed, May 28, 2014 at 4:30 PM, Goubier Thierry <[hidden email]> wrote:
Hi Usman,

look if the loaded package has overrides on other packages. If yes, it will dirty them, and looking for changes will clean them.

Thierry

Le 28/05/2014 15:59, Usman Bhatti a écrit :

Hi,

It is second time in a week that I have to analyze a problem related to
a package getting dirty because of loading another package. But when
looking for changes, the first package becomes clean again.


One occurrence of the problem can be seen in the latest moose image:
- download the latest image here:https://ci.inria.fr/moose/job/moose-5.0/
- monticello browser -> Collections-Abstract -> changes and the package
becomes clean.

Any idea how to determine which method(s) from the incoming package
might be causing changes in the loaded package? Or generally, how to go
about correcting this problem?

usman


--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: <a href="tel:%2B33%20%280%29%201%2069%2008%2032%2092" value="+33169083292" target="_blank">+33 (0) 1 69 08 32 92 / 83 95





--

"Every thing has its own flow"
Reply | Threaded
Open this post in threaded view
|

Re: the mystery of dirty package

Usman Bhatti



On Fri, May 30, 2014 at 1:16 PM, Tudor Girba <[hidden email]> wrote:
I do not quite understand.

If it is an overriden method, the dirtyness should not go away when looking for changes, no?

+1
 
In our case, there are no changes found. 

@Usman: what is the problematic method?

Doru, I didn't try it in moose yet. I'll give it a try later in the afternoon and inform you.
 

Doru


On Fri, May 30, 2014 at 1:11 PM, Usman Bhatti <[hidden email]> wrote:
Tx for the pointer Thierry.

So, I did a small script (because there were 314 methods) to see number of non-class-extension methods with and without loading the dirty marker package and I could spot the culprit.

Running this script before and after loading the second package and doing a difference on the two sets shows determining the overridden method.

methods := (RPackage organizer packageNamed: packageName) definedClasses flatCollect: [:class | class  methodDict values].
methods := methods select: [:aMethod | aMethod category asString includesSubstring: '*'].


regards,
usman



On Wed, May 28, 2014 at 4:30 PM, Goubier Thierry <[hidden email]> wrote:
Hi Usman,

look if the loaded package has overrides on other packages. If yes, it will dirty them, and looking for changes will clean them.

Thierry

Le 28/05/2014 15:59, Usman Bhatti a écrit :

Hi,

It is second time in a week that I have to analyze a problem related to
a package getting dirty because of loading another package. But when
looking for changes, the first package becomes clean again.


One occurrence of the problem can be seen in the latest moose image:
- download the latest image here:https://ci.inria.fr/moose/job/moose-5.0/
- monticello browser -> Collections-Abstract -> changes and the package
becomes clean.

Any idea how to determine which method(s) from the incoming package
might be causing changes in the loaded package? Or generally, how to go
about correcting this problem?

usman


--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: <a href="tel:%2B33%20%280%29%201%2069%2008%2032%2092" value="+33169083292" target="_blank">+33 (0) 1 69 08 32 92 / 83 95





--

"Every thing has its own flow"

Reply | Threaded
Open this post in threaded view
|

Re: the mystery of dirty package

Goubier Thierry
In reply to this post by Tudor Girba-2


De : Pharo-users [[hidden email]] de la part de Tudor Girba [[hidden email]]
Envoyé : vendredi 30 mai 2014 13:16
À : Any question about pharo is welcome
Objet : Re: [Pharo-users] the mystery of dirty package

I do not quite understand.

If it is an overriden method, the dirtyness should not go away when looking for changes, no? In our case, there are no changes found

If the overriden method (of say OriginalPackage) is redefined in a protocol named '*myPackage-override' by MyPackage, then asking MC for changes will consider that OriginalPackage is clean (and no changes will be found).

A good example is ConfigurationOfGitFileTree as it is now. Upon loading it, you will see that it will set as dirty I think four packages, with all of them except one become clean when looking for changes... The one that shows changes has the overridden  method not in an -override protocol (and I need to correct that someday).

This is how MC processes overrides.

Thierry

@Usman: what is the problematic method?

Doru


On Fri, May 30, 2014 at 1:11 PM, Usman Bhatti <[hidden email]> wrote:
Tx for the pointer Thierry.

So, I did a small script (because there were 314 methods) to see number of non-class-extension methods with and without loading the dirty marker package and I could spot the culprit.

Running this script before and after loading the second package and doing a difference on the two sets shows determining the overridden method.

methods := (RPackage organizer packageNamed: packageName) definedClasses flatCollect: [:class | class  methodDict values].
methods := methods select: [:aMethod | aMethod category asString includesSubstring: '*'].


regards,
usman



On Wed, May 28, 2014 at 4:30 PM, Goubier Thierry <[hidden email]> wrote:
Hi Usman,

look if the loaded package has overrides on other packages. If yes, it will dirty them, and looking for changes will clean them.

Thierry

Le 28/05/2014 15:59, Usman Bhatti a écrit :

Hi,

It is second time in a week that I have to analyze a problem related to
a package getting dirty because of loading another package. But when
looking for changes, the first package becomes clean again.


One occurrence of the problem can be seen in the latest moose image:
- download the latest image here:https://ci.inria.fr/moose/job/moose-5.0/
- monticello browser -> Collections-Abstract -> changes and the package
becomes clean.

Any idea how to determine which method(s) from the incoming package
might be causing changes in the loaded package? Or generally, how to go
about correcting this problem?

usman


--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: <a href="tel:%2B33%20%280%29%201%2069%2008%2032%2092" value="&#43;33169083292" target="_blank"> +33 (0) 1 69 08 32 92 / 83 95





--

"Every thing has its own flow"
Reply | Threaded
Open this post in threaded view
|

Re: the mystery of dirty package

Usman Bhatti
In reply to this post by Tudor Girba-2



On Fri, May 30, 2014 at 1:16 PM, Tudor Girba <[hidden email]> wrote:
I do not quite understand.

If it is an overriden method, the dirtyness should not go away when looking for changes, no? In our case, there are no changes found.

@Usman: what is the problematic method?


Grease overrides two methods in Collections-Abstract
- Collection>>#contents 
- SequenceableCollection>>#sorted

For the curious ones: in moose loading glamour makes collections-abstract package dirty. But doing changes makes the package clean. 

Doru, for Moose, the solution might be to update glamour config to use latest Grease as suggested by Stephan.


 

Doru


On Fri, May 30, 2014 at 1:11 PM, Usman Bhatti <[hidden email]> wrote:
Tx for the pointer Thierry.

So, I did a small script (because there were 314 methods) to see number of non-class-extension methods with and without loading the dirty marker package and I could spot the culprit.

Running this script before and after loading the second package and doing a difference on the two sets shows determining the overridden method.

methods := (RPackage organizer packageNamed: packageName) definedClasses flatCollect: [:class | class  methodDict values].
methods := methods select: [:aMethod | aMethod category asString includesSubstring: '*'].


regards,
usman



On Wed, May 28, 2014 at 4:30 PM, Goubier Thierry <[hidden email]> wrote:
Hi Usman,

look if the loaded package has overrides on other packages. If yes, it will dirty them, and looking for changes will clean them.

Thierry

Le 28/05/2014 15:59, Usman Bhatti a écrit :

Hi,

It is second time in a week that I have to analyze a problem related to
a package getting dirty because of loading another package. But when
looking for changes, the first package becomes clean again.


One occurrence of the problem can be seen in the latest moose image:
- download the latest image here:https://ci.inria.fr/moose/job/moose-5.0/
- monticello browser -> Collections-Abstract -> changes and the package
becomes clean.

Any idea how to determine which method(s) from the incoming package
might be causing changes in the loaded package? Or generally, how to go
about correcting this problem?

usman


--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: <a href="tel:%2B33%20%280%29%201%2069%2008%2032%2092" value="+33169083292" target="_blank">+33 (0) 1 69 08 32 92 / 83 95





--

"Every thing has its own flow"

Reply | Threaded
Open this post in threaded view
|

Re: the mystery of dirty package

Stephan Eggermont-3
In reply to this post by Usman Bhatti
Usman wrote:
>It is second time in a week that I have to analyze a problem related to a package getting dirty because of loading another package. But when looking for changes, the >first package becomes clean again.

A well-known reason can be found by taking a look in your package cache. If there are multiple versions of one package,
there is a configuration problem. Lots of configurations refer to wrong versions of Grease & Magritte

Stephan