Skip to content

Commit 91030da

Browse files
authored
fix: mark flag incompatibility (foundry-rs#9530)
* enforce stricter command compatibility mode for forge test * add conflicting cases for anvil * revert anvil changes, derivation_path is not exclusive to mnemonics
1 parent 0eff1ef commit 91030da

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

crates/anvil/src/cmd.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub struct NodeArgs {
7575

7676
/// The EVM hardfork to use.
7777
///
78-
/// Choose the hardfork by name, e.g. `shanghai`, `paris`, `london`, etc...
78+
/// Choose the hardfork by name, e.g. `cancun`, `shanghai`, `paris`, `london`, etc...
7979
/// [default: latest]
8080
#[arg(long)]
8181
pub hardfork: Option<String>,
@@ -177,7 +177,7 @@ pub struct NodeArgs {
177177
/// Max number of states to persist on disk.
178178
///
179179
/// Note that `prune_history` will overwrite `max_persisted_states` to 0.
180-
#[arg(long)]
180+
#[arg(long, conflicts_with = "prune_history")]
181181
pub max_persisted_states: Option<usize>,
182182

183183
/// Number of blocks with transactions to keep in memory.

crates/forge/bin/cmd/test/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pub struct TestArgs {
7979
///
8080
/// If the matching test is a fuzz test, then it will open the debugger on the first failure
8181
/// case. If the fuzz test does not fail, it will open the debugger on the last fuzz case.
82-
#[arg(long, value_name = "DEPRECATED_TEST_FUNCTION_REGEX")]
82+
#[arg(long, conflicts_with_all = ["flamegraph", "flamechart", "decode_internal", "rerun"], value_name = "DEPRECATED_TEST_FUNCTION_REGEX")]
8383
debug: Option<Option<Regex>>,
8484

8585
/// Generate a flamegraph for a single test. Implies `--decode-internal`.
@@ -123,7 +123,7 @@ pub struct TestArgs {
123123
allow_failure: bool,
124124

125125
/// Output test results as JUnit XML report.
126-
#[arg(long, conflicts_with_all = ["quiet", "json", "gas_report"], help_heading = "Display options")]
126+
#[arg(long, conflicts_with_all = ["quiet", "json", "gas_report", "summary", "list", "show_progress"], help_heading = "Display options")]
127127
pub junit: bool,
128128

129129
/// Stop running tests after the first failure.
@@ -135,7 +135,7 @@ pub struct TestArgs {
135135
etherscan_api_key: Option<String>,
136136

137137
/// List tests instead of running them.
138-
#[arg(long, short, help_heading = "Display options")]
138+
#[arg(long, short, conflicts_with_all = ["show_progress", "decode_internal", "summary"], help_heading = "Display options")]
139139
list: bool,
140140

141141
/// Set seed used to generate randomness during your fuzz runs.
@@ -154,7 +154,7 @@ pub struct TestArgs {
154154
pub fuzz_input_file: Option<String>,
155155

156156
/// Show test execution progress.
157-
#[arg(long)]
157+
#[arg(long, conflicts_with_all = ["quiet", "json"], help_heading = "Display options")]
158158
pub show_progress: bool,
159159

160160
#[command(flatten)]

0 commit comments

Comments
 (0)