-
-
Notifications
You must be signed in to change notification settings - Fork 292
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 duplicate typedefs in index.d.ts
from macro re-evaluation
#2088
Merged
Brooooooklyn
merged 1 commit into
napi-rs:v2
from
OmarTawfik-forks:deduplicate-type-defs
May 6, 2024
Merged
remove duplicate typedefs in index.d.ts
from macro re-evaluation
#2088
Brooooooklyn
merged 1 commit into
napi-rs:v2
from
OmarTawfik-forks:deduplicate-type-defs
May 6, 2024
+3
−1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading status checks…
cc @ Brooooooklyn |
kodiakhq bot
referenced
this pull request
in X-oss-byte/Nextjs
May 6, 2024
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@napi-rs/cli](https://togithub.com/napi-rs/napi-rs) | [`2.18.2` -> `2.18.3`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/2.18.2/2.18.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>napi-rs/napi-rs (@​napi-rs/cli)</summary> ### [`v2.18.3`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%402.18.3) [Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.18.2...@napi-rs/cli@2.18.3) #### What's Changed - remove duplicate typedefs in `index.d.ts` from macro re-evaluation by [@​OmarTawfik](https://togithub.com/OmarTawfik) in [https://github.com/napi-rs/napi-rs/pull/2088](https://togithub.com/napi-rs/napi-rs/pull/2088) #### New Contributors - [@​OmarTawfik](https://togithub.com/OmarTawfik) made their first contribution in [https://github.com/napi-rs/napi-rs/pull/2088](https://togithub.com/napi-rs/napi-rs/pull/2088) **Full Changelog**: https://github.com/napi-rs/napi-rs/compare/[@​napi-rs/cli](https://togithub.com/napi-rs/cli)[@​2](https://togithub.com/2).18.2...[@​napi-rs/cli](https://togithub.com/napi-rs/cli)[@​2](https://togithub.com/2).18.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Nextjs).
kodiakhq bot
referenced
this pull request
in X-oss-byte/Canary-nextjs
May 6, 2024
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@napi-rs/cli](https://togithub.com/napi-rs/napi-rs) | [`2.18.2` -> `2.18.3`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/2.18.2/2.18.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>napi-rs/napi-rs (@​napi-rs/cli)</summary> ### [`v2.18.3`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%402.18.3) [Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.18.2...@napi-rs/cli@2.18.3) #### What's Changed - remove duplicate typedefs in `index.d.ts` from macro re-evaluation by [@​OmarTawfik](https://togithub.com/OmarTawfik) in [https://github.com/napi-rs/napi-rs/pull/2088](https://togithub.com/napi-rs/napi-rs/pull/2088) #### New Contributors - [@​OmarTawfik](https://togithub.com/OmarTawfik) made their first contribution in [https://github.com/napi-rs/napi-rs/pull/2088](https://togithub.com/napi-rs/napi-rs/pull/2088) **Full Changelog**: https://github.com/napi-rs/napi-rs/compare/[@​napi-rs/cli](https://togithub.com/napi-rs/cli)[@​2](https://togithub.com/2).18.2...[@​napi-rs/cli](https://togithub.com/napi-rs/cli)[@​2](https://togithub.com/2).18.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Canary-nextjs).
kodiakhq bot
referenced
this pull request
in X-oss-byte/Nextjs
Jul 2, 2024
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@napi-rs/cli](https://togithub.com/napi-rs/napi-rs) | [`2.18.3` -> `2.18.4`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/2.18.2/2.18.4) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>napi-rs/napi-rs (@​napi-rs/cli)</summary> ### [`v2.18.4`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%402.18.4) [Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.18.3...@napi-rs/cli@2.18.4) #### What Changed - fix(cli): add missing declare keyword **Full Changelog**: https://github.com/napi-rs/napi-rs/compare/[@​napi-rs/cli](https://togithub.com/napi-rs/cli)[@​2](https://togithub.com/2).18.3...[@​napi-rs/cli](https://togithub.com/napi-rs/cli)[@​2](https://togithub.com/2).18.4 ### [`v2.18.3`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%402.18.3) [Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@2.18.2...@napi-rs/cli@2.18.3) #### What's Changed - remove duplicate typedefs in `index.d.ts` from macro re-evaluation by [@​OmarTawfik](https://togithub.com/OmarTawfik) in [https://github.com/napi-rs/napi-rs/pull/2088](https://togithub.com/napi-rs/napi-rs/pull/2088) #### New Contributors - [@​OmarTawfik](https://togithub.com/OmarTawfik) made their first contribution in [https://github.com/napi-rs/napi-rs/pull/2088](https://togithub.com/napi-rs/napi-rs/pull/2088) **Full Changelog**: https://github.com/napi-rs/napi-rs/compare/[@​napi-rs/cli](https://togithub.com/napi-rs/cli)[@​2](https://togithub.com/2).18.2...[@​napi-rs/cli](https://togithub.com/napi-rs/cli)[@​2](https://togithub.com/2).18.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Nextjs).
Xanewok
added a commit
to NomicFoundation/edr
that referenced
this pull request
Aug 22, 2024
See <napi-rs/napi-rs#2088>
Xanewok
added a commit
to NomicFoundation/edr
that referenced
this pull request
Aug 22, 2024
See <napi-rs/napi-rs#2088>
github-merge-queue bot
pushed a commit
to NomicFoundation/edr
that referenced
this pull request
Aug 23, 2024
Loading
Loading status checks…
See <napi-rs/napi-rs#2088>
Xanewok
added a commit
to NomicFoundation/edr
that referenced
this pull request
Aug 26, 2024
* fix: use remote chain id for pre-fork simulation (#567) * fix: use remote chain id for pre-fork simulation * Fix error message * chore: Bump hardhat to 2.22.7 (#571) * chore: Bump hardhat to 2.22.7 * fixup: Don't enable RIP-7212 in our tests * Adapt for NomicFoundation/hardhat#5411 * fix: prevent crash when returning large JSON responses (#569) * ci: update collaborator check in the benchmarks workflow (#574) * edr-0.5.1 (#559) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: add json alias property in provider response (#582) * fix: add json alias property in provider response * Create empty-bobcats-refuse.md * edr-0.5.2 (#583) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * breaking change: rename response.json to response.data (#584) * breaking change: rename response.json to response.data * Create sour-donkeys-draw.md * Update sour-donkeys-draw.md * fix: improve error message and option to skip unsupported transaction type in debug trace (#606) * fix: improve error message and option to skip unsupported tx type in debug trace * Address code review feedback * Handle unsupported transaction type requested * Fix test setup * ci: remove review-related slack notifications (#612) * chore: js tooling improvements (#609) * Fix pnpm warning * Add syncpakc * Add syncpack * Run syncpack format * Run syncpack on CI * Add setup-node action * Fixes related to upgrading prettier * Run prettier * Add setup-rust action * Run prettier in edr_napi * Add lint scripts to packages * Run prettier in crates/tools/js/benchmark * Port benchmark code to typescript * Add eslint to all packages * Upgrade @types/node to v20 * Fix broken build:edr script * Resolve benchmark output path * chore: upgrade hardhat and add patch (#613) * Upgrade Hardhat to v2.22.9 * Add patch for hardhat#5664 * chore: Bump to vanilla Hardhat 2.22.9 * chore: Regenerate the Hardhat patch to use the new EDR internals * chore: Bump @napi-rs/cli to fix duplicated napi typedefs See <napi-rs/napi-rs#2088> * fixup: Prettify test.ts * Fixes after testing in OZ (#625) * fix: add bounds checks * fix: check that steps is not empty before traversing it * fixup: formatting [skip ci] --------- Co-authored-by: Igor Matuszewski <xanewok@gmail.com> --------- Co-authored-by: Agost Biro <5764438+agostbiro@users.noreply.github.com> Co-authored-by: Wodann <Wodann@users.noreply.github.com> Co-authored-by: Piotr Galar <piotr.galar@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Franco Victorio <victorio.franco@gmail.com>
github-merge-queue bot
pushed a commit
to NomicFoundation/edr
that referenced
this pull request
Aug 27, 2024
* refactor: Port the codebase model construction and EVM decoding from HH * chore: Add a script that regenerates the pnpm patch for Hardhat * patch(hardhat): Cherry-pick and adapt for the unreleased Rip7212 PR See NomicFoundation/hardhat@f944cd5 * patch(hardhat): Cherry-pick a stack trace cleanup PR See NomicFoundation/hardhat@5739893 * patch(hardhat): Use the rewritten compiler to model logic from EDR See NomicFoundation/hardhat@49c66b6 * Port `MessageTrace` and `VMTracer` machinery from Hardhat (#531) * Some small improvements * Port `MessageTrace` and `VMTracer` machinery from Hardhat * Move HH-specific ExitCode logic to edr_napi * Remove unused `ExitCode::STATIC_STATE_CHANGE` * patch(hardhat): Re-use MessageTrace and VmTracer from EDR now See NomicFoundation/hardhat@3aeeb56 * chore: Re-run pnpm build * Address PR feedback * Address PR feedback * fixup: Apply formatting * refactor: Port ContractsIdentifier to Rust (#562) * chore: Port the BytecodeTrie from ContractsIdentifier * Migrate some library utils * Migrate some Opcode helpers * Finish the ContractsIdentifier port * Remove unused get_library_address_positions * Simplify the ContractsIdentifier port * patch(hardhat): Re-use the ContractsIdentifier from EDR * fixup: Fix a simple test * refactor: Port the `VmTraceDecoder` from Hardhat (#568) * fix: Correctly deserialize BuildInfo with `_format` field * refactor: Port the VmTraceDecoder from Hardhat * fix(napi): Correctly encode and decode `MessageTrace` types * refactor: Remove now unneeded functions * patch(hardhat): Port the VmTraceDecoder from Hardhat * Reformat and remove unused imports * fixup: Use a more correct type for the XYZTrace::bytecode field * fixup: Adjust test to now optional `deployedContract` property * refactor: Port `ReturnData` and `StackTraceEntryType` (#589) * feat: Port solidity-stack-trace.ts * feat: Port return-data.ts * patch(hardhat): Port return-data.ts and solidity-stack-trace.ts * fixup: Reformat files * fixup: let's see how tests feel about a number instead of a const enum variant * Make the comment about Rust type alias more clear [skip ci] * fix: Fully transpile in Mocha tests to correctly inline const enums (#594) It seems transpile-only transpiles per module, however we need to perform full "compilation" in order to correctly see and inline values for const enums. We use const enums because that's how they are emitted by napi-rs and there's no option to change that. Rather than invest into supporting that or working around it, let's just fully compile the test harness once. See https://www.typescriptlang.org/tsconfig/#isolatedModules for more context. * refactor: Port ErrorInferrer and SolidityTracer from Hardhat (#593) * Start porting SolidityTracer * Start porting ErrorInferrer * WIP: Keep Reference in MessageTraces * Port 99% of the ErrorInferrer Except `ErrorInferrer.inferAfterTracing`. I discovered that the original code creates a shallow copy of the stack trace during select heuristics and returns the modified one or the *original* one if the heuristic does not hit. One could keep track of possible series of changes that would have to be subsequently applied if the heuristic hits and returns a modified the stack trace but instead, I want the code to do exactly what the original code did. Rather than wrap every entry in a shareable `Rc` (they are not modified), I decided to make them clonable in the next PR, which means we need to not keep the `ClassInstance` around to derive the Clone trait. * Port mapped-inlined-internal-functions-heuristics.ts * refactor: Prune StackTraceEntry.message to make it clonable See previous commit "Port 99% of the ErrorInferrer". * refactor: Drop unused inner funcs in the ErrorInferrer * feat: Finish porting `ErrorInferrer` * feat: Finish porting `SolidityTracer` * refactor: Remove now unused utils IntoEither/IntoOption * patch(hardhat): Port ErrorInferrer and SolidityTracer * fixup! refactor: Prune StackTraceEntry.message to make it clonable * fixup: Reformat * Document the unsafety surrounding napi-rs's References * refactor: Remove some now unused functions * Address review feedback * fix a missing period * fix alphabetical sorting * refactor: Port stack-traces/debug.ts (#596) * Port over debugging facilities from debug.ts * patch(hardhat): Port debug.ts * fix: Make the depth optional in printMessageTrace * fixup: Formatting * Merge `main` into the stack trace port feature branch (#618) * fix: use remote chain id for pre-fork simulation (#567) * fix: use remote chain id for pre-fork simulation * Fix error message * chore: Bump hardhat to 2.22.7 (#571) * chore: Bump hardhat to 2.22.7 * fixup: Don't enable RIP-7212 in our tests * Adapt for NomicFoundation/hardhat#5411 * fix: prevent crash when returning large JSON responses (#569) * ci: update collaborator check in the benchmarks workflow (#574) * edr-0.5.1 (#559) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: add json alias property in provider response (#582) * fix: add json alias property in provider response * Create empty-bobcats-refuse.md * edr-0.5.2 (#583) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * breaking change: rename response.json to response.data (#584) * breaking change: rename response.json to response.data * Create sour-donkeys-draw.md * Update sour-donkeys-draw.md * fix: improve error message and option to skip unsupported transaction type in debug trace (#606) * fix: improve error message and option to skip unsupported tx type in debug trace * Address code review feedback * Handle unsupported transaction type requested * Fix test setup * ci: remove review-related slack notifications (#612) * chore: js tooling improvements (#609) * Fix pnpm warning * Add syncpakc * Add syncpack * Run syncpack format * Run syncpack on CI * Add setup-node action * Fixes related to upgrading prettier * Run prettier * Add setup-rust action * Run prettier in edr_napi * Add lint scripts to packages * Run prettier in crates/tools/js/benchmark * Port benchmark code to typescript * Add eslint to all packages * Upgrade @types/node to v20 * Fix broken build:edr script * Resolve benchmark output path * chore: upgrade hardhat and add patch (#613) * Upgrade Hardhat to v2.22.9 * Add patch for hardhat#5664 * chore: Bump to vanilla Hardhat 2.22.9 * chore: Regenerate the Hardhat patch to use the new EDR internals * chore: Bump @napi-rs/cli to fix duplicated napi typedefs See <napi-rs/napi-rs#2088> * fixup: Prettify test.ts * Fixes after testing in OZ (#625) * fix: add bounds checks * fix: check that steps is not empty before traversing it * fixup: formatting [skip ci] --------- Co-authored-by: Igor Matuszewski <xanewok@gmail.com> --------- Co-authored-by: Agost Biro <5764438+agostbiro@users.noreply.github.com> Co-authored-by: Wodann <Wodann@users.noreply.github.com> Co-authored-by: Piotr Galar <piotr.galar@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Franco Victorio <victorio.franco@gmail.com> * chore: Restore old test.ts and remove some `as any` conversions * WIP: Benchmark with patched Hardhat to use new EDR internals * Revert "WIP: Benchmark with patched Hardhat to use new EDR internals" This reverts commit ac2e012. * Remove the gen-hardhat-patches script --------- Co-authored-by: Agost Biro <5764438+agostbiro@users.noreply.github.com> Co-authored-by: Wodann <Wodann@users.noreply.github.com> Co-authored-by: Piotr Galar <piotr.galar@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Franco Victorio <victorio.franco@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type definitions are generated during
cargo build
, and written to a temporary typedefs file. Usually, they are only evaluated once, but they can also be evaluated more times, when modules are loaded through conditional compilation, by using#[path]
attributes, or various other code patterns required to get around existing cargo limitations.This causes the temp file to have duplicate entries, which results in an invalid
index.d.ts
generated, with twice the number of types, causingtsc
to fail with manyTS2300
errors. The issue happens with the latest released@napi-rs/cli
version2.18.2
.This localized fix here deduplicates any entries found in the file, and has no effect when there are none.