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

Automatically update dependency version #23

Open
gjermundgaraba opened this issue Jan 3, 2023 · 5 comments
Open

Automatically update dependency version #23

gjermundgaraba opened this issue Jan 3, 2023 · 5 comments

Comments

@gjermundgaraba
Copy link

In the current "Create a Rust project" section, the Cargo.toml code references an old version of cosmwasm-std:

cosmwasm-std = { version = "1.0.0-beta8", features = ["staking"] }

The reason I am not just creating a PR to fix this is because I am wondering if there might be a better way to automatically keep dependency numbers up-to-date, or if this section should simply use cargo add cosmwasm-std instead?

@gjermundgaraba
Copy link
Author

Small additional question: it is not clear why the "staking" feature is added.

@0xjuju
Copy link

0xjuju commented Feb 2, 2023

Each time the version changes, isn't there the possibilty of a different dependency breaking? If it's automatic, changes like deprections etc., written in the documentation would need to be manually changed anyway. So no reason to update automatically since the tutorial aspects would need to be manually changed anyway.

@0xjuju
Copy link

0xjuju commented Feb 2, 2023

If I understand that properly

@gjermundgaraba
Copy link
Author

Yeah, that is true and potentially an issue as well. At the same time, it is also not great that the tutorials reference old beta versions :)

The main reason I was suggesting this is because it is a lot of work to keep these things up-to-date, and if it is reasonably safe to do this automatically, it would be useful :)

I guess the ideal solution, in any case, would be that someone tested and updated the versions every time they change. But if that is not an option, what is the second best?

@0xjuju
Copy link

0xjuju commented Feb 3, 2023

Yeah, that is true and potentially an issue as well. At the same time, it is also not great that the tutorials reference old beta versions :)

The main reason I was suggesting this is because it is a lot of work to keep these things up-to-date, and if it is reasonably safe to do this automatically, it would be useful :)

I guess the ideal solution, in any case, would be that someone tested and updated the versions every time they change. But if that is not an option, what is the second best?

Agreed that the version needs to be updated from it's current configuration. I think updating the version every so often while simultaneously updating the tutorial is good. My understanding is that CosmWasm book is designed for new users to gain basic understanding of how to build a contract, along with general CosmWasm code-flow. It's not necessary to stay up to date with the latest version for that use-case in my opnion.

But a second best scenario? Maybe you can do automation for the latest version but not change the actual version that the tutorial is using. Instead, post a link next to it that contains:

  1. the updated version
  2. A list of each version in-between the current and latest, along with a brief summary of "changes" from each version's release notes

This way the user is free to choose between an updated version with somewhat of a guide, or the current version that should always compile. Additionally this method provides an option for the user. Inexperienced programmers can use the current version/tutorial combo. Experienced users can use the updated version and make custom changes as they go, possibly learning more in the process as they'll have to delve a bit more into peculiarities of the protocol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants