https://bugzilla.wikimedia.org/show_bug.cgi?id=35240

Lupo <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Lupo <[email protected]> 2012-04-27 09:11:09 UTC ---
Actually, I think the mw.loader state machine is missing several transitions:

Currently, handlePending() only executes modules and jobs if all their
dependencies are "ready". If any dependency is in any other state, including
state "error" or "missing", nothing happens.

Furthermore, I think mw.loader.using ahould throw an error if any dependency
given is in state "error" or "missing".

mw.loader.load should probably not only filter out undefined modules, but also
any module where either the module itself or a (direct or indirect) dependency
is in state "error" or "missing".

Also, I wonder if modules and jobs could not be unified, insofar as a module
might register a job that would then run execute(). That would allow
handlePending() to care only about jobs.

mw.loader.state needs to invoke handlePending() for any state change to a state
after "loaded" (i.e., to ready, error, or missing). handlePending() itself
should probably also check for jobs (and modules, currently) where any
dependency is in state "error" or "missing", and treat the job/module as failed
then. Note that this would mean that error stati would propagate up the
dependency tree, which they currently don't. This means that modules depending
(directly or indirectly) on failed modules will now also be considered to be in
state "error". Currently, they just remain in limbo ("loaded") forever; they'll
never progress to one of the final states (ready, error, or missing).

If we can agree on what exactly should be done, I could tackle this. Would
nicely complement bug 32537.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to