Skip to content
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

Global variables set by one plugin can be overwritten by a second plugin #302

Open
tradzik opened this issue Dec 27, 2016 · 5 comments
Open

Comments

@tradzik
Copy link
Contributor

tradzik commented Dec 27, 2016

https://github.com/walterbender/turtleblocksjs/blob/master/js/utils.js#L413

With currently implemented solution, different plugins can overwrite previously set variables with the same name. There is no validation, if global variable with specified name already exists. It can lead to plugins' malfunctioning. Maybe we should implement some kind of validation or make strict naming convention for globals set in plugins?

@articuno12
Copy link

what needs to be done if global variable with specified name already exists?

@walterbender
Copy link
Member

We should perhaps manage this by convention: a three-letter prefix for each plugin used for its globals and internal block names (which also can collide).

@walterbender walterbender added this to the GCI 2017 milestone Sep 27, 2017
@sanatankc
Copy link
Contributor

Can't we namespace them internally?

@walterbender
Copy link
Member

probably, yes.

@sanatankc
Copy link
Contributor

I'll look into this issue and see if I can I fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants