Skip to content

Commit

Permalink
Fix umbrella script
Browse files Browse the repository at this point in the history
  • Loading branch information
bkchr committed Jan 9, 2025
1 parent d044efc commit 1f34087
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
14 changes: 10 additions & 4 deletions scripts/generate-umbrella.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,17 @@ def main(path, version):

# No search for a no_std attribute:
with open(lib_path, "r") as f:
content = f.read()
if "#![no_std]" in content or '#![cfg_attr(not(feature = "std"), no_std)]' in content:
nostd_crate = False
for line in f:
line = line.strip()
if line == "#![no_std]" or line == '#![cfg_attr(not(feature = "std"), no_std)]':
nostd_crate = True
break
elif "no_std" in line:
print(line)

if nostd_crate:
nostd_crates.append((crate, path))
elif 'no_std' in content:
raise Exception(f"Found 'no_std' in {lib_path} without knowing how to handle it")
else:
std_crates.append((crate, path))

Expand Down
10 changes: 5 additions & 5 deletions umbrella/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1755,11 +1755,6 @@ default-features = false
optional = true
path = "../substrate/utils/substrate-bip39"

[dependencies.substrate-wasm-builder]
default-features = false
optional = true
path = "../substrate/utils/wasm-builder"

[dependencies.testnet-parachains-constants]
default-features = false
optional = true
Expand Down Expand Up @@ -2495,6 +2490,11 @@ default-features = false
optional = true
path = "../substrate/utils/frame/rpc/state-trie-migration-rpc"

[dependencies.substrate-wasm-builder]
default-features = false
optional = true
path = "../substrate/utils/wasm-builder"

[dependencies.tracing-gum]
default-features = false
optional = true
Expand Down

0 comments on commit 1f34087

Please sign in to comment.