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

Idea: polkadot-dev CLI #5192

Open
ggwpez opened this issue Jul 30, 2024 · 13 comments
Open

Idea: polkadot-dev CLI #5192

ggwpez opened this issue Jul 30, 2024 · 13 comments
Assignees
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.

Comments

@ggwpez
Copy link
Member

ggwpez commented Jul 30, 2024

(Some ideas around a polkadot developer CLI from @shawntabrizi and me)

Currently we use psvm and zepter to help devs get stuff done. Would be nice to have some general CLI that helps devs and bundles the following:

  • polkadot-dev format (format everything with the correct nightly rust version)
  • polkadot-dev lint features (runs zepter)
  • polkadot-dev lint (runs format, zepter and checks that the versions are coherent with psvm)
  • polkadot-dev version (command to control the version via psvm)
  • polkadot-dev prdoc (generate prdoc with default filled in for all modified crates)
  • polkadot-dev help contribute (doc only command to print a checklist on how to contribute)

It could also have functionality to lint FRAME pallets for common mistakes / bugs.

@shawntabrizi shawntabrizi added C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. and removed C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. labels Jul 30, 2024
@shawntabrizi
Copy link
Member

shawntabrizi commented Jul 30, 2024

@shawntabrizi
Copy link
Member

polkadot-dev format is intended to run cargo fmt with the correct compiler version. At the time of writing this is cargo +nightly-2024-04-14 fmt.

The CLI will need to sync the right version based on what polkadot-sdk ci/cd expects.

@programskillforverification
Copy link
Contributor

I want to try this one. Please assign to me.

@shawntabrizi
Copy link
Member

@programskillforverification Done.

Please keep us updated with your progress and thinking so we can help direct you and give feedback.

@xlc
Copy link
Contributor

xlc commented Jul 31, 2024

sounds like a useful thing, but can we do it elsewhere? i.e. keep the size of this repo manageable
I see no reason to have such tool included in this repo.

@shawntabrizi
Copy link
Member

@xlc sure, I think it need not be in this repo. I think this is just a place to track the issue.

@programskillforverification
Copy link
Contributor

@xlc sure, I think it need not be in this repo. I think this is just a place to track the issue.

I am not sure when the new repo is created. Could I open new pr in this repo temporarily? Once new repo created, just migrate files

@xlc
Copy link
Contributor

xlc commented Jul 31, 2024

it doesn't make sense to PR here. just make your own repo and we can see what do to about it later.
if you don't want to put it under your own github account for whatever reason, I can make a repo at https://github.com/open-web3-stack

@YashBit
Copy link

YashBit commented Jul 31, 2024

@shawntabrizi

Hi, I am new to the polkadot ecosystem.

Just wanted to inquire if there are grants to solve issues. Could we get in touch on discord?

@tmpolaczyk
Copy link
Contributor

If this script will be as simple as a makefile, why not use something standard? I know make sounds pretty bad for a Rust project, but there are many modern rewrites such as just that work pretty well.

https://github.com/casey/just

@shawntabrizi
Copy link
Member

We should also add a command which installs the dependencies required to do polkadot-sdk development:

Perhaps polkadot-dev install

@ggwpez
Copy link
Member Author

ggwpez commented Aug 3, 2024

We should also add a command which installs the dependencies required to do polkadot-sdk development:

Yea we recently added this script: https://github.com/paritytech/polkadot-sdk/blob/master/scripts/getting-started.sh

If this script will be as simple as a makefile, why not use something standard? I know make sounds pretty bad for a Rust project, but there are many modern rewrites such as just that work pretty well.

It should also work outside of the SDK (eg the runtimes repo).

@shawntabrizi
Copy link
Member

shawntabrizi commented Aug 3, 2024

I imagine the CLI could simply activate:

curl --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/scripts/getting-started.sh -sSf | sh

Or probably even do a better experience for not currently supported OS like windows.

EDIT: I am not a fan that this script downloads and compiles a minimal template. It doesn't make it just a script for installing dependencies.

@ggwpez ggwpez mentioned this issue Sep 23, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
Projects
None yet
Development

No branches or pull requests

6 participants