Failing #obsoleteClasses test
I spent a couple of hours trying to find out why the #obsoleteClasses test sporadically fails. Iâve found one candidate that fixes all the failures that I could produces. Simply put, any test that does something AST related (e.g. runs critics) *has to* reset the ASTCache during #tearDown: ASTCache reset. Iâve found two test classes that needed to be adapted: SmalllintManifestCheckerTest and VSReleaseDevelopmentVersionCommandTest. Issue with slice: https://pharo.fogbugz.com/f/cases/14375/Random-obsoleteClasses-test-failures <https://pharo.fogbugz.com/f/cases/14375/Random-obsoleteClasses-test-failures> Cheers, Max
Hi Max, could the cache be reimplemented using WeakArray? Stuff like this is a drag. eg in Squeak the Windows menu holds onto all the windows that were open when last the menu was opened. So to get a window reclaimed after being closed if you opened the Windows menu you have to open it again. I must fix that. Eliot (phone) On Nov 2, 2014, at 8:43 AM, Max Leske <maxleske@gmail.com> wrote:
I spent a couple of hours trying to find out why the #obsoleteClasses test sporadically fails. Iâve found one candidate that fixes all the failures that I could produces. Simply put, any test that does something AST related (e.g. runs critics) *has to* reset the ASTCache during #tearDown:
ASTCache reset.
Iâve found two test classes that needed to be adapted: SmalllintManifestCheckerTest and VSReleaseDevelopmentVersionCommandTest.
Issue with slice: https://pharo.fogbugz.com/f/cases/14375/Random-obsoleteClasses-test-failures
Cheers, Max
On 02.11.2014, at 18:28, Eliot Miranda <eliot.miranda@gmail.com> wrote:
Hi Max,
could the cache be reimplemented using WeakArray? Stuff like this is a drag. eg in Squeak the Windows menu holds onto all the windows that were open when last the menu was opened. So to get a window reclaimed after being closed if you opened the Windows menu you have to open it again. I must fix that.
No idea. I really didnât look at what it does, I just tracked pointers ;) But yes, maybe that would be a good idea. Adding âASTCache reset.â all over the place is not really a good strategy. Iâll send a copy of this message to Marcus and Clément; I suspect they might know more about the AST stuff. Cheers, Max
Eliot (phone)
On Nov 2, 2014, at 8:43 AM, Max Leske <maxleske@gmail.com <mailto:maxleske@gmail.com>> wrote:
I spent a couple of hours trying to find out why the #obsoleteClasses test sporadically fails. Iâve found one candidate that fixes all the failures that I could produces. Simply put, any test that does something AST related (e.g. runs critics) *has to* reset the ASTCache during #tearDown:
ASTCache reset.
Iâve found two test classes that needed to be adapted: SmalllintManifestCheckerTest and VSReleaseDevelopmentVersionCommandTest.
Issue with slice: https://pharo.fogbugz.com/f/cases/14375/Random-obsoleteClasses-test-failures <https://pharo.fogbugz.com/f/cases/14375/Random-obsoleteClasses-test-failures>
Cheers, Max
On 02 Nov 2014, at 19:39, Max Leske <maxleske@gmail.com> wrote:
On 02.11.2014, at 18:28, Eliot Miranda <eliot.miranda@gmail.com <mailto:eliot.miranda@gmail.com>> wrote:
Hi Max,
could the cache be reimplemented using WeakArray? Stuff like this is a drag. eg in Squeak the Windows menu holds onto all the windows that were open when last the menu was opened. So to get a window reclaimed after being closed if you opened the Windows menu you have to open it again. I must fix that.
No idea. I really didnât look at what it does, I just tracked pointers ;)
But yes, maybe that would be a good idea. Adding âASTCache reset.â all over the place is not really a good strategy.
Iâll send a copy of this message to Marcus and Clément; I suspect they might know more about the AST stuff.
Yes⦠I am not happy with the AST cache as it is now. for one, yes, it might hold on to things. And it can get large. So we definitely need to have a look. (I am actually amazed how well it works till now⦠;-) ). Marcus
Max Leske wrote:
I spent a couple of hours trying to find out why the #obsoleteClasses test sporadically fails. Iâve found one candidate that fixes all the failures that I could produces. Simply put, any test that does something AST related (e.g. runs critics) *has to* reset the ASTCache during #tearDown:
ASTCache reset.
Iâve found two test classes that needed to be adapted: SmalllintManifestCheckerTest and VSReleaseDevelopmentVersionCommandTest.
Issue with slice: https://pharo.fogbugz.com/f/cases/14375/Random-obsoleteClasses-test-failures
Cheers, Max
nice find.
participants (4)
-
Ben Coman -
Eliot Miranda -
Marcus Denker -
Max Leske