-
-
Notifications
You must be signed in to change notification settings - Fork 905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(runtime): use bootstrap mechanism to load globals rather than setting in the alloy.js file #964
Conversation
…ting in the alloy.js file Fixes ALOY-1734
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for taking care of this @ewanharris !
@ewanharris @jquick-axway - I know you have already merged this but I've tried using bootstrap files for assigning globals in the past and although it works when running normally, it breaks everything when running in LiveView. |
@brentonhouse, I'm not sure how it could fail. When you make a file change, LiveView invokes Titanium's undocumented But it doesn't hurt to re-test Alloy and LiveView again anyways. It's part of our smoke test anyways. |
What happens is there becomes multiple instances of modules. If you set a property on a module in alloy.js and go to read it in index.js, the property is not set as it is a clean instance of the module. |
1 similar comment
What happens is there becomes multiple instances of modules. If you set a property on a module in alloy.js and go to read it in index.js, the property is not set as it is a clean instance of the module. |
We saw this before but I think it was fixed by this #955 |
@brentonhouse I'm unaware of any issues between alloy and the boostrap mechanism, I know we've seen issues similar to what you're describing (TIMOB-27206), but that was specifically down to liveview and it's inability to handle node_modules. Do you have |
Fixes ALOY-1734
alloy.bootstrap.js
will be loaded at startup before theapp.js
, this ensures that the globals are correctly configured before theapp.js
is even executed.app.js
and set them if they don't, this should keep us compatible with SDKs pre-7.5.0 (i.e. those without the bootstrap feature, if you're using an SDK that old ... please, please, please update ASAP)Test steps - see jira