Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shards update/install/build failing at the crystal-pg step #215

Closed
rishavs opened this issue Oct 12, 2020 · 2 comments
Closed

shards update/install/build failing at the crystal-pg step #215

rishavs opened this issue Oct 12, 2020 · 2 comments

Comments

@rishavs
Copy link

rishavs commented Oct 12, 2020

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.

@rishavs rishavs changed the title shards update failing as the shards repo needs to be updated with new tag shards update/install/build failing at the crystal-pg step Oct 12, 2020
@will
Copy link
Owner

will commented Oct 12, 2020

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
Copy link
Author

rishavs commented Oct 12, 2020

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$

@rishavs rishavs closed this as completed Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants