A new binary, cosmos-sdk-cli
, that will start by having just the cosmos-sdk-cli init
command, which can be used to initialize a new sdk repository with a Gopkg. We can have flags like --bare
or basecoin
to determine what files we start with.
cosmos-sdk-cli could be the start of a larger toolchain for working with and verifying sdk code.
"CDK" - "Cosmos Development Kit" - cdk init
?
Anyways, I like the idea generally - although I think we want to be careful to avoid re-implementing the wheel (e.g. I'm not convinced EthPM is a wise idea; better to have our libraries operate in a compatible manner with existing tooling).
I'm a bit confused with why we'd like to separate out init to a common binary... what's wrong with keeping the init command with gaiad
, basecoind
etc.? The init command is going to have specific requirements based on the sdk-application being used with it.
Was there any other intention of this binary? Are you thinking also for blockchain debugging tooling?
This is an init command for the code repo itself - it will create a Gopkg.toml and the recommended directory structure. Nothing to do with initializing an actual blockchain.
fantastic idea
This is really great.
One issue that I've had in diverging from the cosmos-sdk repo is the build system. If this "init" could "init" a repo that has the needed build setup, it would save a ton of time and help things get done more quickly.
Love this idea.
This is a great idea. Is anyone working on this already? I've some free time this week and would like to collaborate on this one.
Go for it!
I've implemented a tool called cosmos-zone which will create a new project (based on the democoin in cosmos-sdk examples). Try out and let me know if this was the intended purpose of the tool.
looks good - obviously we want to add this functionality directly into the SDK. high level comments:
x/
)Hi @rigelrozanski Thanks for your feedback.
I agree with you on 1) - I wanted to implement a way to easily get started. So copy pasted democoin app directly into code.
cosmos-zone create-extension my_new_extension
I will also add support for adding extension from other repositories say..
cosmos-zone add-extension github.com/cosmos/cosmos-sdk/x/bank
This will add the extension bank to the App.
But to get to this level, we need a stable Cosmos-SDK and a stable way to create/register extension.
For now I think I'll keep this outside of Cosmos-SDK, and merge them when it is stable.
Based on your feedback, I'll do three things -
make
the tool packages the template into the binary so they are not copy pasted even now.Cool, yeah maybe holding off for sdk stability is a good idea, one less thing which needs to be maintained prelaunch - I will mention however if we merge into the SDK it get's maintained for every change - it's very easy for tools to get out of sync
So you are saying that cosmos team will add the template with every release? Sounds good to me. The tool automatically packages whatever templates into a binary already. Then it is not much work to merge this tool into SDK. Can you point me to the guidelines of contributing to the CosmosSDK?
yeah your main.go
would go into a new package within the sdk cmd/
directory...
here are our contributing guidelines from a high level: https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md
Aah thank you. I missed the CONTRIBUTING.md, was going through README, but missed it. Will merge sometime in the next few days.
I'm trying to follow the steps in CONTRIBUTING.md but looks like develop branch is very much out of sync. What branch should I check out from? master?
oh gosh - we did something weird by changing our work flow but not that file, yes please work from master
Hi @rigelrozanski Thanks! I was able to add cosmos-sdk-cli to cosmos-sdk but the test_lint fails due to templates. I have ignored the cosmos-sdk-cli folder from linting. Is this fine?
You can checkout the commits here: https://github.com/svaishnavy/cosmos-sdk/commits/svaishnavy/cosmos-sdk-cli - Let me know if this is ok to be pushed to master.
Also, I'm trying to add two new build targets(build_cosmos-sdk-cli and install_cosmos-sdk-cli) in make file, but those gets ignored. Do you know why? Where should I include these new targets? (This is fixed, my apologies).
Can we close this in favor of #4191, @rigelrozanski you in favor?
Closing this issue in favor of #4191 .If you are coming to this issue after the fact, please refer to #4191 for further discussions. :)
Most helpful comment
This is an init command for the code repo itself - it will create a Gopkg.toml and the recommended directory structure. Nothing to do with initializing an actual blockchain.