Skip to content
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

Remove fibers dependency #750

Merged
merged 4 commits into from
May 15, 2024
Merged

Conversation

rmacklin
Copy link
Contributor

It seems that the usage of this dependency was removed in b7d2708#diff-1fb26bc12ac780c7ad7325730ed09fc4c2c3d757c276c3dacc44bfe20faf166fL62-L64, so we don't actually need it. Furthermore, even though it doesn't appear to be used anywhere else, just having the package as a dependency breaks yarn build on node 16:

yarn build
yarn run v1.22.19
$ cross-env NODE_ENV=production webpack --hide-modules
  build [===                 ] 15%Assertion failed: (thread_id_key != 0x7777), function find_thread_id_key, file coroutine.cc, line 134.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

RpcIpcMessagePortClosedError: Cannot send the message - the message port has been closed for the process 83355.
    at /Users/rmacklin/src/github.com/ankit/stylebot/stylebot/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:47:47
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: undefined,
  signal: undefined
}

and that thread_id_key error is apparently a well-known issue with the fibers package which doesn't support node 16:
laverdet/node-fibers@8f28098

After removing the dependency, we can successfully run yarn build on node 16 (which is important, because earlier versions of node are not supported on darwin-arm64, a.k.a. Apple Silicon):

yarn build
yarn run v1.22.19
$ cross-env NODE_ENV=production webpack --hide-modules
  build [======              ] 32%Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Build completed in 5.822s

It seems that the usage of this dependency was removed in
b7d2708, so we don't actually need it.
Furthermore, even though it doesn't appear to be used anywhere else,
just having the package as a dependency breaks `yarn build` on node 16:

```
yarn build
yarn run v1.22.19
$ cross-env NODE_ENV=production webpack --hide-modules
  build [===                 ] 15%Assertion failed: (thread_id_key != 0x7777), function find_thread_id_key, file coroutine.cc, line 134.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

RpcIpcMessagePortClosedError: Cannot send the message - the message port has been closed for the process 83355.
    at /Users/rmacklin/src/github.com/ankit/stylebot/stylebot/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:47:47
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: undefined,
  signal: undefined
}
```
and that `thread_id_key` error is apparently a well-known issue with the
fibers package which doesn't support node 16:
laverdet/node-fibers@8f28098

After removing the dependency, we can successfully run `yarn build` on
node 16 (which is important, because earlier versions of node are not
supported on darwin-arm64, a.k.a. Apple Silicon):
```
yarn build
yarn run v1.22.19
$ cross-env NODE_ENV=production webpack --hide-modules
  build [======              ] 32%Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Build completed in 5.822s
```
@rmacklin
Copy link
Contributor Author

@ankit Are you still maintaining this repo? If so, would you consider merging this PR? If not, would you be open to updating the README to indicate that you are no longer maintaining it?

@ankit
Copy link
Owner

ankit commented May 15, 2024

@rmacklin yes, I am maintaining it every now and then. I will merge your PR, thank you

@ankit ankit merged commit b0bd37f into ankit:main May 15, 2024
2 checks passed
@rmacklin
Copy link
Contributor Author

Awesome, thank you!!

@rmacklin rmacklin deleted the remove-fibers-dependency branch May 15, 2024 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants