You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a plugin, or two plugins in conjunction, contributes two service offers that have the same protocol but different factory, then I'd expect this to be at least a warning, or possibly an error, to the maintainer of a plugin manager. This is because it is ambiguous which of factory1 or factory2 would have been used when one obtains a service via application.get_service(SomeClass), so this likely indicates programming errors or oversights.
Currently no such warnings or errors would occur.
(Sorry for a somewhat curt description as I did not want this observation to go unreported.)
The text was updated successfully, but these errors were encountered:
@mdickinson For awareness, this issue is tangentially related to the awkwardness with having to subclass (say the SomeClass here) just to offer two services of the same type but used for different purposes.
kitchoi
changed the title
No complaint if two distinct ServiceOffer for the same protocol are contributed
No complaint while obtaining a service from multiple services involves ambiguity
May 12, 2021
If a plugin, or two plugins in conjunction, contributes two service offers that have the same protocol but different factory, then I'd expect this to be at least a warning, or possibly an error, to the maintainer of a plugin manager. This is because it is ambiguous which of
factory1
orfactory2
would have been used when one obtains a service viaapplication.get_service(SomeClass)
, so this likely indicates programming errors or oversights.Currently no such warnings or errors would occur.
(Sorry for a somewhat curt description as I did not want this observation to go unreported.)
The text was updated successfully, but these errors were encountered: