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

Solc-js Causes Node Scripts to Delay Finishing #654

Closed
chase-manning opened this issue Sep 7, 2022 · 3 comments
Closed

Solc-js Causes Node Scripts to Delay Finishing #654

chase-manning opened this issue Sep 7, 2022 · 3 comments

Comments

@chase-manning
Copy link

If solc is imported into any node script, it causes that script to delay for a few seconds after finishing.

I have created a small repository to replicate this issue:

https://github.com/chase-manning/solc-bug-reproduce

Details on how to replicate are in the readme for that repo.

But in short, this script:

const solc = require("solc");
console.log("Script finished running");

when run with, for example, node index.js will lag for about 5 seconds after Script finished running is logged.

But this script:

console.log("Script finished running");

Will stop running immediately after the line is logged.

This issue cannot be replicated by importing any other package, and happens just with solc.

@cameel
Copy link
Member

cameel commented Sep 7, 2022

Yes, it's a known issue and it seems to actually be a problem in node.js: nodejs/node#36616

Thanks for the report but I'm going to close this since the problem is already tracked in ethereum/solidity#9297.

@cameel cameel closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2022
@chase-manning
Copy link
Author

@cameel Thanks! Do you know of any workarounds that I could use? 😄

@cameel
Copy link
Member

cameel commented Sep 7, 2022

On older node.js versions a manual process.exit() used to help. That stopped working on node.js 17 but node --wasm-dynamic-tiering should work. Not sure if that feature was already released in a stable node.js version though.

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

No branches or pull requests

2 participants