-
Notifications
You must be signed in to change notification settings - Fork 6
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
Child process should ignore files that are specified in the ignore array #72
Conversation
5f0e144
to
5b30ac2
Compare
@@ -166,4 +174,6 @@ export const wds = async (options: RunOptions) => { | |||
logShutdown("shutting down project since it's no longer needed..."); | |||
project.shutdown(code ?? 1); | |||
}); | |||
|
|||
return server; |
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.
Needed to return the server here so that I could close it in my tests
await this.reportErrors(async () => { | ||
await Promise.all(fileNames.map((filename) => this.buildFile(filename, root, swcConfig))); | ||
}); | ||
await this.reportErrors(Promise.allSettled(fileNames.map((filename) => this.buildFile(filename, root, swcConfig)))); |
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.
I wasn't entirely sure if this was a bug or not. Files will stop compiling as soon as one file fails with Promise.all
, this was fixed so that the benchmarks could be run
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.
LGTM if gadget still boots fine!
Currently the child process will attempt to get the parent process to compile a file even if it's part of your
wds.ignored
path. This results in "[wds] Internal error: compiled ${filename} but did not get it returned from the leader process in the list of compiled files" being thrown on these files. Checking if the file was ignored in the child process was much too slow and almost tripled the bench results so instead we'll return if the file is ignored from the parent call.