Strange Slice+Changes behavior

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

Strange Slice+Changes behavior

Peter Uhnak
Hi,

I'm encountering very strange slice+changes behavior and I am not sure wtf is going on...
because it's showing that there are changes in untouched code...

So imagine I've changed two packages "Spec-Core" and "Spec-Examples"

If I create a slice for the package independently, then displaying changes looks fine

Spec-Core Changes


or

Spec-Examples Changes


so far so good, but if I in the slice maker select both packages... and then check the changes this shows up

which is wtf... I didn't touch AbstractAdapter nor other classes. It's almost like it's comparing "Spec-Examples" against "Spec-Core"

If I (after creating slice for both packages) select "Spec-Core" it's complaining about removed classes... which are from "Spec-Examples"


​However "Spec-Examples" still looks just fine


What is going on? What am I missing?

This is not the first time I am making slices, but I've never encountered this.

Thanks,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: Strange Slice+Changes behavior

demarey
Hi Peter,

Le 7 juil. 2015 à 14:19, Peter Uhnák a écrit :

> Hi,
>
> I'm encountering very strange slice+changes behavior and I am not sure wtf is going on...
> because it's showing that there are changes in untouched code...
>
> So imagine I've changed two packages "Spec-Core" and "Spec-Examples"
>
> If I create a slice for the package independently, then displaying changes looks fine
>
> Spec-Core Changes
> <2015-07-07_14:09:56.png>
> ​
> or
>
> Spec-Examples Changes
> <2015-07-07_14:10:26.png>
> ​
> so far so good, but if I in the slice maker select both packages... and then check the changes this shows up
> <2015-07-07_14:11:02.png>
> ​
> which is wtf... I didn't touch AbstractAdapter nor other classes. It's almost like it's comparing "Spec-Examples" against "Spec-Core"
I also noticed that.
It looks like the changes browser shows changes from the whole system.
As workaround, I now select packages in the slice independently to do a diff.
But, yes, it looks like something is broken with slices diff

Christophe

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Strange Slice+Changes behavior

Thierry Goubier
In reply to this post by Peter Uhnak


2015-07-07 14:19 GMT+02:00 Peter Uhnák <[hidden email]>:
Hi,

I'm encountering very strange slice+changes behavior and I am not sure wtf is going on...
because it's showing that there are changes in untouched code...

This is not the first time I am making slices, but I've never encountered this.

I've already seen it when making slices, probably as far back as Pharo3. Per-package was fine, overall slice was marking plenty of changes wrong.

Would you be able to reproduce it on purpose, or does it seems linked with that particular set of changes?

Regards,

Thierry


Thanks,
Peter

Reply | Threaded
Open this post in threaded view
|

Re: Strange Slice+Changes behavior

Peter Uhnak
So is this just "visual" bug, or will it break things if I save it like that?

Would you be able to reproduce it on purpose, or does it seems linked with that particular set of changes?

Well I've changed about ten packages and if I create the slice on top of any combination it looks broken. So at least to me it looks very consistent for any changes across two packages.

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Strange Slice+Changes behavior

Thierry Goubier


2015-07-07 14:53 GMT+02:00 Peter Uhnák <[hidden email]>:
So is this just "visual" bug, or will it break things if I save it like that?

I think it is just a visual bug (or something wrong in the way a slice collate the changes from its dependencies).
 

Would you be able to reproduce it on purpose, or does it seems linked with that particular set of changes?

Well I've changed about ten packages and if I create the slice on top of any combination it looks broken. So at least to me it looks very consistent for any changes across two packages.

It would be great to have a test-case, that's all (and this is a lot). It seems the bug has been around for a while.

Does anybody knows if other MC implementations (Squeak?) exhibit that bug?

Thierry
 

Peter

Reply | Threaded
Open this post in threaded view
|

Re: Strange Slice+Changes behavior

stepharo
In reply to this post by Peter Uhnak
Let us know. It would be good to see if we can reproduce it.

Stef




Le 7/7/15 14:19, Peter Uhnák a écrit :
Hi,

I'm encountering very strange slice+changes behavior and I am not sure wtf is going on...
because it's showing that there are changes in untouched code...

So imagine I've changed two packages "Spec-Core" and "Spec-Examples"

If I create a slice for the package independently, then displaying changes looks fine

Spec-Core Changes


or

Spec-Examples Changes


so far so good, but if I in the slice maker select both packages... and then check the changes this shows up

which is wtf... I didn't touch AbstractAdapter nor other classes. It's almost like it's comparing "Spec-Examples" against "Spec-Core"

If I (after creating slice for both packages) select "Spec-Core" it's complaining about removed classes... which are from "Spec-Examples"


​However "Spec-Examples" still looks just fine


What is going on? What am I missing?

This is not the first time I am making slices, but I've never encountered this.

Thanks,
Peter

Reply | Threaded
Open this post in threaded view
|

Re: Strange Slice+Changes behavior

Nicolai Hess
In reply to this post by Peter Uhnak
There is a bug on how it collects all definitions from all dependencies.

@Peter can you fix this please, it is a missing yourself in

MCWorkingCopy>>#loadRemoteDependenciesIn:

...

^ dependencies
        inject: OrderedCollection new
        into: [ :all :deps| all addAll: deps;yourself ]





2015-07-07 14:19 GMT+02:00 Peter Uhnák <[hidden email]>:
Hi,

I'm encountering very strange slice+changes behavior and I am not sure wtf is going on...
because it's showing that there are changes in untouched code...

So imagine I've changed two packages "Spec-Core" and "Spec-Examples"

If I create a slice for the package independently, then displaying changes looks fine

Spec-Core Changes


or

Spec-Examples Changes


so far so good, but if I in the slice maker select both packages... and then check the changes this shows up

which is wtf... I didn't touch AbstractAdapter nor other classes. It's almost like it's comparing "Spec-Examples" against "Spec-Core"

If I (after creating slice for both packages) select "Spec-Core" it's complaining about removed classes... which are from "Spec-Examples"


​However "Spec-Examples" still looks just fine


What is going on? What am I missing?

This is not the first time I am making slices, but I've never encountered this.

Thanks,
Peter

Reply | Threaded
Open this post in threaded view
|

Re: Strange Slice+Changes behavior

Peter Uhnak
Hi Nicolai,

I had to also do this (this is ugly and I shouldn't query class types, but maybe this should be fixed elsewhere anyway)
MCDefinitionIndex>>addAll: aCollection
aCollection
do: [ :ea | 
(ea isKindOf: OrderedCollection)
ifTrue: [ self addAll: ea ]
ifFalse: [ self add: ea ] ]

Because aCollection can now be also collection of collections.

But after both those changes it looks like a correct changeset.

Peter


On Wed, Jul 8, 2015 at 11:59 AM, Nicolai Hess <[hidden email]> wrote:
There is a bug on how it collects all definitions from all dependencies.

@Peter can you fix this please, it is a missing yourself in

MCWorkingCopy>>#loadRemoteDependenciesIn:

...

^ dependencies
        inject: OrderedCollection new
        into: [ :all :deps| all addAll: deps;yourself ]





2015-07-07 14:19 GMT+02:00 Peter Uhnák <[hidden email]>:
Hi,

I'm encountering very strange slice+changes behavior and I am not sure wtf is going on...
because it's showing that there are changes in untouched code...

So imagine I've changed two packages "Spec-Core" and "Spec-Examples"

If I create a slice for the package independently, then displaying changes looks fine

Spec-Core Changes


or

Spec-Examples Changes


so far so good, but if I in the slice maker select both packages... and then check the changes this shows up

which is wtf... I didn't touch AbstractAdapter nor other classes. It's almost like it's comparing "Spec-Examples" against "Spec-Core"

If I (after creating slice for both packages) select "Spec-Core" it's complaining about removed classes... which are from "Spec-Examples"


​However "Spec-Examples" still looks just fine


What is going on? What am I missing?

This is not the first time I am making slices, but I've never encountered this.

Thanks,
Peter


Reply | Threaded
Open this post in threaded view
|

Re: Strange Slice+Changes behavior

demarey
You can write it like that:

MCDefinitionIndex>>addAll: aCollection
aCollection flattened
do: [ :each | self add: each ]


Le 8 juil. 2015 à 12:45, Peter Uhnák a écrit :

Hi Nicolai,

I had to also do this (this is ugly and I shouldn't query class types, but maybe this should be fixed elsewhere anyway)
MCDefinitionIndex>>addAll: aCollection
aCollection
do: [ :ea | 
(ea isKindOf: OrderedCollection)
ifTrue: [ self addAll: ea ]
ifFalse: [ self add: ea ] ]

Because aCollection can now be also collection of collections.

But after both those changes it looks like a correct changeset.

Peter


On Wed, Jul 8, 2015 at 11:59 AM, Nicolai Hess <[hidden email]> wrote:
There is a bug on how it collects all definitions from all dependencies.

@Peter can you fix this please, it is a missing yourself in

MCWorkingCopy>>#loadRemoteDependenciesIn:

...

^ dependencies
        inject: OrderedCollection new
        into: [ :all :deps| all addAll: deps;yourself ]





2015-07-07 14:19 GMT+02:00 Peter Uhnák <[hidden email]>:
Hi,

I'm encountering very strange slice+changes behavior and I am not sure wtf is going on...
because it's showing that there are changes in untouched code...

So imagine I've changed two packages "Spec-Core" and "Spec-Examples"

If I create a slice for the package independently, then displaying changes looks fine

Spec-Core Changes
<2015-07-07_14:09:56.png>

or

Spec-Examples Changes
<2015-07-07_14:10:26.png>

so far so good, but if I in the slice maker select both packages... and then check the changes this shows up
<2015-07-07_14:11:02.png>
which is wtf... I didn't touch AbstractAdapter nor other classes. It's almost like it's comparing "Spec-Examples" against "Spec-Core"

If I (after creating slice for both packages) select "Spec-Core" it's complaining about removed classes... which are from "Spec-Examples"
<2015-07-07_14:11:18.png>

​However "Spec-Examples" still looks just fine
<2015-07-07_14:11:35.png>

What is going on? What am I missing?

This is not the first time I am making slices, but I've never encountered this.

Thanks,
Peter




smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Strange Slice+Changes behavior

Nicolai Hess
In reply to this post by Peter Uhnak


2015-07-08 12:45 GMT+02:00 Peter Uhnák <[hidden email]>:
Hi Nicolai,

I had to also do this (this is ugly and I shouldn't query class types, but maybe this should be fixed elsewhere anyway)
MCDefinitionIndex>>addAll: aCollection
aCollection
do: [ :ea | 
(ea isKindOf: OrderedCollection)
ifTrue: [ self addAll: ea ]
ifFalse: [ self add: ea ] ]

Because aCollection can now be also collection of collections.

Yes?

 

But after both those changes it looks like a correct changeset.

Peter


On Wed, Jul 8, 2015 at 11:59 AM, Nicolai Hess <[hidden email]> wrote:
There is a bug on how it collects all definitions from all dependencies.

@Peter can you fix this please, it is a missing yourself in

MCWorkingCopy>>#loadRemoteDependenciesIn:

...

^ dependencies
        inject: OrderedCollection new
        into: [ :all :deps| all addAll: deps;yourself ]





2015-07-07 14:19 GMT+02:00 Peter Uhnák <[hidden email]>:
Hi,

I'm encountering very strange slice+changes behavior and I am not sure wtf is going on...
because it's showing that there are changes in untouched code...

So imagine I've changed two packages "Spec-Core" and "Spec-Examples"

If I create a slice for the package independently, then displaying changes looks fine

Spec-Core Changes


or

Spec-Examples Changes


so far so good, but if I in the slice maker select both packages... and then check the changes this shows up

which is wtf... I didn't touch AbstractAdapter nor other classes. It's almost like it's comparing "Spec-Examples" against "Spec-Core"

If I (after creating slice for both packages) select "Spec-Core" it's complaining about removed classes... which are from "Spec-Examples"


​However "Spec-Examples" still looks just fine


What is going on? What am I missing?

This is not the first time I am making slices, but I've never encountered this.

Thanks,
Peter