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

Bump dependency versions #106

Merged
merged 9 commits into from Feb 12, 2023
Merged

Bump dependency versions #106

merged 9 commits into from Feb 12, 2023

Conversation

larry0x
Copy link
Collaborator

@larry0x larry0x commented Jan 25, 2023

  • Bump core CosmWasm packages (cw-plus, cw-storage-plus, cw-utils) to v1.0
  • Only specify the first one or two positions in semvar. E.g. cosmwasm-std 1.2 instead of cosmwasm-std 1.2.0. @apollo-sturdy recently told me that these actually mean exactly the same - if you run cargo update, cargo updates the package to the latest under 1.*.* regardless whether you specify the version as 1 or 1.2 or 1.2.0
  • Bump cw-nfts to v0.17 since this is a breaking change
  • The "raw" schema folders are deleted (not committed to the repo)

@larry0x larry0x marked this pull request as draft January 26, 2023 13:26
@peara
Copy link
Contributor

peara commented Jan 31, 2023

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.

@@ -36,7 +36,7 @@ fi
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
${image}:0.12.9
${image}:0.12.11
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update rust-optimizer version

@@ -56,6 +56,8 @@ for d in contracts/*; do
cd ../..
fi
done

rm -rf contracts/**/schema/raw
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The raw schema folders don't need to be committed

@larry0x larry0x marked this pull request as ready for review February 12, 2023 00:16
@shanev
Copy link
Member

shanev commented Feb 12, 2023

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
Copy link
Collaborator Author

larry0x commented Feb 12, 2023

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.

@JakeHartnell JakeHartnell merged commit 8fe7939 into public-awesome:main Feb 12, 2023
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

Successfully merging this pull request may close these issues.

4 participants