Conversation
smiasojed
commented
Sep 18, 2023
crates/metadata/src/lib.rs
Outdated
| /// binary. | ||
| pub fn check_contract_ink_compatibility(ink_version: &Version) -> Result<()> { | ||
| let ink_minimal_version = | ||
| Version::parse("4.0.0-alpha.1").expect("Parsing version failed"); |
Contributor
Author
There was a problem hiding this comment.
here dependency is hardcoded,
optionally we could have compatibility.json file:
{
"versions": [
{
"cargo-contract": ">=1.0.0,<2.0.0",
"ink": ">=3.0.0,<4.0.0"
},
{
"cargo-contract": ">=4.0.0",
"ink": ">=4.0.0"
}
]
}
and include it to code (include_str)
ascjones
reviewed
Sep 25, 2023
This reverts commit a58ae70.
ascjones
reviewed
Sep 28, 2023
ascjones
reviewed
Oct 3, 2023
Collaborator
ascjones
left a comment
There was a problem hiding this comment.
Looks good, a few improvements can be made to the readability of the comparison logic 👇
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add warning message when using incompatible contract's ink! version
Closes #754
inkorpallet-contracts?Description
Checks the compatibility of the contract's ink version with the cargo-contract. If a version mismatch is detected, a warning message will be displayed:
warning: The cargo-contract is not compatible with the contract's ink! version. Please update the cargo-contract to version '1.5.0' or update the contract ink! to a version of '^4.0.0-alpha.3', '^4.0.0', '^5.0.0-alpha'
Checklist before requesting a review
CHANGELOG.md