-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Suspend incomplete requests #9636
base: v2
Are you sure you want to change the base?
Changes from 6 commits
fd4a4c1
074ae29
db1ecfd
947f94a
0b614e9
b2a31f8
da3b8a1
26b48e9
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 |
---|---|---|
|
@@ -190,14 +190,22 @@ export async function runDevDepRequest<TResult>( | |
await api.runRequest<null, DevDepRequestResult | void>({ | ||
id: 'dev_dep_request:' + devDepRequest.specifier + ':' + devDepRequest.hash, | ||
type: requestTypes.dev_dep_request, | ||
incompleteRequest: !( | ||
devDepRequest.invalidateOnFileChange && | ||
devDepRequest.invalidateOnFileCreate | ||
), | ||
run: ({api}) => { | ||
for (let filePath of nullthrows(devDepRequest.invalidateOnFileChange)) { | ||
for (let filePath of nullthrows( | ||
devDepRequest.invalidateOnFileChange, | ||
'DevDepRequest missing invalidateOnFileChange', | ||
)) { | ||
api.invalidateOnFileUpdate(filePath); | ||
api.invalidateOnFileDelete(filePath); | ||
} | ||
|
||
for (let invalidation of nullthrows( | ||
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. We should probably look at adding a lint rule to ensure 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. Could just change the type definition. It'd be a bit of work though 😅 |
||
devDepRequest.invalidateOnFileCreate, | ||
'DevDepRequest missing invalidateOnFileCreate', | ||
)) { | ||
api.invalidateOnFileCreate(invalidation); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have
RequestGraph#incompleteNodeIds
and alsoincompleteNodePromises
. Could you use those here?