Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on duplicated crates #3082

Merged
merged 4 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/scripts/check-workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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')
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ members = [
"polkadot/node/service",
"polkadot/node/subsystem",
"polkadot/node/subsystem-bench",
"polkadot/node/subsystem-bench",
"polkadot/node/subsystem-test-helpers",
"polkadot/node/subsystem-types",
"polkadot/node/subsystem-util",
Expand Down
Loading