The ink version (4.2.1) used in contract templates do not come prefixed with a "=" or "v".\
This logs the warning below when running swanky check command.
[WARNING]Some of the ink dependencies do not have a fixed version.
This can lead to accidentally installing version higher than supported by the node.
Please use "=" to install a fixed version (Example: "=3.0.1")
Then, this error occurs when adding the "=" prefix manually to the ink version in the Cargo.toml of the flipper contract template.
swanky check
✔ Check Rust
✔ Check cargo
✔ Check cargo nightly
✔ Check cargo dylint
✔ Check cargo-contract
✔ Read ink dependencies
error: UnknownError: Invalid Version: =4.2.1
Please report this bug at: https://github.com/swankyhub/swanky-cli/issues
at new SemVer (~/Documents/dev/astar/swanky-cli/node_modules/semver/classes/semver.js:38:13)
at compare (~/Documents/dev/astar/swanky-cli/node_modules/semver/functions/compare.js:3:3)
at Object.gt (~/Documents/dev/astar/swanky-cli/node_modules/semver/functions/gt.js:2:29)
at file://~/Documents/dev/astar/swanky-cli/dist/commands/check/index.js:79:51
at Array.forEach (<anonymous>)
at Task.task [as taskFn] (file://~/Documents/dev/astar/swanky-cli/dist/commands/check/index.js:76:60)
at Task.run (file://~/Documents/dev/astar/swanky-cli/node_modules/listr2/dist/index.js:1956:35)
To fix
[ ] Set fixed version on all contract templates dependencies.
[ ] Adjust the "Verify ink version" task to support "=" prefix.
[ ] Remove version.startsWith("v") since it is not a valid Rust prefix.
Steps to Reproduce
swanky init test
cd test
swanky check
Expected vs. Actual Behavior
Expected: No warning logged.
Actual Behavior: Warning logged.
Description
The ink version (4.2.1) used in contract templates do not come prefixed with a "=" or "v".\ This logs the warning below when running
swanky check
command.Then, this error occurs when adding the "=" prefix manually to the ink version in the
Cargo.toml
of the flipper contract template.To fix
version.startsWith("v")
since it is not a valid Rust prefix.Steps to Reproduce
swanky init test
cd test
swanky check
Expected vs. Actual Behavior
Expected: No warning logged. Actual Behavior: Warning logged.
Environment