Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clarify when a mismatch happens
  • Loading branch information
cmichi committed Mar 26, 2021
commit 7d352c16cc54454a2dd68de700dec36950358a86
11 changes: 8 additions & 3 deletions src/cmd/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,13 @@ fn do_optimization(
/// Asserts that the contract's dependencies are compatible to the ones used in ink!.
///
/// This function utilizes `cargo tree`, which takes semver into consideration.
/// Hence this function only returns an `Err` if it is a proper mismatch in the
/// major version, and not if the versions mismatch on the minor/patch version.
///
/// Hence this function only returns an `Err` if it is a proper mismatch according
/// to semantic versioning. This means that either:
/// - the major version mismatches, differences in the minor/patch version
/// are not considered incompatible.
/// - or if the version starts with zero (i.e. `0.y.z`) a mismatch in the minor
/// version is already considered incompatible.
fn assert_compatible_ink_dependencies(
manifest_path: &ManifestPath,
verbosity: Verbosity,
Expand All @@ -445,7 +450,7 @@ fn assert_compatible_ink_dependencies(
|_| {
anyhow::anyhow!(
"Mismatching versions of `{}` were found!\n\
Please ensure that your contract and your ink! dependency use a compatible \
Please ensure that your contract and your ink! dependencies use a compatible \
version of this package.",
dependency
)
Expand Down