Andy/Blair,
When I deploy a runtime one of the errors in the log is as follows: <!-- Notification: Uninstalling package 'SUnitBrowser Improvements' --> <!-- CompilerErrorNotification: Error: TestResult>>exceptions at line 2: undeclared 'exceptions' --> When I manually uninstall this package there is a beep that sounds like an error report (similar to the deployment, but without the log). Package>>privateUninstall does an uninstall of Globals, Classes, then Methods. It seems to me that this is conceptually backwards. Deleting globals before deleting classes that reference those globals seems likely to provoke an error. Deleting classes before deleting methods that reference those classes seems likely to provoke an error. I've modified my image to do the uninstall in the reverse order (Methods, Classes, then Globals), and then the deployment does not report that error. I can't think of anything that this would break, but I've not looked very far into it. Comments? James Foster |
This is a bit more complex than I thought... It seems that a class
unintialize method might want to call a method that has been removed. For example, with my proposed "fix" I now get an error when removing StsPackageManager. It seems like the correct solution would require greater sophistication on the part of initialize/uninitialize processing. Perhaps the class install/uninstall methods should really be part of the Package scripts since there is a finer granularity there (pre-install; post-install; pre-uninstall; post-uninstall). James "James Foster" <[hidden email]> wrote in message news:[hidden email]... > Andy/Blair, > > When I deploy a runtime one of the errors in the log is as follows: > > <!-- Notification: Uninstalling package 'SUnitBrowser Improvements' --> > <!-- CompilerErrorNotification: Error: TestResult>>exceptions at line 2: > undeclared 'exceptions' --> > > When I manually uninstall this package there is a beep that sounds like an > error report (similar to the deployment, but without the log). > > Package>>privateUninstall does an uninstall of Globals, Classes, then > Methods. It seems to me that this is conceptually backwards. Deleting > globals before deleting classes that reference those globals seems likely > to provoke an error. Deleting classes before deleting methods that > reference those classes seems likely to provoke an error. > > I've modified my image to do the uninstall in the reverse order (Methods, > Classes, then Globals), and then the deployment does not report that > error. I can't think of anything that this would break, but I've not > looked very far into it. > > Comments? > > James Foster > |
In reply to this post by James Foster-3
"James Foster" <[hidden email]> wrote in message
news:[hidden email]... > Andy/Blair, > > When I deploy a runtime one of the errors in the log is as follows: > > <!-- Notification: Uninstalling package 'SUnitBrowser Improvements' --> > <!-- CompilerErrorNotification: Error: TestResult>>exceptions at line 2: > undeclared 'exceptions' --> > > When I manually uninstall this package there is a beep that sounds like an > error report (similar to the deployment, but without the log). > > Package>>privateUninstall does an uninstall of Globals, Classes, then > Methods. It seems to me that this is conceptually backwards. Deleting > globals before deleting classes that reference those globals seems likely > to provoke an error. Deleting classes before deleting methods that > reference those classes seems likely to provoke an error. Uninstalling the globals removes them from the system dictionary, but any methods compiled against them will still hold a reference to the variable binding, so they will still work. > > I've modified my image to do the uninstall in the reverse order (Methods, > Classes, then Globals), and then the deployment does not report that > error. I can't think of anything that this would break, but I've not > looked very far into it. The current uninstall order is (perhaps perversely) the one that makes most sense. Globals can be removed without doing any damage (except to code which does a lookup by name, which is very unusual). The loose methods need to be left in place in case they are required for class uninitialisation. Deletion of the classes before the methods should not normally cause issues, as the methods are passively uninstalled, unlike the active involvement of the classes. You might potentially get a problem at class uinstall time if a loose method is invoked that references a previously uninstalled. > > Comments? > Don't agree there is any kind of bug here - except in the 'SUnitBrowser Improvements' package you mention. I'm not familiar with it (it is not one we ship), but it sounds as though it has uninstall issues that need correcting. It is not possible for the system to be safe against errors during the uninstall process because the package author has complete freedom in how they write class uninitialise methods, and the package uninstall scripts. These do have to be written to avoid creating order dependencies. Regards Blair |
Blair,
Thanks for the response. Your explanation makes a lot of sense. I agree that there isn't a bug here. James "Blair McGlashan" <[hidden email]> wrote in message news:[hidden email]... > "James Foster" <[hidden email]> wrote in message > news:[hidden email]... >> Andy/Blair, >> >> When I deploy a runtime one of the errors in the log is as follows: >> >> <!-- Notification: Uninstalling package 'SUnitBrowser >> provements' --> >> <!-- CompilerErrorNotification: Error: TestResult>>exceptions at line 2: >> undeclared 'exceptions' --> >> >> When I manually uninstall this package there is a beep that sounds like >> an error report (similar to the deployment, but without the log). >> >> Package>>privateUninstall does an uninstall of Globals, Classes, then >> Methods. It seems to me that this is conceptually backwards. Deleting >> globals before deleting classes that reference those globals seems likely >> to provoke an error. Deleting classes before deleting methods that >> reference those classes seems likely to provoke an error. > > Uninstalling the globals removes them from the system dictionary, but any > methods compiled against them will still hold a reference to the variable > binding, so they will still work. >> >> I've modified my image to do the uninstall in the reverse order (Methods, >> Classes, then Globals), and then the deployment does not report that >> error. I can't think of anything that this would break, but I've not >> looked very far into it. > > The current uninstall order is (perhaps perversely) the one that makes > most sense. Globals can be removed without doing any damage (except to > code which does a lookup by name, which is very unusual). The loose > methods need to be left in place in case they are required for class > uninitialisation. Deletion of the classes before the methods should not > normally cause issues, as the methods are passively uninstalled, unlike > the active involvement of the classes. You might potentially get a problem > at class uinstall time if a loose method is invoked that references a > previously uninstalled. > >> >> Comments? >> > > Don't agree there is any kind of bug here - except in the 'SUnitBrowser > Improvements' package you mention. I'm not familiar with it (it is not one > we ship), but it sounds as though it has uninstall issues that need > correcting. It is not possible for the system to be safe against errors > during the uninstall process because the package author has complete > freedom in how they write class uninitialise methods, and the package > uninstall scripts. These do have to be written to avoid creating order > dependencies. > > Regards > > Blair > |
In reply to this post by Blair McGlashan-4
> Don't agree there is any kind of bug here - except in the 'SUnitBrowser
> Improvements' package you mention. I'm not familiar with it (it is not one > we ship), but it sounds as though it has uninstall issues that need > correcting. Again this is one of mine from Intelli-Dolphin - it modifies SUnit so that it keeps failing errors in TestResults so that the SUnitBrowser can display what the problem is. The real solution (and I sumbitted a request to Jospeh for Sunit) is to roll this change into the main Sunit (although then there is a problem that Dolphin ships with Sunit and so it would need to upgrade as well). However, I can't imagine that its that hard to sort out the uninstall criterian (although it might require you to close down the SUnit browser). Tim |
Free forum by Nabble | Edit this page |