-
Notifications
You must be signed in to change notification settings - Fork 2.2k
docs: clean up config docs #12296
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
base: master
Are you sure you want to change the base?
docs: clean up config docs #12296
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -192,50 +192,53 @@ pub struct Config { | |
| #[serde(default, skip_serializing)] | ||
| pub extends: Option<Extends>, | ||
|
|
||
| /// path of the source contracts dir, like `src` or `contracts` | ||
| /// Path of the sources directory. | ||
| /// | ||
| /// Defaults to `src`. | ||
| pub src: PathBuf, | ||
| /// path of the test dir | ||
| /// Path of the tests directory. | ||
| pub test: PathBuf, | ||
| /// path of the script dir | ||
| /// Path of the scripts directory. | ||
| pub script: PathBuf, | ||
| /// path to where artifacts shut be written to | ||
| /// Path to the artifacts directory. | ||
| pub out: PathBuf, | ||
| /// all library folders to include, `lib`, `node_modules` | ||
| /// Paths to all library folders, such as `lib`, or `node_modules`. | ||
| pub libs: Vec<PathBuf>, | ||
| /// `Remappings` to use for this repo | ||
| /// Remappings to use for this repo | ||
| pub remappings: Vec<RelativeRemapping>, | ||
| /// Whether to autodetect remappings by scanning the `libs` folders recursively | ||
| /// Whether to autodetect remappings. | ||
| pub auto_detect_remappings: bool, | ||
| /// library addresses to link | ||
| /// Library addresses to link. | ||
| pub libraries: Vec<String>, | ||
| /// whether to enable cache | ||
| /// Whether to enable the build cache. | ||
| pub cache: bool, | ||
| /// whether to dynamically link tests | ||
| pub dynamic_test_linking: bool, | ||
| /// where the cache is stored if enabled | ||
| /// The path to the cache store. | ||
| pub cache_path: PathBuf, | ||
| /// where the gas snapshots are stored | ||
| /// Whether to dynamically link tests. | ||
| pub dynamic_test_linking: bool, | ||
| /// Where the gas snapshots are stored. | ||
| pub snapshots: PathBuf, | ||
| /// whether to check for differences against previously stored gas snapshots | ||
| /// Whether to check for differences against previously stored gas snapshots. | ||
| pub gas_snapshot_check: bool, | ||
| /// whether to emit gas snapshots to disk | ||
| /// Whether to emit gas snapshots to disk. | ||
| pub gas_snapshot_emit: bool, | ||
| /// where the broadcast logs are stored | ||
| /// The path to store broadcast logs at. | ||
| pub broadcast: PathBuf, | ||
| /// additional solc allow paths for `--allow-paths` | ||
| /// Additional paths passed to `solc --allow-paths`. | ||
| pub allow_paths: Vec<PathBuf>, | ||
| /// additional solc include paths for `--include-path` | ||
| /// Additional paths passed to `solc --include-path`. | ||
| pub include_paths: Vec<PathBuf>, | ||
| /// glob patterns to skip | ||
| /// Glob patterns for file paths to skip when building and executing contracts. | ||
| pub skip: Vec<GlobMatcher>, | ||
| /// whether to force a `project.clean()` | ||
| /// Whether to forcefully clean all project artifacts before running commands. | ||
| // todo(onbjerg): is this useful anymore? | ||
| pub force: bool, | ||
| /// evm version to use | ||
| /// The EVM version to use when building contracts. | ||
| #[serde(with = "from_str_lowercase")] | ||
| pub evm_version: EvmVersion, | ||
| /// list of contracts to report gas of | ||
| /// List of contracts to generate gas reports for. | ||
| pub gas_reports: Vec<String>, | ||
| /// list of contracts to ignore for gas reports | ||
| /// List of contracts to ignore for gas reports. | ||
| pub gas_reports_ignore: Vec<String>, | ||
| /// Whether to include gas reports for tests. | ||
| pub gas_reports_include_tests: bool, | ||
|
|
@@ -302,9 +305,10 @@ pub struct Config { | |
| /// Multiple etherscan api configs and their aliases | ||
| #[serde(default, skip_serializing_if = "EtherscanConfigs::is_empty")] | ||
| pub etherscan: EtherscanConfigs, | ||
| /// list of solidity error codes to always silence in the compiler output | ||
| /// List of solidity error codes to always silence in the compiler output. | ||
| pub ignored_error_codes: Vec<SolidityErrorCode>, | ||
| /// list of file paths to ignore | ||
| /// List of file paths to ignore. | ||
| // todo(onbjerg): how is this different from `skip`? | ||
| #[serde(rename = "ignored_warnings_from")] | ||
| pub ignored_file_paths: Vec<PathBuf>, | ||
| /// Diagnostic level (minimum) at which the process should finish with a non-zero exit. | ||
|
|
@@ -397,6 +401,7 @@ pub struct Config { | |
| /// If this limit is exceeded, a `MemoryLimitOOG` result is thrown. | ||
| /// | ||
| /// The default is 128MiB. | ||
| // todo(onbjerg): this seems unused. | ||
| pub memory_limit: u64, | ||
|
Comment on lines
+404
to
405
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. revm does allow configuring this and we are passing the value into it; must not be wired correctly
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is, it goes through the serialize config->deserialize into evmopts dance
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually it's broken but for a different reason, we set it correctly in cfg env #12299 |
||
| /// Additional output selection for all contracts, such as "ir", "devdoc", "storageLayout", | ||
| /// etc. | ||
|
|
@@ -429,8 +434,10 @@ pub struct Config { | |
| #[serde(default)] | ||
| pub extra_output_files: Vec<ContractOutputSelection>, | ||
| /// Whether to print the names of the compiled contracts. | ||
| // todo(onbjerg): this seems unused. | ||
| pub names: bool, | ||
| /// Whether to print the sizes of the compiled contracts. | ||
| // todo(onbjerg): this seems unused. | ||
| pub sizes: bool, | ||
|
Comment on lines
436
to
441
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These should not be unused; should correspond with the I am not sure if this ever worked |
||
| /// If set to true, changes compilation pipeline to go through the Yul intermediate | ||
| /// representation. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is for ignoring warnings https://github.com/foundry-rs/compilers/blob/799f83ed4a1b67e39428106f51128d1c8f891f8c/crates/compilers/src/compile/output/mod.rs#L831