[Pharo-project] #anyChanges still needed?
Hi guys. ChangeSet does at some point: anEvent itemKind = SystemChangeNotifier classKind ifTrue: [ ... anEvent isModified ifTrue: [anEvent anyChanges ifTrue: [self changeClass: anEvent item from: anEvent oldItem]]. anEven So...I don't understand the #anyChanges. We received an event saying that a class was modified, but it may not have any changes? if true, why was the event sent? Ok...let's say that there could be several reasons that a class was modified but only some of them make sense to change set. I can imagine people wanted to avoid writing stuff to .changes that didn't actullay represente a change? If this is the case, then #anyChanges looks like a bad name for me. Now, do we still need this mesage? can there be ClassModified events without changes? thanks -- Mariano http://marianopeck.wordpress.com
I do not care to write extra stuff into the changes file. My hd is large enough to handle some extra kilobytes... On Sat, Jun 16, 2012 at 9:14 PM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
Hi guys. ChangeSet does at some point:
anEvent itemKind = SystemChangeNotifier classKind ifTrue: [ ... anEvent isModified ifTrue: [anEvent anyChanges ifTrue: [self changeClass: anEvent item from: anEvent oldItem]]. anEven
So...I don't understand the #anyChanges. We received an event saying that a class was modified, but it may not have any changes? if true, why was the event sent? Ok...let's say that there could be several reasons that a class was modified but only some of them make sense to change set. I can imagine people wanted to avoid writing stuff to .changes that didn't actullay represente a change?
If this is the case, then #anyChanges looks like a bad name for me. Now, do we still need this mesage? can there be ClassModified events without changes?
thanks
-- Mariano http://marianopeck.wordpress.com
On Sat, Jun 16, 2012 at 9:19 PM, Guillermo Polito <guillermopolito@gmail.com
wrote:
I do not care to write extra stuff into the changes file. My hd is large enough to handle some extra kilobytes...
Usually, people do not add this kind of stuff just because. There is a reason behind. This method looks from 2004 (by Adrian Lienchard), and I don't think they have problems with the HDD either at that time. So I would like to be sure which is the reason. Cheers
On Sat, Jun 16, 2012 at 9:14 PM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
Hi guys. ChangeSet does at some point:
anEvent itemKind = SystemChangeNotifier classKind ifTrue: [ ... anEvent isModified ifTrue: [anEvent anyChanges ifTrue: [self changeClass: anEvent item from: anEvent oldItem]]. anEven
So...I don't understand the #anyChanges. We received an event saying that a class was modified, but it may not have any changes? if true, why was the event sent? Ok...let's say that there could be several reasons that a class was modified but only some of them make sense to change set. I can imagine people wanted to avoid writing stuff to .changes that didn't actullay represente a change?
If this is the case, then #anyChanges looks like a bad name for me. Now, do we still need this mesage? can there be ClassModified events without changes?
thanks
-- Mariano http://marianopeck.wordpress.com
-- Mariano http://marianopeck.wordpress.com
may be because the source changes was listening to the event. And the log file needed to log any thing like doits and other. On Jun 16, 2012, at 9:14 PM, Mariano Martinez Peck wrote:
Hi guys. ChangeSet does at some point:
anEvent itemKind = SystemChangeNotifier classKind ifTrue: [ ... anEvent isModified ifTrue: [anEvent anyChanges ifTrue: [self changeClass: anEvent item from: anEvent oldItem]]. anEven
So...I don't understand the #anyChanges. We received an event saying that a class was modified, but it may not have any changes? if true, why was the event sent? Ok...let's say that there could be several reasons that a class was modified but only some of them make sense to change set. I can imagine people wanted to avoid writing stuff to .changes that didn't actullay represente a change?
If this is the case, then #anyChanges looks like a bad name for me.
Now, do we still need this mesage? can there be ClassModified events without changes? thanks
-- Mariano http://marianopeck.wordpress.com
Yeah, but logging superfluous changes does not really make a change, does it? On Sat, Jun 16, 2012 at 10:04 PM, Stéphane Ducasse < stephane.ducasse@inria.fr> wrote:
may be because the source changes was listening to the event. And the log file needed to log any thing like doits and other.
On Jun 16, 2012, at 9:14 PM, Mariano Martinez Peck wrote:
Hi guys. ChangeSet does at some point:
anEvent itemKind = SystemChangeNotifier classKind ifTrue: [ ... anEvent isModified ifTrue: [anEvent anyChanges ifTrue: [self changeClass: anEvent item from: anEvent oldItem]]. anEven
So...I don't understand the #anyChanges. We received an event saying that a class was modified, but it may not have any changes? if true, why was the event sent? Ok...let's say that there could be several reasons that a class was modified but only some of them make sense to change set. I can imagine people wanted to avoid writing stuff to .changes that didn't actullay represente a change?
If this is the case, then #anyChanges looks like a bad name for me.
Now, do we still need this mesage? can there be ClassModified events without changes? thanks
-- Mariano http://marianopeck.wordpress.com
My 2cts is for some event (and I think *modified is part of them), you got the event twice: before and after. So basically, one of the two events is wrong. Mariano, you should try to put an halt, and see :) Ben On Jun 16, 2012, at 10:26 PM, Guillermo Polito wrote:
Yeah, but logging superfluous changes does not really make a change, does it?
On Sat, Jun 16, 2012 at 10:04 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote: may be because the source changes was listening to the event. And the log file needed to log any thing like doits and other.
On Jun 16, 2012, at 9:14 PM, Mariano Martinez Peck wrote:
Hi guys. ChangeSet does at some point:
anEvent itemKind = SystemChangeNotifier classKind ifTrue: [ ... anEvent isModified ifTrue: [anEvent anyChanges ifTrue: [self changeClass: anEvent item from: anEvent oldItem]]. anEven
So...I don't understand the #anyChanges. We received an event saying that a class was modified, but it may not have any changes? if true, why was the event sent? Ok...let's say that there could be several reasons that a class was modified but only some of them make sense to change set. I can imagine people wanted to avoid writing stuff to .changes that didn't actullay represente a change?
If this is the case, then #anyChanges looks like a bad name for me.
Now, do we still need this mesage? can there be ClassModified events without changes? thanks
-- Mariano http://marianopeck.wordpress.com
On Sat, Jun 16, 2012 at 11:53 PM, Benjamin < benjamin.vanryseghem.pharo@gmail.com> wrote:
My 2cts is for some event (and I think *modified is part of them), you got the event twice: before and after. So basically, one of the two events is wrong.
Mariano, you should try to put an halt, and see :)
I did, but it gets call only once per modification.
Ben
On Jun 16, 2012, at 10:26 PM, Guillermo Polito wrote:
Yeah, but logging superfluous changes does not really make a change, does it?
On Sat, Jun 16, 2012 at 10:04 PM, Stéphane Ducasse < stephane.ducasse@inria.fr> wrote:
may be because the source changes was listening to the event. And the log file needed to log any thing like doits and other.
On Jun 16, 2012, at 9:14 PM, Mariano Martinez Peck wrote:
Hi guys. ChangeSet does at some point:
anEvent itemKind = SystemChangeNotifier classKind ifTrue: [ ... anEvent isModified ifTrue: [anEvent anyChanges ifTrue: [self changeClass: anEvent item from: anEvent oldItem]]. anEven
So...I don't understand the #anyChanges. We received an event saying that a class was modified, but it may not have any changes? if true, why was the event sent? Ok...let's say that there could be several reasons that a class was modified but only some of them make sense to change set. I can imagine people wanted to avoid writing stuff to .changes that didn't actullay represente a change?
If this is the case, then #anyChanges looks like a bad name for me.
Now, do we still need this mesage? can there be ClassModified events without changes? thanks
-- Mariano http://marianopeck.wordpress.com
-- Mariano http://marianopeck.wordpress.com
participants (4)
-
Benjamin -
Guillermo Polito -
Mariano Martinez Peck -
Stéphane Ducasse