-
Notifications
You must be signed in to change notification settings - Fork 405
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
gz test is permafailing on node v11.12.0 #1879
Comments
As a quick note, I tried running in v11.11 as well, but this release has another issue that got fixed in v11.12 in nodejs/node#26488 (comment). There has been quite some changes in v11.11 about the worker implementation, that's why I wanted to check this version. I believe this is what broke for us: nodejs/node#26082 Here is what I think breaks: profiler/src/utils/__mocks__/worker-factory.js Lines 22 to 33 in b7ee402
As you can see, we create the There are 3 options to fix this:
My preference is either 1 or 2. Maybe a slight preference for 2, because that's the easiest solution. What do you think? |
This fixes it on node v11.12: diff --git a/src/utils/__mocks__/worker-factory.js b/src/utils/__mocks__/worker-factory.js
index 63934de0..3da07c32 100644
--- a/src/utils/__mocks__/worker-factory.js
+++ b/src/utils/__mocks__/worker-factory.js
@@ -18,17 +18,17 @@ class NodeWorker {
worker.on('error', this.onError);
this._instance = worker;
}
postMessage(
message: mixed,
transfer?: Array<ArrayBuffer | MessagePort | ImageBitmap>
) {
- this._instance.postMessage({ data: message }, transfer);
+ this._instance.postMessage(message, transfer);
}
onMessage = (message: Object) => {
if (this.onmessage) {
this.onmessage(new MessageEvent('message', { data: message }));
}
};
So I see that the first |
We could replace the test with #1730 so that we are not relying on experimental features. |
I think this won't stay experimental for a long time now and this provides the right semantics for Worker, so it has some value. Supporting both node versions shouldn't be so hard. But it would also make it easier if we'd stick to latest node LTS instead of using node current :) |
It's not failing on v11.10.0.
/cc @julienw any ideas?
The text was updated successfully, but these errors were encountered: