Skip to content

Commit 850de50

Browse files
authored
feat(vyper): add experimental codegen to settings (#186)
1 parent 9af04b2 commit 850de50

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

crates/artifacts/vyper/src/settings.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ pub struct VyperSettings {
4040
pub output_selection: OutputSelection,
4141
#[serde(rename = "search_paths", skip_serializing_if = "Option::is_none")]
4242
pub search_paths: Option<BTreeSet<PathBuf>>,
43+
#[serde(skip_serializing_if = "Option::is_none")]
44+
pub experimental_codegen: Option<bool>,
4345
}
4446

4547
impl VyperSettings {

crates/compilers/src/compilers/vyper/settings.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,20 @@ impl CompilerSettings for VyperSettings {
1010
}
1111

1212
fn can_use_cached(&self, other: &Self) -> bool {
13-
let Self { evm_version, optimize, bytecode_metadata, output_selection, search_paths } =
14-
self;
13+
let Self {
14+
evm_version,
15+
optimize,
16+
bytecode_metadata,
17+
output_selection,
18+
search_paths,
19+
experimental_codegen,
20+
} = self;
1521
evm_version == &other.evm_version
1622
&& optimize == &other.optimize
1723
&& bytecode_metadata == &other.bytecode_metadata
1824
&& output_selection.is_subset_of(&other.output_selection)
1925
&& search_paths == &other.search_paths
26+
&& experimental_codegen == &other.experimental_codegen
2027
}
2128

2229
fn with_include_paths(mut self, include_paths: &BTreeSet<PathBuf>) -> Self {

0 commit comments

Comments
 (0)