-
Notifications
You must be signed in to change notification settings - Fork 226
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
worker fixes #1797
worker fixes #1797
Conversation
c3e1598
to
af2c78c
Compare
@FUDCo could you also run |
The requested test fails on my Mac with the output:
|
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.
Looks good modulo the mysteriously non-working test.
const supercode = require.resolve( | ||
'./kernel/vatManager/subprocessSupervisor.js', | ||
); | ||
return startSubprocessWorker(process.execPath, ['-r', 'esm', supercode]); |
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.
The use of process.execPath
here seems like it could introduce some interesting (and I'm not sure it it's the good kind of interesting or the bad kind of interesting) possibilities if the executable is something that wraps node or otherwise is not actually node itself. In particular, I can imagine a use case in which the launching executable is something greater than node per se but where the workers really should be run with the actual node executable. I'm not sure this is a problem we need to solve now or indeed if it's even a problem at all, but you might give some thought to putting in a way to parameterize what gets run here instead of assuming "run whatever kind of thing I am".
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.
yeah, I figured this was the simplest way to run under the same version of Node as the parent process, but needing to add the -r esm
is a hassle. Once we get rid of -r esm
and move to type: module
everywhere, maybe this could change.
Ugh, it looks like the I'll search around for a better library, or I'll figure out the Stream interface and write my own. |
to match other workers refs #1776
This adds a new message to the vat-to-kernel protocol, `['testLog', ...args]`, to deliver the strings from the vat to the kernel. They get added to the same `c.dump().log` array that local workers can write to. This is solely for the benefit of unit tests. refs #1776 (closing the `testLog` part, but not the other vatPowers)
af2c78c
to
49605c6
Compare
ok I've got a branch with a new kernel-worker protocol (with the correct netstring stream decoder), I'll land this subset of changes first, and then make a new PR with the rest |
Address a bunch of small issues with our different vatWorker types, to align their feature sets more closely. They aren't quite identical yet, but this is enough to allow more tests to pass, and should unblock the addition of CI for the xs-vat-worker type (#1299)