-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Decorations not propagated to sibling plugins #2727
Comments
Why is this not an issue of lout needing to wait for vision to load? You are seeing it now because vision is not built in anymore but this isn't new. Before it was still the same problem. You need to wait for after event when vision is loaded. I am not saying that's the only issue here but that it's not just a matter of supporting random order. |
I am. New Plugin instances are provided to each register, they don't share the same |
To be even more explicit, I think we should have a similar loop as this one before calling the dependency callback. |
@hueniverse do you want a PR doing what I suggested in OP ? |
Nah. I need to do a deeper fix. |
Wow, that was simpler than I expected :) |
That commit is sort of delightful. |
There are some dark corner of this code base :-) |
Credits go to @jedireza for finding this one.
Registration order has an impact on decorations access, regardless of the use of
server.dependency
.For exemple calling
server.views
with[Vision, Lout]
will work,[Lout, Vision]
won't :TypeError: Object [object Object] has no method 'views'
.Decorations are only copied on the initialization of the plugins, so while the server.root is always aware of those decorations, this line will not be propagate the decorators to others.
It seems I have 2 choices here :
server.root.*
Willing to make a PR if that's the 2nd case.
The text was updated successfully, but these errors were encountered: