[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Sc-devel] BUG: Quark:dependencies



dependencies { |recursive = false, knownList|
var deps, quark, selfasdep;
deps = dependencies;
if(recursive, {
if(knownList.isNil.not, {
deps = dependencies.select({|d| knownList.indexOfEqual(d).isNil}); // To avoid infinite recursion traps
});
deps.do({|dep|
quark = dep.asQuark(parent);
deps = deps ++ quark.dependencies(recursive: true, knownList: ([QuarkDependency(name, version)] ++ knownList));

^^^ It can die right here because sometimes dep.asQuark returns nil.

});
});
^deps
}

I suggest this.

dependencies { |recursive = false, knownList|
var deps, quark, selfasdep;
deps = dependencies;
if(recursive, {
if(knownList.isNil.not, {
deps = dependencies.select({|d| knownList.indexOfEqual(d).isNil}); // To avoid infinite recursion traps
});
deps.do({|dep|
quark = dep.asQuark(parent);
if(quark.notNil) {
deps = deps ++ quark.dependencies(recursive: true, knownList: ([QuarkDependency(name, version)] ++ knownList));
};
});
});
^deps
}

Let's make sure this goes into the next RC. OK to commit?

hjh


: H. James Harkins

: jamshark70@xxxxxxxxxxxxxxxxx

: http://www.dewdrop-world.net

.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:


"Come said the Muse,

Sing me a song no poet has yet chanted,

Sing me the universal."  -- Whitman