Skip to content

fix(config): prevent false warnings for valid vyper config keys#13317

Open
Himess wants to merge 1 commit intofoundry-rs:masterfrom
Himess:fix/vyper-config-warning
Open

fix(config): prevent false warnings for valid vyper config keys#13317
Himess wants to merge 1 commit intofoundry-rs:masterfrom
Himess:fix/vyper-config-warning

Conversation

@Himess
Copy link
Contributor

@Himess Himess commented Feb 4, 2026

Closes #13316

When using inline table syntax for vyper configuration like:
```toml
[profile.default]
vyper = { optimize = "gas" }
```

The config system was incorrectly warning about `optimize` and
`experimental_codegen` being unknown keys.

This happened because `VyperConfig` uses `Option` fields with
`skip_serializing_if = "Option::is_none"`, which results in an empty
dict when serializing defaults. The warning system then had no
reference for valid keys.

Fix by adding explicit `VYPER_KEYS` constant as a fallback when the
default config produces an empty dict for a section.

Closes foundry-rs#13316
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

bug(forge test): "Warning: Found unknown experimental_codegen config key in section vyper defined in foundry.toml"

1 participant