public-awesome / cw-nfts

Examples and helpers to build NFT contracts on CosmWasm
Apache License 2.0
185 stars 181 forks source link

Bump dependency versions #106

Closed larry0x closed 1 year ago

larry0x commented 1 year ago
peara commented 1 year ago

Hi, although cosmwasm-std 1.2.0 and cosmwasm-std 1.2 are the same to cargo. cosmwasm-std 1.2.1 is not. As stated in The Cargo Book :

The string "0.1.12" is a version requirement. Although it looks like a specific version of the time crate, it actually specifies a range of versions and allows SemVer compatible updates. An update is allowed if the new version number does not modify the left-most non-zero digit in the major, minor, patch grouping. In this case, if we ran cargo update -p time, cargo should update us to version 0.1.13 if it is the latest 0.1.z release, but would not update us to 0.2.0.

I have encountered issues because of this when cosmwasm-std upgraded from 1.0.0 directly to 1.1.0 not long ago. I think to prevent this, packages should be versioned started from x.x.1 instead of x.x.0. But it seems many packages are doing that and I have not used rust long enough to understand. Anyway, another workaround is to specific the long dependency format such as: cosmwasm-std = ">=1.2.0, <1.3.0".

Please consider adding this to prevent unexpected errors.

shanev commented 1 year ago

Should we bump the main version to v1.0.1 for parity with cw-plus? I don't think we need to since this is a different repo now.

larry0x commented 1 year ago

Should we bump the main version to v1.0.1 for parity with cw-plus? I don't think we need to since this is a different repo now.

I expect we will still see major API changes in the repo. I think we should only tag v1 here once we are confident there won't be any major API change here.