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

bug: forge config with default values does not dump proper optimizer / optimizer_runs #9688

Closed
grandizzy opened this issue Jan 16, 2025 · 0 comments · Fixed by #9689
Closed
Assignees
Labels
C-forge Command: forge T-bug Type: bug

Comments

@grandizzy
Copy link
Collaborator

          Hi folks @yash-atreya @zerosnacks @grandizzy, it looks like the change of `optimizer` to an `Option<bool>` also changed the format of on-disk hardhat-style build-info json artifacts, which affects external tooling (e.g. https://github.com/crytic/crytic-compile/issues/581). Was that change intentional?

Originally posted by @elopez in #9673 (comment)

With default settings forge config --json doesn't show optimizer = false but

forge config --json | grep optimizer
  "optimizer": null,
  "optimizer_runs": null,
  "optimizer_details": null,

forge config doesn't include optimizer = false either.

If optimizer = true specified in foundry.toml then proper values are dumped

forge config --json | grep optimizer
  "optimizer": true,
  "optimizer_runs": 200,
  "optimizer_details": null,
forge config | grep optimizer
optimizer = true
optimizer_runs = 200
@github-project-automation github-project-automation bot moved this to Todo in Foundry Jan 16, 2025
@grandizzy grandizzy added T-bug Type: bug C-forge Command: forge labels Jan 16, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Jan 16, 2025
@grandizzy grandizzy self-assigned this Jan 20, 2025
@grandizzy grandizzy moved this from Done to Completed in Foundry Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge T-bug Type: bug
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

1 participant