From 62c5f8ef6ec1562c945fb8052057f83ff56c7789 Mon Sep 17 00:00:00 2001 From: WenzDaniel Date: Mon, 20 Nov 2023 07:22:49 -0600 Subject: [PATCH] Add warning --- strax/context.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/strax/context.py b/strax/context.py index 5b69ba13a..ae8ad0038 100644 --- a/strax/context.py +++ b/strax/context.py @@ -340,10 +340,13 @@ def register(self, plugin_class): # If we booted a plugin from a datatype, we must boot it from other # datatypes it makes too, to preserve a one-to-one mapping between # datatypes and registered plugins. - for old_plugin in deregistered: + for old_plugin in set(deregistered): for d in old_plugin.provides: currently_registered = self._plugin_class_registry.get(d) if old_plugin == currently_registered: + # Must be equal here, because we are only looking for the remanants which were + # not overwritten above. + warnings.warn(f'Provides of multi-output plugins overlap dregister plugin {old_plugin}.') del self._plugin_class_registry[d] already_seen = []