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

fix: use weak references for stored threadsafe functions #5025

Merged
merged 9 commits into from
Mar 26, 2024
Merged

Conversation

Wodann
Copy link
Member

@Wodann Wodann commented Mar 26, 2024

Fixes NomicFoundation/edr#339 & #4997.

In the process of making this fix, I also bumped napi to v2.16.0. As it doesn't affect the generated index.d.ts of edr_napi, this can still be considered a patch version bump for EDR.

@Wodann Wodann requested a review from fvictorio March 26, 2024 10:04
@Wodann Wodann self-assigned this Mar 26, 2024
Copy link

changeset-bot bot commented Mar 26, 2024

🦋 Changeset detected

Latest commit: 6011166

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@nomicfoundation/edr Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Mar 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2024 1:56pm

@Wodann Wodann had a problem deploying to github-action-benchmark March 26, 2024 10:04 — with GitHub Actions Error
@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Mar 26, 2024
@@ -0,0 +1,41 @@
const edr = require("@nomicfoundation/edr")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fvictorio should this file be kept? Feel free to modify this to be automatically testable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced this with an e2e fixture project. This will fail now because the EDR dependency is not published yet though.

Copy link
Member

@fvictorio fvictorio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran some manual tests and it seems to work fine:

  • Running a script with hh run
  • Running a script with node --require hardhat/register
  • Running a script with node script.js, where the script explicitly requires the HRE
  • Running hh test
  • Running mocha --require hardhat/register
  • Running scripts and tests in a typescript project

@Wodann Wodann merged commit 7d0f981 into main Mar 26, 2024
98 of 101 checks passed
@Wodann Wodann deleted the fix/hang branch March 26, 2024 15:43
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:edr status:ready This issue is ready to be worked on
Projects
None yet
2 participants