klipse icon indicating copy to clipboard operation
klipse copied to clipboard

Klipse 7.7.1 exposes globals to window

Open polytypic opened this issue 5 years ago • 7 comments

Hmm... It seems that Klipse 7.7.1 writes its globals with minimized names to the window object. This breaks all of my Klipse based pages as they expose a few JavaScript libraries with short names like R and L to the window for the snippets to use. With 7.7.1 those names are overwritten by Klipse and the snippets no longer work. For example, the Fastener library page is broken. If you open the browser console run Object.keys(window) and inspect the result you can see the exposed globals.

polytypic avatar Dec 19 '18 06:12 polytypic

This is annoying. As far as I can see, R was also used by Klipse 7.6.9, deployed last week. Are you sure this is a new bug caused by 7.7.1, deployed today?

viebel avatar Dec 19 '18 11:12 viebel

You can try oldest Klipse version following the instructions here

viebel avatar Dec 19 '18 11:12 viebel

Are you sure this is a new bug caused by 7.7.1, deployed today?

Yesterday morning I happened to hold a presentation where I used a Klipse powered playground. This morning I noticed that the playground no longer worked (IOW, that R and other libraries exposed to the playground code snippet had been overwritten).

polytypic avatar Dec 19 '18 12:12 polytypic

OK. I will look at it further. Do yo want to use a previous version until I am fixing the bug? See https://github.com/viebel/klipse#use-older-versions

viebel avatar Dec 19 '18 12:12 viebel

Thanks! There is no hurry. I might try pinning the Klipse version this evening.

polytypic avatar Dec 19 '18 12:12 polytypic

One temporary workaround would be to use the non-minified version of Klipse.

viebel avatar Jan 10 '19 09:01 viebel

Check. FYI, I have now pinned the Klipse version to 7.6.9 in most places where I’ve used Klipse. I will likely use explicit versioning of Klipse in the future - which of course makes sense anyway.

polytypic avatar Jan 10 '19 10:01 polytypic