mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 00:37:57 +00:00
Error on duplicated crates (#3082)
#2970 accidentally added a crate twice to the workspace. Now extending the workspace check to explicitly error then. I think the check should also be required now. --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
6a168ad57a
commit
0291658eb7
@@ -27,6 +27,7 @@ def main(root, exclude):
|
||||
all_crates = get_crates(root, exclude)
|
||||
print(f'📦 Found {len(all_crates)} crates in total')
|
||||
|
||||
check_duplicates(workspace_crates)
|
||||
check_missing(workspace_crates, all_crates)
|
||||
check_links(all_crates)
|
||||
|
||||
@@ -89,6 +90,16 @@ def get_crates(workspace_dir, exclude_crates) -> dict:
|
||||
|
||||
return crates
|
||||
|
||||
# Check that there are no duplicate entries in the workspace.
|
||||
def check_duplicates(workspace_crates):
|
||||
print(f'🔎 Checking for duplicate crates')
|
||||
found = {}
|
||||
for path in workspace_crates:
|
||||
if path in found:
|
||||
print(f'❌ crate is listed twice in the workspace {path}')
|
||||
sys.exit(1)
|
||||
found[path] = True
|
||||
|
||||
# Check that all crates are in the workspace.
|
||||
def check_missing(workspace_crates, all_crates):
|
||||
print(f'🔎 Checking for missing crates')
|
||||
|
||||
Reference in New Issue
Block a user