-
Notifications
You must be signed in to change notification settings - Fork 311
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
feature: Dependency consistency of init()? #283
Comments
If not doable, then possibly a clarification doc over |
|
My code is a bit involved on this to extract it out, but I can explain. I have a colorscheme plugin B. In B's This is one situation that involves colorschemes, but the general case doesn't have to. |
That implicitly already explains "there's So, there's some doc already on this, it's just not blatantly obvious. I still though, wonder whether this could be a doable feature, to change from "always called during startup, before even loading start plugins" to "always called just before the associated plugin loads". |
I still don't understand it, however |
I can't do it in plugin A's |
ig it should be possible to do it in the config of plugin B and then load the plugin in the |
then you have some sort of circular dependency. not possible |
I don't see how it's circular, it's just that initialization of A depends on B loading process to have been finished. One can easily expect that from a dependency. The current state of things is that isn't the case, initialization of A can only rely partially on B loading process (specifically, just its |
A I said before, |
|
And I know what it is now and I have answered on that already here (#283 (comment)). I'll cease my case as I can notice you're getting stressed. |
Just an addition pertaining this topic that I forgot to make it clearer. A loading order limitation not associated with When one sets A depending on B, they may expect to rely on B's I discussed it already, but wasn't explicit as I came here focused on covering |
Did you check the docs?
Is your feature request related to a problem? Please describe.
I have a plugin A whose dependencies is plugin B. In A's
init()
code, I wish I could rely on B to have been fully loaded.Why?
Because B is a dependencies, so one may expect that, given B is a dependency of A, then one may write code that relies on B's
config()
inside A'sinit()
, for example. A'sinit()
depends on B ('sinit()
/source/load/config()
).Describe the solution you'd like
init()
might be a code that runs just before a plugin is loaded, after all its deps have been fully loaded (which includes theirinit()
/sourcing/loading/config()
).Notice that I'm just considering simple plugin relations without thinking about circular deps.
Describe alternatives you've considered
None. I'm still struggling how I'd circumvent this in an alternative way with a plugin dep I have in my setup.
Additional context
No response
The text was updated successfully, but these errors were encountered: