difftreelog
build do not build stubgen by default
in: master
11 files changed
.maintain/scripts/generate_sol.shdiffbeforeafterboth--- a/.maintain/scripts/generate_sol.sh
+++ b/.maintain/scripts/generate_sol.sh
@@ -4,7 +4,7 @@
PRETTIER_CONFIG="$(pwd)""/.prettierrc"
tmp=$(mktemp)
-cargo test --package $PACKAGE -- $NAME --exact --nocapture --ignored | tee $tmp
+cargo test --package=$PACKAGE --features=stubgen -- $NAME --exact --nocapture --ignored | tee $tmp
raw=$(mktemp --suffix .sol)
sed -n '/=== SNIP START ===/, /=== SNIP END ===/{ /=== SNIP START ===/! { /=== SNIP END ===/! p } }' $tmp > $raw
crates/evm-coder/Cargo.tomldiffbeforeafterboth--- a/crates/evm-coder/Cargo.toml
+++ b/crates/evm-coder/Cargo.toml
@@ -37,3 +37,5 @@
"evm-core/std",
"frame-support/std",
]
+# Stub/interface generation
+stubgen = []
crates/evm-coder/procedural/src/solidity_interface.rsdiffbeforeafterboth--- a/crates/evm-coder/procedural/src/solidity_interface.rs
+++ b/crates/evm-coder/procedural/src/solidity_interface.rs
@@ -951,6 +951,7 @@
u32::to_be_bytes(interface_id)
}
/// Generate solidity definitions for methods described in this interface
+ #[cfg(feature = "stubgen")]
pub fn generate_solidity_interface(tc: &evm_coder::solidity::TypeCollector, is_impl: bool) {
use evm_coder::solidity::*;
use core::fmt::Write;
crates/evm-coder/procedural/src/to_log.rsdiffbeforeafterboth--- a/crates/evm-coder/procedural/src/to_log.rs
+++ b/crates/evm-coder/procedural/src/to_log.rs
@@ -195,6 +195,7 @@
#consts
)*
+ #[cfg(feature = "stubgen")]
pub fn generate_solidity_interface(tc: &evm_coder::solidity::TypeCollector, is_impl: bool) {
use evm_coder::solidity::*;
use core::fmt::Write;
crates/evm-coder/src/lib.rsdiffbeforeafterboth108#[doc(hidden)]108#[doc(hidden)]109pub mod events;109pub mod events;110#[doc(hidden)]110#[doc(hidden)]111#[cfg(feature = "stubgen")]111pub mod solidity;112pub mod solidity;112113113/// Solidity type definitions (aliases from solidity name to rust type)114/// Solidity type definitions (aliases from solidity name to rust type)354#[macro_export]355#[macro_export]355macro_rules! generate_stubgen {356macro_rules! generate_stubgen {356 ($name:ident, $decl:ty, $is_impl:literal) => {357 ($name:ident, $decl:ty, $is_impl:literal) => {358 #[cfg(feature = "stubgen")]357 #[test]359 #[test]358 #[ignore]360 #[ignore]359 fn $name() {361 fn $name() {pallets/common/Cargo.tomldiffbeforeafterboth--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -45,3 +45,4 @@
"up-data-structs/runtime-benchmarks",
]
try-runtime = ["frame-support/try-runtime"]
+stubgen = ["evm-coder/stubgen"]
pallets/evm-contract-helpers/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-contract-helpers/Cargo.toml
+++ b/pallets/evm-contract-helpers/Cargo.toml
@@ -52,3 +52,4 @@
"up-sponsorship/std",
]
try-runtime = ["frame-support/try-runtime"]
+stubgen = ["evm-coder/stubgen"]
pallets/fungible/Cargo.tomldiffbeforeafterboth--- a/pallets/fungible/Cargo.toml
+++ b/pallets/fungible/Cargo.toml
@@ -46,3 +46,4 @@
]
runtime-benchmarks = ['frame-benchmarking', 'pallet-common/runtime-benchmarks']
try-runtime = ["frame-support/try-runtime"]
+stubgen = ["evm-coder/stubgen", "pallet-common/stubgen"]
pallets/nonfungible/Cargo.tomldiffbeforeafterboth--- a/pallets/nonfungible/Cargo.toml
+++ b/pallets/nonfungible/Cargo.toml
@@ -52,3 +52,4 @@
'up-data-structs/runtime-benchmarks',
]
try-runtime = ["frame-support/try-runtime"]
+stubgen = ["evm-coder/stubgen", "pallet-common/stubgen"]
pallets/refungible/Cargo.tomldiffbeforeafterboth--- a/pallets/refungible/Cargo.toml
+++ b/pallets/refungible/Cargo.toml
@@ -54,3 +54,4 @@
'up-data-structs/runtime-benchmarks',
]
try-runtime = ["frame-support/try-runtime"]
+stubgen = ["evm-coder/stubgen", "pallet-common/stubgen"]
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -169,6 +169,7 @@
]
limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
unique-runtime = []
+stubgen = ["evm-coder/stubgen"]
refungible = []
scheduler = []