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

Repot all templates into a single directory #3460

Merged
merged 29 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
caa30ea
Create docs
kianenigma Oct 22, 2023
3acf463
Rename docs to docs.yml
kianenigma Oct 22, 2023
dcf4cb1
Update docs.yml
kianenigma Oct 22, 2023
4c0725b
Merge branch 'paritytech:master' into master
kianenigma Feb 20, 2024
de9613a
repot templates into one folder
kianenigma Feb 23, 2024
390c251
Master.into()
kianenigma Feb 23, 2024
e88f572
finish repotting cumulus stuff
kianenigma Feb 23, 2024
9133b82
fix
kianenigma Feb 23, 2024
9efe9b2
Merge branch 'master' of github.com:paritytech/polkadot-sdk into kiz-…
kianenigma Feb 23, 2024
ce03571
fix mock
kianenigma Feb 23, 2024
3f0dde9
remove more crates
kianenigma Feb 23, 2024
d9fb65c
Master.into()
kianenigma Feb 29, 2024
35349df
Master.into()
kianenigma Feb 29, 2024
5c2b836
format toml files
kianenigma Feb 29, 2024
632bf05
fix minimal pallet feature flag
kianenigma Feb 29, 2024
26000e0
rename a few things back to make the crate names more backwards compa…
kianenigma Feb 29, 2024
f808428
fix build
kianenigma Mar 1, 2024
2266d47
erge branch 'master' of github.com:paritytech/polkadot-sdk into kiz-r…
kianenigma Mar 4, 2024
af1e679
fix
kianenigma Mar 4, 2024
5459316
unify versions and spec names
kianenigma Mar 4, 2024
3a83c7f
revert to enum for now
kianenigma Mar 4, 2024
89f5bfe
remove license check script
kianenigma Mar 4, 2024
72057de
remove needless [[bin]]
kianenigma Mar 4, 2024
ecc7d8b
add prdoc
kianenigma Mar 4, 2024
c00aea2
also remove bin in solochain
kianenigma Mar 4, 2024
3cc9175
redo prdoc
kianenigma Mar 4, 2024
46d2659
Master.into()
kianenigma Mar 5, 2024
a798f10
add impl
kianenigma Mar 5, 2024
728a025
Merge branch 'master' into kiz-repot-templates
kianenigma Mar 5, 2024
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
22 changes: 11 additions & 11 deletions .github/scripts/check-workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ def parse_args():

parser.add_argument('workspace_dir', help='The directory to check', metavar='workspace_dir', type=str, nargs=1)
parser.add_argument('--exclude', help='Exclude crate paths from the check', metavar='exclude', type=str, nargs='*', default=[])

args = parser.parse_args()
return (args.workspace_dir[0], args.exclude)

def main(root, exclude):
workspace_crates = get_members(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 All @@ -48,14 +48,14 @@ def get_members(workspace_dir, exclude):

if not 'members' in root_manifest['workspace']:
return []

members = []
for member in root_manifest['workspace']['members']:
if member in exclude:
print(f'❌ Excluded member should not appear in the workspace {member}')
sys.exit(1)
members.append(member)

return members

# List all members of the workspace.
Expand All @@ -74,20 +74,20 @@ def get_crates(workspace_dir, exclude_crates) -> dict:
with open(path, "r") as f:
content = f.read()
manifest = toml.loads(content)

if 'workspace' in manifest:
if root != workspace_dir:
print("⏩ Excluded recursive workspace at %s" % path)
continue

# Cut off the root path and the trailing /Cargo.toml.
path = path[len(workspace_dir)+1:-11]
name = manifest['package']['name']
if path in exclude_crates:
print("⏩ Excluded crate %s at %s" % (name, path))
continue
crates[name] = (path, manifest)

return crates

# Check that there are no duplicate entries in the workspace.
Expand Down Expand Up @@ -138,23 +138,23 @@ def check_deps(deps):
if not 'path' in deps[dep]:
broken.append((name, dep_name, "crate must be linked via `path`"))
return

def check_crate(deps):
to_checks = ['dependencies', 'dev-dependencies', 'build-dependencies']

for to_check in to_checks:
if to_check in deps:
check_deps(deps[to_check])

# There could possibly target dependant deps:
if 'target' in manifest:
# Target dependant deps can only have one level of nesting:
for _, target in manifest['target'].items():
check_crate(target)

check_crate(manifest)



links.sort()
broken.sort()
Expand Down
193 changes: 99 additions & 94 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading