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 ASTDereferencerError when validating initializers #1118

Merged
merged 3 commits into from
Jan 24, 2025

Conversation

ericglau
Copy link
Member

@ericglau ericglau commented Jan 24, 2025

Referenced AST ids can be negative if they refer to nodes that are not in the solc output. For example, require statements seem to have referenced AST ids of -18.

When validating initializers, we should ignore negative AST id references.

Fixes #1116

@ericglau ericglau requested a review from a team January 24, 2025 14:58
@ckartik
Copy link

ckartik commented Jan 24, 2025

When is this expected to get in, and are there any recommendations to get around this issue, we're currently running into build issues on our CI because of this.

@ckartik
Copy link

ckartik commented Jan 24, 2025

We're running into the following erros:

/home/runner/.npm/_npx/fb3494f8bab08a4d/node_modules/solidity-ast/dist/ast-dereferencer.js:73
        throw new ASTDereferencerError(id, nodeType);
              ^

ASTDereferencerError: No node with id -18 of type FunctionDefinition

@ericglau ericglau merged commit 696e20f into OpenZeppelin:master Jan 24, 2025
13 checks passed
@ericglau ericglau deleted the 1116 branch January 24, 2025 18:41
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.

ASTDereferencerError: No node with id -18 of type FunctionDefinition
3 participants