-
Notifications
You must be signed in to change notification settings - Fork 631
[rush] Optimize the execution speed of Rush #5007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
2eb0665
1c4e825
12c0c46
493e2ab
238d1f3
75a0ad0
72940eb
6236ccd
4c094f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@microsoft/rush", | ||
"comment": "Optimize the execution speed of Rush", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@microsoft/rush" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@rushstack/package-deps-hash", | ||
"comment": "Optimize the execution speed of Rush", | ||
"type": "patch" | ||
L-Qun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
], | ||
"packageName": "@rushstack/package-deps-hash" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,7 +201,8 @@ export class ProjectChangeAnalyzer { | |
*/ | ||
public async _tryGetSnapshotProviderAsync( | ||
projectConfigurations: ReadonlyMap<RushConfigurationProject, RushProjectConfiguration>, | ||
terminal: ITerminal | ||
terminal: ITerminal, | ||
projectSelection?: ReadonlySet<RushConfigurationProject> | ||
): Promise<GetInputsSnapshotAsyncFn | undefined> { | ||
try { | ||
const gitPath: string = this._git.getGitPathOrThrow(); | ||
|
@@ -295,10 +296,19 @@ export class ProjectChangeAnalyzer { | |
const lookupByPath: IReadonlyLookupByPath<RushConfigurationProject> = | ||
this._rushConfiguration.getProjectLookupForRoot(rootDirectory); | ||
|
||
let filterPath: string[] = []; | ||
|
||
if ( | ||
projectSelection && | ||
this._rushConfiguration.experimentsConfiguration.configuration.enableSubpathScan | ||
) { | ||
filterPath = Array.from(projectSelection).map(({ projectFolder }) => projectFolder); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For a followup PR: this feature will 100% break the build cache unless we update this to File hashes for dependencies are absolutely necessary when calculating build cache entry ids, unless the only selected phases don't depend on upstream projects at all. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://developer.microsoft.com/json-schemas/rush/v5/experiments.schema.json @octogonz Could you help deploy a new schema endpoint that includes the |
||
} | ||
|
||
return async function tryGetSnapshotAsync(): Promise<IInputsSnapshot | undefined> { | ||
try { | ||
const [hashes, additionalFiles] = await Promise.all([ | ||
getRepoStateAsync(rootDirectory, additionalRelativePathsToHash, gitPath), | ||
getRepoStateAsync(rootDirectory, additionalRelativePathsToHash, gitPath, filterPath), | ||
getAdditionalFilesFromRushProjectConfigurationAsync( | ||
additionalGlobs, | ||
lookupByPath, | ||
|
Uh oh!
There was an error while loading. Please reload this page.