Open Sija opened 3 years ago
Isn't this expected? Or what's unexpected?
>= 0.35.0
restriction satisfies version number 1.0.0
, so what's unexpected is seeing shards with such restrictions listed there.
>= 0.35.0
does not satisfy 1.0.0
That's according to how it was all planned, to my understanding. See this large discussion: https://github.com/crystal-lang/shards/issues/413
It obviously does. I don't follow to which comment you're referring to.
@asterite AFAIU it relates to the ~>
operator.
>= 0.35.0
does not satisfy 1.0.0
No, it does. 1.0.0 >= 0.35.0
is totally correct.
So if shards with CRYSTAL_VERSION=1.0.0
reports unsatisfied requirement crystal (>= 0.35.0)
, that's an error.
@Sija I can't reproduce with https://github.com/Sija/gphoto2-web.cr/commit/65a4751f349a30110dee5cc9d92b8763de6a9e66
The output of shards install
is:
Unable to satisfy the following requirements:
- `crystal (~> 0.35, >= 0.35.1)` required by `gphoto2 0.9.0`
- `crystal (< 1.0.0)` required by `pool 0.2.3`
- `crystal (>= 0.35.0)` required by `raven 1.9.1`
- `crystal (~> 0.35, >= 0.35.0)` required by `kemal 0.27.0`
- `crystal (>= 0.35.0)` required by `ameba 0.14.1`
- `crystal (~> 0.35, >= 0.35.0)` required by `debug 2.0.0`
This correctly identifies a number of mismatches in Crystal requirements.
This correctly identifies a number of mismatches in Crystal requirements.
@straight-shoota It doesn't, look at the requirements for raven
and ameba
dependencies - these two shards shouldn't have been on this list at all.
Indeed, you're right.
Maybe it's listing those shards so you can understand the conflict?
Yeah, but >= 0.35.1
should be subsumed by all other restrictions except < 1.0.0
. And even that is not a conflict.
This bug results in spreading confusion re: the version selectors, see https://github.com/crystal-community/timecop.cr/pull/7 and https://github.com/amberframework/amber-router/pull/30 as another instances of that.
When issuing
shards install/update
command, shards are refusing to cooperate due to unsupported crystal version in some of the dependencies and I'm greeted with a list of shards that are "Unable to satisfy the following requirements":(Notice the satisfied restriction for the shards above.)
But then running the above command with
--ignore-crystal-version
succeeds and the shards above are no longer (and correctly) logged with the messageShard “___" may be incompatible with Crystal 1.0.0
.For a repro case one can clone https://github.com/Sija/gphoto2-web.cr repo and test above steps.