nanit icon indicating copy to clipboard operation
nanit copied to clipboard

Feature request: Determine the load sequence of initializers or finalizers

Open kokujin opened this issue 8 years ago • 3 comments

It would be nice to be able to determine the load sequence of the config files. Take the case of inter-dependencies between configurations.

kokujin avatar Mar 24 '16 06:03 kokujin

I'd be interested in hearing about some scenarios where this is needed. I haven't run into this, personally, so the feature was never on my mind.

I've seen other initializer systems do this, though, and never liked the API they created for it. If this is something that nanit needs, we'll want to make sure we get the API right both for readability and for flexibility with other features.

mxriverlynn avatar Mar 24 '16 13:03 mxriverlynn

I think just being explicit about how it works is sufficient. So to be extra safe I just added a sort() and noted that the loaders will run alphabetically in the documentation. This way if there are scenarios where running things in order is needed -- somebody can just name files like 01_run_this_first.js and rely on that.

datapimp avatar Jun 13 '16 04:06 datapimp

( it probably already works this way )

datapimp avatar Jun 13 '16 04:06 datapimp