scry
scry copied to clipboard
Build failure on master branch, Crystal 1.0.0; dependency resolution problem.
Hello!
I am new to Crystal and I was hoping to use the Scry language server.
I installed Crystal itself using Homebrew (https://brew.sh). The output of crystal version
is:
Crystal 1.0.0 (2021-03-22)
LLVM: 9.0.1
Default target: x86_64-apple-macosx
I cloned this repo, and ran shards build --verbose --release
as instructed. However, I got the following error:
lsp: checking...
Resolving dependencies
git ls-remote --get-url origin
Fetching https://github.com/crystal-lang-tools/lsp.git
git fetch --all --quiet
git ls-tree -r --full-tree --name-only refs/tags/v0.2.0 -- shard.yml
git show refs/tags/v0.2.0:shard.yml
git ls-remote --get-url origin
Fetching https://github.com/crystal-lang/json_mapping.cr.git
git fetch --all --quiet
git ls-tree -r --full-tree --name-only refs/tags/v0.1.0 -- shard.yml
git show refs/tags/v0.1.0:shard.yml
git tag --list --column=never
git ls-tree -r --full-tree --name-only refs/tags/v0.2.0 -- shard.yml
git show refs/tags/v0.2.0:shard.yml
git tag --list --column=never
git ls-tree -r --full-tree --name-only refs/tags/v0.1.0 -- shard.yml
git show refs/tags/v0.1.0:shard.yml
git ls-tree -r --full-tree --name-only refs/tags/v0.1.1 -- shard.yml
git show refs/tags/v0.1.1:shard.yml
Unable to satisfy the following requirements:
- `crystal (~> 0.36, >= 0.36.1)` required by `lsp 0.2.0`
- `crystal (~> 0.34, >= 0.34.0)` required by `json_mapping 0.1.0`
Failed to resolve dependencies, try updating incompatible shards or use --ignore-crystal-version as a workaround if no update is available.
Did I do something wrong? Is there some requirement or build step I missed?
I have the same problem on both master
(https://github.com/crystal-lang-tools/scry/commit/8e8e822470a942c1f8fbf5b4653a17b30674499f) and v0.9.1.
Thanks to Blacksmoke16 on Gitter/Matrix, I learned that this is because of a maybe-overly-strict default in Shards (https://github.com/crystal-lang/shards/pull/493), that causes the json_mapping
and lsp
shards to be inadvertently incompatible with Crystal 1.0.0. This seems like an issue with both upstream projects, as well as Scry itself.
The ad-hoc workaround is to run shards build --verbose --release --ignore-crystal-version
, but this seems like a pretty straightforward fix to shards.yml
in the affected packages.