shards update/install/build failing at the crystal-pg step
rishavs opened this issue · 2 comments
rishavs commented
On using shards build/update on my exiting projects, the shards process is failing. I am using wsl on a windows 10 device.
rishav@Romana:/mnt/c/Users/Mockingbird/Documents/GitHub/kaipi$ shards build
Resolving dependencies
Fetching https://github.com/will/crystal-pg.git
Fetching https://github.com/gdotdesign/cr-dotenv.git
Fetching https://github.com/crystal-lang/crystal-db.git
Shard "pg" version (0.21.1) doesn't match tag version (0.22.0)
Installing db (0.10.0)
Failed git archive --format=tar --prefix= refs/tags/v0.10.0 | tar -x -f - -C '/mnt/c/Users/Mockingbird/Documents/GitHub/kaipi/lib/db' (). Maybe a commit, branch or file doesn't exist?
Slightly more verbose error;
git ls-remote --get-url origin
Fetching https://github.com/crystal-lang/crystal-db.git
git fetch --all --quiet
git tag --list --column=never
git ls-tree -r --full-tree --name-only refs/tags/v0.10.0 -- shard.yml
git show refs/tags/v0.10.0:shard.yml
Shard "pg" version (0.21.1) doesn't match tag version (0.22.0)
Installing db (0.10.0)
rm -rf ''/mnt/c/Users/Mockingbird/Documents/GitHub/kaipi/lib/db''
git archive --format=tar --prefix= refs/tags/v0.10.0 | tar -x -f - -C '/mnt/c/Users/Mockingbird/Documents/GitHub/kaipi/lib/db'
Failed git archive --format=tar --prefix= refs/tags/v0.10.0 | tar -x -f - -C '/mnt/c/Users/Mockingbird/Documents/GitHub/kaipi/lib/db' (). Maybe a commit, branch or file doesn't exist?
Here is my env etails;
rishav@Romana:/mnt/c/Users/Mockingbird/Documents/GitHub/kaipi$ crystal -v
Crystal 0.35.1 [5999ae29b] (2020-06-19)
LLVM: 8.0.0
Default target: x86_64-unknown-linux-gnu
rishav@Romana:/mnt/c/Users/Mockingbird/Documents/GitHub/kaipi$ shards --version
Shards 0.11.1 [3b7d490] (2020-06-19)
rishav@Romana:/mnt/c/Users/Mockingbird/Documents/GitHub/kaipi$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
Here is my shards.yml
name: Kaipi
version: 0.1.0
authors:
- your-name-here <your-email-here>
targets:
kaipi:
main: src/kaipi.cr
dependencies:
pg:
github: will/crystal-pg
dotenv:
github: gdotdesign/cr-dotenv
crystal: 0.35.0
license: MIT
Currently I am blocked on restarting with my older projects.
will commented
Oops, looks like I forgot to change shard.yml when doing the last release. I just pushed v0.22.1
which should fix this I think. Can you verify?
rishavs commented
On further investigation, i found that the actual issue is on my side. wsl is having permissions issue with mounted directories.
I believe that the tag mismatch is just a warning
Anyway, just tried again and 22.1 doesn't gives any warnings. Closing the issue. Thanks for the superfast fix :)
^Crishav@Romana:~/dev/kaipi$ shards update
Resolving dependencies
Fetching https://github.com/will/crystal-pg.git
Fetching https://github.com/gdotdesign/cr-dotenv.git
Fetching https://github.com/crystal-lang/crystal-db.git
Using db (0.10.0)
Installing pg (0.22.1)
Using dotenv (0.7.0)
Writing shard.lock
rishav@Romana:~/dev/kaipi$