mirror of
https://github.com/flynx/features.js.git
synced 2025-10-29 18:30:11 +00:00
preparing to rework the dependency sort algorithm...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
ee02552a00
commit
a20533a604
29
features.js
29
features.js
@ -18,6 +18,35 @@ var args2array = function(a){ return [].slice.call(a) }
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************/
|
||||||
|
// XXX featuere dependency sorting (C3-variant):
|
||||||
|
// Requirements:
|
||||||
|
// - feature must be loaded strictly *after* all of it's
|
||||||
|
// dependencies
|
||||||
|
// - feature depending on an inapplicable feature is also
|
||||||
|
// inapplicable (recursive up)
|
||||||
|
// - inapplicable features are not loaded (silent)
|
||||||
|
// - missing dependency
|
||||||
|
// -> missing dependency error
|
||||||
|
// - suggested features (and their dependencies) do not produce
|
||||||
|
// dependency errors
|
||||||
|
// ...unless explicitly included in dependency graph
|
||||||
|
// - features with the same exclusive tag are grouped into an
|
||||||
|
// exclusive set
|
||||||
|
// - only the first feature in an exclusive set is loaded, the
|
||||||
|
// rest are *excluded*
|
||||||
|
// Q: are excluded features the same as unapplicable???
|
||||||
|
// A: think yes...
|
||||||
|
// - exclusive tag can be used to reference (alias) the loaded
|
||||||
|
// feature in exclusive set
|
||||||
|
// -> exclusive tag can be used as a dependency
|
||||||
|
// - priority???
|
||||||
|
// in current implementation the priority is used for the
|
||||||
|
// initial sort (pre-dep.)
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
//
|
//
|
||||||
// Feature attributes:
|
// Feature attributes:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user