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

Make --gas-report w/ --json output one JSON blob and add contract_path to output #9111

Open
zerosnacks opened this issue Oct 14, 2024 · 0 comments
Assignees
Labels
A-gas-snapshots Area: gas snapshotting/reporting C-forge Command: forge T-feature Type: feature
Milestone

Comments

@zerosnacks
Copy link
Member

zerosnacks commented Oct 14, 2024

Component

Forge

Describe the feature you would like

Follow up of #9063

Ref: #9063 (comment)

the emitted json data loses the contract path completely, which is unfortunate as in projects with more than one contracts this information is actually quite important. Especially if multiple contracts have the same signatures it's becoming impossible to distinguish.

the emitted json is not valid json - each line for itself, yes, but the overall generated output is not(as it's missing separators and a bounding array). Imo the goal should be that piping forge test --gas-report --json > some.json, i receive a valid json i can post-process.

cc @sakulstra

Additional context

No response

@zerosnacks zerosnacks added T-feature Type: feature C-forge Command: forge A-gas-snapshots Area: gas snapshotting/reporting labels Oct 14, 2024
@zerosnacks zerosnacks self-assigned this Oct 14, 2024
@zerosnacks zerosnacks added this to the v1.0.0 milestone Oct 14, 2024
@zerosnacks zerosnacks changed the title Make --gas-report output one JSON blob and add contract_path to output Make --gas-report w/ --json output one JSON blob and add contract_path to output Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-gas-snapshots Area: gas snapshotting/reporting C-forge Command: forge T-feature Type: feature
Projects
Status: Todo
Development

No branches or pull requests

1 participant