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

Raise a warning if multiple plugins exist with same name #292

Closed
anders-kiaer opened this issue Sep 14, 2020 · 0 comments · Fixed by #333
Closed

Raise a warning if multiple plugins exist with same name #292

anders-kiaer opened this issue Sep 14, 2020 · 0 comments · Fixed by #333
Labels
enhancement 🚀 New feature or request good first issue Good for newcomers

Comments

@anders-kiaer
Copy link
Collaborator

Since we are a plugin framework, there might be plugin projects creating plugins with the same name.

Raise a warning during runtime to give attention to name conflict. This could be done in

for entry_point in entry_points().get("webviz_config_plugins", []):
globals()[entry_point.name] = entry_point.load()
__all__.append(entry_point.name)

by simply checking if a plugin with name is already in __all__.

The warning should probably include package name of both plugins in order to make it easy for the user to understand where they come from (one way of getting package name from the plugin reference is to use inspect from std.lib).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🚀 New feature or request good first issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant