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

Use --ast in forge build in Kontrol #400

Closed
palinatolmach opened this issue Feb 28, 2024 · 1 comment · Fixed by #487
Closed

Use --ast in forge build in Kontrol #400

palinatolmach opened this issue Feb 28, 2024 · 1 comment · Fixed by #487
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@palinatolmach
Copy link
Collaborator

As discussed in #399, starting from foundry-rs/foundry#7197, Foundry doesn't include AST in the output of forge build by default. If the AST is not present in solc-produced files, #399 added a descriptive error message suggesting that the user should add ast = true to foundry.toml.

However, for the AST to be generated automatically, we could also include --ast into the set of flags we are calling forge build with:

run_process(['forge', 'build', '--root', str(self._root)], logger=_LOGGER)

The --ast flag was only added in foundry-rs/foundry#7197, so it's not backwards compatible, and would require checking a version of Foundry being used first.

@yale-vinson yale-vinson added the enhancement New feature or request label Feb 29, 2024
@palinatolmach
Copy link
Collaborator Author

palinatolmach commented Mar 1, 2024

Alternatively, we can add a --build-info flag to forge build, which is backward compatible, but generates additional information (such as the build info file itself) — it doesn't increase the execution time for forge build on our integration test suite, but occupies more disk space:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants