Versions of modules (such as Layout.js) #6206
Replies: 1 comment
-
Posted at 2023-09-13 by @gfwilliams Ahh, thanks - yes, it looks like a PR went in but they never updated the minified version :(I've just updated it.
What happened was the compiler ran but it added some polyfills (which we didn't want) which caused minify.js to fail. Should be ok now Posted at 2023-09-13 by tev Thanks! That seems to work. Darn, I had a back-of-the-mind thought about trying the offline compiler but really didn't expect it to change anything. Looks like I was wrong. Should we update Posted at 2023-09-14 by @gfwilliams Ok, thanks - yes, doing |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2023-09-12 by tev
I'm having some confusion regarding the Layout library: I suspect the version of the code in the current emulator and my Bangle.js device does not match what I see in
master
on GitHub, and I'm not clear on how versioning works. The docs seem to say that the current version of modules are supposed to be automatically loaded from the app loader, but I seem to still have a version of Layout.js that is almost a year old despite having used my fork of the development app loader definitely much more recently than this.Then I happened to notice in the BangleApps repo that there is a Layout.js and a Layout.min.js file, and the latter is several months older than the former, the former containing the functionality I was looking for but in fact I'm guessing the older minified version is in fact the version that is actually getting deployed. I can confirm this by manually installing the non-minified version into the IDE emulator under a different name (different because apparently if I use “Layout” the built-in version still takes precedence), and I see that the specific behavior of the newer code then works.
Assuming someone simply forgot to update the minified files when making changes, I was going to use EspruinoDocs/bin/minify.js to update the minified modules and PR the update, but I can't get the minifier to work for Layout.js (though I've successfully used it for other files). I get errors I don't really understand; I guess the script doesn't understand the result from the Closure compiler. I've attached the full output log of the minify script.
If anyone could shed some light on how this works or let me know if I'm barking up the wrong tree somewhere that would be great.
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions