I don’t understand why shards is complaining about unsatisfied version numbers.
e.g. when I made my project depend on amber and ran shards install
I got the following:
Unable to satisfy the following requirements:
- `crystal (>= 0.35.0)` required by `amber_router 0.4.4`
- `crystal (>= 0.34.0, < 2.0.0)` required by `json_mapping 0.1.1`
- `crystal (>= 0.35.0)` required by `ameba 0.13.4`
- `crystal (~> 0.30, >= 0.30.0)` required by `cli 0.9.3`
But I have crystal 1.0.0 installed.
This already happened a few times with other projects as well.
Basically this is RFC: shard.yml crystal semantic · Issue #365 · crystal-lang/shards · GitHub and Support for Crystal v1.0.0 · Issue #1251 · amberframework/amber · GitHub. The gist of it is that the latest release of Amber has a dependency on amberframework/cli
with a version of ~> 0.9.3
. Version 0.9.3
(the latest for that shard that is compatible with the restriction) has a crystal: 0.30.0
in it’s shard.yml
. Because of the current semantics of the crystal
field, that shard is not installable (by default) by Crystal 1.x, and as such Amber is not installable because of that one dependency.
The semantics of crystal
have been since changed, ref: Feature/warn only crystal version by beta-ziliani · Pull Request #496 · crystal-lang/shards · GitHub. For now you’ll need to wait for a new Amber release that has compatible dependencies, or try installing with the --ignore-crystal-version
flag, which won’t enforce the version incompatibility.
1 Like
Thanks for the explanation.