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

AST in out/*.sol/*.json has fields missing #3504

Closed
1 of 2 tasks
antonper opened this issue Oct 17, 2022 · 1 comment · Fixed by gakonst/ethers-rs#1793
Closed
1 of 2 tasks

AST in out/*.sol/*.json has fields missing #3504

antonper opened this issue Oct 17, 2022 · 1 comment · Fixed by gakonst/ethers-rs#1793
Labels
T-bug Type: bug

Comments

@antonper
Copy link

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (b554ab1 2022-10-17T00:08:53.911501071Z)

What command(s) is the bug in?

forge build

Operating System

Linux

Describe the bug

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

contract Bar1{
}

Such contract built by forge would have ContractDefinition.nodes field empty inside the ast of the out json.
Solidity keeps "nodes": [] in that case.
I am not sure this difference is desired.

@antonper antonper added the T-bug Type: bug label Oct 17, 2022
@gakonst gakonst added this to Foundry Oct 17, 2022
@gakonst gakonst moved this to Todo in Foundry Oct 17, 2022
Repository owner moved this from Todo to Done in Foundry Oct 17, 2022
@antonper
Copy link
Author

This change introduced another bug. Now all nodes have "nodes":[] fields even if they should not have them. E.g. PragmaDirective

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant