Repository navigation
Fix a bug in how "rush build --from" calculates dependents. - #392
Conversation
Please clarify this data structure... the name is really strange. Something like: #ByDesign Refers to: apps/rush/src/actions/RebuildAction.ts:40 in 3db232b. [](commit_id = 3db232b, deletion_comment = False) |
| private _collectAllDependents(project: string): Set<string> { | ||
| const deps: Set<string> = new Set<string>(); | ||
| this._dependentList.get(project)!.forEach((dep) => { | ||
| (this._dependentList.get(project) || new Set<string>()).forEach((dep) => { |
There was a problem hiding this comment.
new Set() [](start = 41, length = 17)
This is a little clunky. Compare with:
const dependentSet: Set<string> = this._dependentSetsForProjects.get(project);
if (dependentSet) {
for (const dependent of dependentSet) {
. . .
}
}
(Less lines of code does not generally imply better readability.) #WontFix
OMG I am actually losing my mind trying to understand Nick's terminology here ("dependent" vs "dependency"). I would expect the definitions to be like this:
This is backed up by the English dictionary:
Could we just write these definitions in a code comment for the benefit of someone else trying to understand this file? In reply to: 336221542 [](ancestors = 336221542) Refers to: apps/rush/src/actions/RebuildAction.ts:40 in 3db232b. [](commit_id = 3db232b, deletion_comment = False) |
Also please fix up all the places where it says "dep" because that is super ambiguous. Our coding standards require full English words In reply to: 336225259 [](ancestors = 336225259,336221542) Refers to: apps/rush/src/actions/RebuildAction.ts:40 in 3db232b. [](commit_id = 3db232b, deletion_comment = False) |
This is dependent set list, meaning the set of things that need to be build after the key package. In reply to: 336225259 [](ancestors = 336225259,336221542) Refers to: apps/rush/src/actions/RebuildAction.ts:40 in 3db232b. [](commit_id = 3db232b, deletion_comment = False) |
No description provided.