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

Inconsistent snake_case / camelcase in config (YulDetails, stackAllocation, etc..) #1345

Open
1 of 2 tasks
spockP opened this issue Jun 18, 2023 · 0 comments
Open
1 of 2 tasks
Milestone

Comments

@spockP
Copy link

spockP commented Jun 18, 2023

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 (cf104a5 2023-06-18T05:38:12.036372000Z)

What command(s) is the bug in?

No response

Operating System

macOS (Intel)

Describe the bug

I have a lot utests that does not work without "via-ir". The compilation with "via-ir" is slow. However, I want to make the compilation a littler faster. I followed ethereum/solidity#12533 (comment) and try to set "yulDetails" in my foundry.toml.

And I followed the foundry-book , and add optimizer_details.yul_details to my foundry.toml:

via_ir = true
[profile.default.optimizer_details]
peephole = false
inliner = false
jumpdest_remover = false
order_literals = false
deduplicate = false
cse = false
constant_optimizer = false
yul = true
[profile.default.optimizer_details.yul_details]
stack_allocation = true
optimizer_steps = ""

Unluckily, the above configuration does not work. The yul_details and its child keys should all be in Camel Case. The working configuration is as follows:

via_ir = true
[profile.default.optimizer_details]
peephole = false
inliner = false
jumpdestRemover = false
orderLiterals = false
deduplicate = false
cse = false
constantOptimizer = false
yul = true

[profile.default.optimizer_details.yulDetails]
stackAllocation = true
optimizerSteps = ""

If the snake case is expected, I think this must be a bug. Or you should update the foundry book.

@Evalir Evalir self-assigned this Jun 18, 2023
@zerosnacks zerosnacks changed the title YulDetails is camel but not snake Inconsistent snake_case / camelcase in config (YulDetails, stackAllocation, etc..) Jul 2, 2024
@zerosnacks zerosnacks added this to the v1.0.0 milestone Jul 26, 2024
@grandizzy grandizzy transferred this issue from foundry-rs/foundry Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Status: No status
Development

No branches or pull requests

3 participants