paritytech / paritytech/polkadot-cli

Remove deprecated `dot parachain` command

Open
#208 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

agent:done good first issue
Dominant language
TypeScript
Stars
10
Forks
2
Avg merge
12h 35m
Merged PRs (30d)
4

Description

Background

The dot parachain <paraId> command was deprecated in the PR that introduced sovereign-account derivation flags on dot account (feature-pallet-accounts branch). Equivalent functionality lives at:

  • Stateless lookup (script-friendly): dot account inspect --parachain <id> --parachain-type <child|sibling> (add --prefix <N> and/or --json as before)
  • Stored (named, reusable as --from, in tx args, in dot account list): dot account add <name> --parachain <id> --parachain-type <child|sibling>

dot parachain is currently kept verbatim for backward compatibility with production scripts that pin the older CLI surface. It now prints a one-line deprecation warning to stderr only on each invocation; stdout is byte-identical to the pre-deprecation behavior so existing pipes / jq / parsers keep working.

Scope of removal

When this issue is worked, delete:

  • src/commands/parachain.ts — the command itself
  • src/commands/parachain.test.ts — the contract tests for the legacy interface
  • The import { registerParachainCommand } from \"./commands/parachain.ts\" line in src/cli.ts
  • The registerParachainCommand(cli); call in src/cli.ts
  • The parachain line in printHelp() in src/cli.ts

The shared core helpers in src/core/parachain.ts (deriveSovereignAccount, isValidParaId, SOVEREIGN_ACCOUNT_TYPES, SovereignAccountType) must remain — they are reused by dot account add / dot account inspect for the supported derivation flags.

A changeset entry should accompany the removal (major if we treat removing a deprecated CLI command as breaking, otherwise minor per repo convention).

Pre-removal checklist

  • Confirm no internal scripts / CI / docs still call dot parachain (grep the org).
  • Confirm a release containing the deprecation warning has been out long enough that consumers have had reasonable notice.
  • Update README / docs / SKILL.md to drop any remaining references to dot parachain (the deprecation PR may have already removed most).

Migration cheat sheet for downstream

Before After
dot parachain 1000 dot account inspect --parachain 1000 --parachain-type child
dot parachain 1000 --type sibling dot account inspect --parachain 1000 --parachain-type sibling
dot parachain 2004 --prefix 0 dot account inspect --parachain 2004 --parachain-type child --prefix 0
dot parachain 1000 --json dot account inspect --parachain 1000 --parachain-type child --json

Note: the new path requires --parachain-type explicitly (no implicit child+sibling pair). Scripts that consumed both halves of the old default output should issue two inspect calls.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/commands/parachain.ts and src/commands/parachain.test.ts, then inspect the registration and help entries in src/cli.ts. Grep the repository for dot parachain references and review README, docs, and SKILL.md. Done means the legacy command and its registrations are removed, shared helpers remain, references are updated, and a changeset accompanies the removal.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, documentation, release
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.