Re: Standalone compile never leaves closing open stacks
Posted: Wed Nov 18, 2020 10:33 pm
It was an intentional change so there's no reason to send a report to LC. There was a discussion on the mailing list about it, here is what I saved:
The standalone builder has always needed to close the stacks it builds for reasons pretty deeply ingrained in the code. However this causes a few problems, for example:
values in script locals become empty
behaviors are broken when the parent script is on / in a stack which closes
As an attempt to improve this situation, the code that locks messages when closing and opening stacks for standalone builds has been removed. This means that where previously mainstacks would not receive openStack and closeStack messages during standalone build, they now do.
If this causes problems for your stack, you can exit from the handler if standalone building is in progress:
if the environment is "development" AND there is a stack
"revStandaloneProgress" AND the mode of stack
"revStandaloneProgress" > 0 then
All stack-related messages need to use this: preOpen*, open*, close*, etc.
So you could write a function:
return the environment is "development" AND \
there is a stack "revStandaloneProgress" AND \
the mode of stack "revStandaloneProgress" > 0
and then in e.g. the openstack handler:
if isBuildingStandalone() then
Similar in all other (pre)open*/close* messages.