-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add a new "explain" logger #863
base: main
Are you sure you want to change the base?
Changes from 1 commit
610c017
9e21e1a
4c3e3bb
75c8ddb
81e826f
aafaf97
9cbed09
7bb036d
42b48c0
fcba1f8
cfd0391
0a7a85a
4b8a11d
ea5bff9
ba68974
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 |
---|---|---|
|
@@ -209,16 +209,16 @@ export class Fingerprint { | |
if (script.command === undefined) { | ||
return undefined; | ||
} | ||
if (script.files === undefined) { | ||
return {name: 'no files field'}; | ||
} | ||
// A service. Always fully tracked. No 'files' means that we | ||
// assume that it writes no files. Can't produce output. | ||
if (script.service !== undefined) { | ||
return undefined; | ||
} | ||
// A standard script. Fully tracked if we know both its inputs and | ||
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. Should this comment be just above (above 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. Ah, yes! |
||
// outputs. | ||
if (script.files === undefined) { | ||
return {name: 'no files field'}; | ||
} | ||
if (script.output === undefined) { | ||
return {name: 'no output field'}; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,7 @@ async function retryWithGcUntilCallbackDoesNotThrow( | |
cb: () => void, | ||
): Promise<void> { | ||
for (const wait of [0, 10, 100, 500, 1000]) { | ||
collectGarbage(); | ||
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. 1 GC not enough? 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. Surprisingly, it often isn't. When doing memory leak tests in Lit we found that memory is often not freed unless you call gc twice in a row. 🤷 |
||
collectGarbage(); | ||
try { | ||
cb(); | ||
|
@@ -251,10 +252,12 @@ test( | |
servicePersistent: { | ||
command: servicePersistent.command, | ||
service: true, | ||
files: [], | ||
}, | ||
serviceEphemeral: { | ||
command: serviceEphemeral.command, | ||
service: true, | ||
files: [], | ||
}, | ||
}, | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ | |
"..:build" | ||
], | ||
"files": [ | ||
".tsbuildinfo", | ||
"tsconfig.json", | ||
"src/**/*.ts" | ||
], | ||
|
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.
It seems like a little more information is also added to the default logger in this PR (and I think simple logger, since it delegates to default sometimes?). Mention that too in a separate line?
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.
Done