Error shard name (route) doesn't match dependency name (router)
foi opened this issue · 8 comments
Hello, @tbrand !
Error occuried when i'am trying shards install
shard.yml
name: test
version: 0.1.0
authors:
- test <test@protonmail.com>
targets:
test:
db: src/test-db.cr
api: src/test-api.cr
dependencies:
router:
github: tbrand/router.cr
license: MIT
Hi @foi !
Which version of Crystal did you use and what error did you see exactly?
I've tested on 0.27.2 and it works fine!
[foi@mynetbook src]$ shards --version
Shards 0.9.0 (2019-08-06)
[foi@mynetbook src]$ crystal --version
Crystal 0.30.0 (2019-08-06)
LLVM: 8.0.1
Default target: x86_64-pc-linux-gnu
[foi@mynetbook src]$
[foi@mynetbook src]$ shards install
Resolving dependencies
Fetching https://github.com/tbrand/router.cr.git
Error shard name (route) doesn't match dependency name (router)
The version of router.cr might be too old?
Could you update it by shards update
or delete shard.lock?
HI! @tbrand
It is clean project - only with shard.yml file as i descibe in the first post.
I've record asciicast: https://asciinema.org/a/265276
I couldn't see the error again with the project of same structure but I'm using crystal 0.30.1 and shards 0.8.1.
It's quite wierd but could you try the combination of the versions?
I can't believe that it occurs the problem anyway...
Hey there. I'm having the same issue.
Example shard.yml
. (Empty directory - just shard.yml
)
name: routercr-install
version: 0.1.0
# authors:
# - name <email@example.com>
# description: |
# Short description of routercr-install
dependencies:
router:
github: tbrand/router.cr
# development_dependencies:
# webmock:
# github: manastech/webmock.cr
# license: MIT
After shards install
Resolving dependencies
Fetching https://github.com/tbrand/router.cr.git
Error shard name (route) doesn't match dependency name (router)
Versions
❯ shards --version
Shards 0.9.0 (2019-08-06)
❯ crystal -v
Crystal 0.30.1 (2019-08-13)
LLVM: 8.0.1
Default target: x86_64-pc-linux-gnu
Ah - I should mention that bounding the version fixes it:
# shard.yml (lines 10-13)
dependencies:
router:
github: tbrand/router.cr
version: >= 0.2.7
as mentioned in crystal-lang/shards#295 (comment)