[7.7.1 Bug] renaming a pundle changes ALL pundles of the system

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

[7.7.1 Bug] renaming a pundle changes ALL pundles of the system

Christian Haider
Steps to reproduce:
1. take an image which has reconciled packages and bundles in some store.
2. rename any package or bundle
 
==> ALL packages and bundles are changed!
The property #disregardedPrerequisites was added with an empty array
 
THIS IS NOT FUNNY
I started the day with some nice coding in mind and than this annoyance was forced onto me.
Now I have to spend time on fixing this :-(
 
 
Problem:
when renaming a pundle, all pundles of the system are asked to change their prerequisites (in [PackageCategories] Store.PundleAccess>>renamePundle:to:).
This method ([PackageCategories] CodeComponent>>changePrerequisite:nameTo:) sets the property #disregardedPrerequisites in any case.
 
Solution:
dont set the property if it has not changed.
 
Fix:
fixed CodeComponent>>disregardedPrerequisites: attached as fileOut
 
Clean-up (if you already ran into that and cannot discard the image):
"remove the property if it is empty"
Store.Registry allPundles do: [:codeComponent |
 (codeComponent propertyAt: #disregardedPrerequisites) ifNotNil: [:array |
  array isEmpty ifTrue: [
   codeComponent propertyAt: #disregardedPrerequisites put: nil]]]
 
and then reconcile everything.
Or remove the change from the change sets with the following (This is NOT a good idea - use with care):
"remove the change from the change set if #disregardedPrerequisites is nil"
"If #disregardedPrerequisites was changed to nil rightfully, you will loose that change!"
Store.Registry allPundles do: [:pundleModel |
 (pundleModel propertyAt: #disregardedPrerequisites) ifNil: [
  pundleModel changeSetsDo: [:changeSet |
   changeSet properties remove: #disregardedPrerequisites ifAbsent: nil]]]
 
 
 
You may consider this advice (sorry but I am still fuming):
If an attribute has no value but a default, then NEVER put the default explicitly into the attribute!
 
 
cheers,
    Christian

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

CodeComponent-disregardedPrerequisites.st (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [7.7.1 Bug] renaming a pundle changes ALL pundles of thesystem

Boris Popov, DeepCove Labs (SNN)
This isn't to do with the problem itself, but often when something like this happens it's far easier to use the change set to recover to the point just prior to where things go wrong and continue working from there.

-Boris (via BlackBerry)


From: [hidden email] <[hidden email]>
To: [hidden email] <[hidden email]>
Sent: Sat Oct 09 02:29:41 2010
Subject: [vwnc] [7.7.1 Bug] renaming a pundle changes ALL pundles of thesystem

Steps to reproduce:
1. take an image which has reconciled packages and bundles in some store.
2. rename any package or bundle
 
==> ALL packages and bundles are changed!
The property #disregardedPrerequisites was added with an empty array
 
THIS IS NOT FUNNY
I started the day with some nice coding in mind and than this annoyance was forced onto me.
Now I have to spend time on fixing this :-(
 
 
Problem:
when renaming a pundle, all pundles of the system are asked to change their prerequisites (in [PackageCategories] Store.PundleAccess>>renamePundle:to:).
This method ([PackageCategories] CodeComponent>>changePrerequisite:nameTo:) sets the property #disregardedPrerequisites in any case.
 
Solution:
dont set the property if it has not changed.
 
Fix:
fixed CodeComponent>>disregardedPrerequisites: attached as fileOut
 
Clean-up (if you already ran into that and cannot discard the image):
"remove the property if it is empty"
Store.Registry allPundles do: [:codeComponent |
 (codeComponent propertyAt: #disregardedPrerequisites) ifNotNil: [:array |
  array isEmpty ifTrue: [
   codeComponent propertyAt: #disregardedPrerequisites put: nil]]]
 
and then reconcile everything.
Or remove the change from the change sets with the following (This is NOT a good idea - use with care):
"remove the change from the change set if #disregardedPrerequisites is nil"
"If #disregardedPrerequisites was changed to nil rightfully, you will loose that change!"
Store.Registry allPundles do: [:pundleModel |
 (pundleModel propertyAt: #disregardedPrerequisites) ifNil: [
  pundleModel changeSetsDo: [:changeSet |
   changeSet properties remove: #disregardedPrerequisites ifAbsent: nil]]]
 
 
 
You may consider this advice (sorry but I am still fuming):
If an attribute has no value but a default, then NEVER put the default explicitly into the attribute!
 
 
cheers,
    Christian

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [7.7.1 Bug] renaming a pundle changes ALL pundles of thesystem

Christian Haider
if you have a saved image with the prior state...
 
Christian


Von: Boris Popov, DeepCove Labs [mailto:[hidden email]]
Gesendet: Samstag, 9. Oktober 2010 13:00
An: Christian Haider; [hidden email]
Betreff: Re: [vwnc] [7.7.1 Bug] renaming a pundle changes ALL pundles of thesystem

This isn't to do with the problem itself, but often when something like this happens it's far easier to use the change set to recover to the point just prior to where things go wrong and continue working from there.

-Boris (via BlackBerry)


From: [hidden email] <[hidden email]>
To: [hidden email] <[hidden email]>
Sent: Sat Oct 09 02:29:41 2010
Subject: [vwnc] [7.7.1 Bug] renaming a pundle changes ALL pundles of thesystem

Steps to reproduce:
1. take an image which has reconciled packages and bundles in some store.
2. rename any package or bundle
 
==> ALL packages and bundles are changed!
The property #disregardedPrerequisites was added with an empty array
 
THIS IS NOT FUNNY
I started the day with some nice coding in mind and than this annoyance was forced onto me.
Now I have to spend time on fixing this :-(
 
 
Problem:
when renaming a pundle, all pundles of the system are asked to change their prerequisites (in [PackageCategories] Store.PundleAccess>>renamePundle:to:).
This method ([PackageCategories] CodeComponent>>changePrerequisite:nameTo:) sets the property #disregardedPrerequisites in any case.
 
Solution:
dont set the property if it has not changed.
 
Fix:
fixed CodeComponent>>disregardedPrerequisites: attached as fileOut
 
Clean-up (if you already ran into that and cannot discard the image):
"remove the property if it is empty"
Store.Registry allPundles do: [:codeComponent |
 (codeComponent propertyAt: #disregardedPrerequisites) ifNotNil: [:array |
  array isEmpty ifTrue: [
   codeComponent propertyAt: #disregardedPrerequisites put: nil]]]
 
and then reconcile everything.
Or remove the change from the change sets with the following (This is NOT a good idea - use with care):
"remove the change from the change set if #disregardedPrerequisites is nil"
"If #disregardedPrerequisites was changed to nil rightfully, you will loose that change!"
Store.Registry allPundles do: [:pundleModel |
 (pundleModel propertyAt: #disregardedPrerequisites) ifNil: [
  pundleModel changeSetsDo: [:changeSet |
   changeSet properties remove: #disregardedPrerequisites ifAbsent: nil]]]
 
 
 
You may consider this advice (sorry but I am still fuming):
If an attribute has no value but a default, then NEVER put the default explicitly into the attribute!
 
 
cheers,
    Christian

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [7.7.1 Bug] renaming a pundle changes ALL pundles of thesystem

Boris Popov, DeepCove Labs (SNN)
In reply to this post by Boris Popov, DeepCove Labs (SNN)
You *always* have a saved image + cha file :)

-Boris (via BlackBerry)


From: Christian Haider <[hidden email]>
To: Boris Popov, DeepCove Labs; [hidden email] <[hidden email]>
Sent: Sat Oct 09 04:34:37 2010
Subject: AW: [vwnc] [7.7.1 Bug] renaming a pundle changes ALL pundles of thesystem

if you have a saved image with the prior state...
 
Christian


Von: Boris Popov, DeepCove Labs [mailto:[hidden email]]
Gesendet: Samstag, 9. Oktober 2010 13:00
An: Christian Haider; [hidden email]
Betreff: Re: [vwnc] [7.7.1 Bug] renaming a pundle changes ALL pundles of thesystem

This isn't to do with the problem itself, but often when something like this happens it's far easier to use the change set to recover to the point just prior to where things go wrong and continue working from there.

-Boris (via BlackBerry)


From: [hidden email] <[hidden email]>
To: [hidden email] <[hidden email]>
Sent: Sat Oct 09 02:29:41 2010
Subject: [vwnc] [7.7.1 Bug] renaming a pundle changes ALL pundles of thesystem

Steps to reproduce:
1. take an image which has reconciled packages and bundles in some store.
2. rename any package or bundle
 
==> ALL packages and bundles are changed!
The property #disregardedPrerequisites was added with an empty array
 
THIS IS NOT FUNNY
I started the day with some nice coding in mind and than this annoyance was forced onto me.
Now I have to spend time on fixing this :-(
 
 
Problem:
when renaming a pundle, all pundles of the system are asked to change their prerequisites (in [PackageCategories] Store.PundleAccess>>renamePundle:to:).
This method ([PackageCategories] CodeComponent>>changePrerequisite:nameTo:) sets the property #disregardedPrerequisites in any case.
 
Solution:
dont set the property if it has not changed.
 
Fix:
fixed CodeComponent>>disregardedPrerequisites: attached as fileOut
 
Clean-up (if you already ran into that and cannot discard the image):
"remove the property if it is empty"
Store.Registry allPundles do: [:codeComponent |
 (codeComponent propertyAt: #disregardedPrerequisites) ifNotNil: [:array |
  array isEmpty ifTrue: [
   codeComponent propertyAt: #disregardedPrerequisites put: nil]]]
 
and then reconcile everything.
Or remove the change from the change sets with the following (This is NOT a good idea - use with care):
"remove the change from the change set if #disregardedPrerequisites is nil"
"If #disregardedPrerequisites was changed to nil rightfully, you will loose that change!"
Store.Registry allPundles do: [:pundleModel |
 (pundleModel propertyAt: #disregardedPrerequisites) ifNil: [
  pundleModel changeSetsDo: [:changeSet |
   changeSet properties remove: #disregardedPrerequisites ifAbsent: nil]]]
 
 
 
You may consider this advice (sorry but I am still fuming):
If an attribute has no value but a default, then NEVER put the default explicitly into the attribute!
 
 
cheers,
    Christian

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc