I guess the topic of Meteor forcing execution order heuristics on its users instead of providing import
semantics has been discussed to death already.
Nevertheless, I think there should at the very least be a way to make 100% sure that a certain set of scripts can be run before everything else. From what I understand, since the load order heuristic goes depth-first over everything else (even if you have multiple lib
folders in different places, the ones at a greater depth are run first for some reason), there is basically no way to ensure that some scripts are executed before everything else, no matter how deep it goes, unless you put it in a package.
Is that correct? And is there anything to be expected to remedy the situation in an upcoming release?
For now, I am considering writing a little load-order-util
package that at the very least allows deferring execution of a callback until startup
and after a given set of globally defined symbols are ready, like so:
Global.dependsOnSymbols = function(symbolNameOrNames, cb) { ... };
Any better suggestions?