Error when trying to pull v0.7.2
eliasjpr opened this issue · 14 comments
I got the following error when doing shards update
for a project for version v0.7.2
Failed git ls-tree -r --full-tree --name-only v7.0.1 -- shard.yml (). Maybe a commit, branch or file doesn't exist?
shards.yml
clear:
github: anykeyh/clear
version: ~> 0.7.2
There is a pb here:
Failed git ls-tree -r --full-tree --name-only v7.0.1
It's related to the fact that I destroyed this tag. I think the shards
binary freak-out
You should probably do that:
# In your project directory
rm -r lib/clear
rm lib/clear.sha1
Tell me if it fixes your break !
Did it fix it?
Hi
On a fresh test i have this bug too
Miranda-II/lukc ~/Sources > git clone https://github.com/remydev/clear_test
Cloning into 'clear_test'...
/usr/lib/git-core/git-remote-https: /usr/local/lib/libcurl.so.4: no version information available (required by /usr/lib/git-core/git-remote-https)
cd cleremote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 20 (delta 4), reused 12 (delta 2), pack-reused 0
Unpacking objects: 100% (20/20), done.
Miranda-II/lukc ~/Sources > cd clear_test
Miranda-II/lukc ~/Sources/clear_test > ls
HttpExamples.elm README.md shard.yml src
Miranda-II/lukc ~/Sources/clear_test > shards install
Fetching https://github.com/anykeyh/clear.git
Failed git ls-tree -r --full-tree --name-only v7.0.1 -- shard.yml (). Maybe a commit, branch or file doesn't exist?
Well, testing on my side will not crash... shards utility will hang on:
Fetching https://github.com/anykeyh/generate.cr.git
Using verbose I can see an endless loop. I'm going to check with shards utility maintainer
Quick fix: Adding version: "~> 0.7.2"
in your shards.yml file will make it works perfectly
Im still getting the following error
shard.yml
clear:
github: anykeyh/clear
version: ~> 0.7.2
running shards install
➜ slim git:(master) ✗ make build
Fetching https://github.com/onyxframework/onyx.git
Fetching https://github.com/gdotdesign/cr-dotenv.git
Fetching https://github.com/anykeyh/clear.git
Failed git ls-tree -r --full-tree --name-only v7.0.1 -- shard.yml (). Maybe a commit, branch or file doesn't exist?
make: *** [lib] Error 1
I think the v0.7.2
tag is corrupt. Maybe making a new release will fix it v0.7.3
or deleting the tag from the releases section on github and re-releasing the same tag. 🤷♂
Something is up with the repo. I forked the repo and pointed the shard to the repo and I was able to run shards install with no errors using the following in the yaml file.
clear:
github: anykeyh/clear
version: ~> 0.7.2
Sorry, now I understand. It's related to shards.lock file.
This should be the definitive fix:
- Remove reference to clear into
shards.lock
(or if you're not scared to update every shards, simply delete shards.lock) - Remove
lib/clear
folder - Remove
lib/clear.sha1
file - Call
shard update
- Profit 😄
What happens is your shards.lock is locked to 7.0.1 or above. Well, there is no above 7.x (and won't before I get grand-father at least haha). The problem now is shards
freak out because the tag doesn't exist anymore.
Simply removing all references to 7.0.1 by destroying shards.lock
file should do the trick
I tried the above and still the same error.
Very weird. I cannot reproduce, it works perfectly on new project :
$ mkdir new_project
$ cd new_project/
$ shards init
Created shard.yml
$ cat > shard.yml <<EOF
name: new_project
version: 0.1.0
dependencies:
clear:
github: anykeyh/clear
version: ~> 0.7.2
EOF
$ shards update
Resolving dependencies
Fetching https://github.com/anykeyh/clear.git
Fetching https://github.com/jwaldrip/admiral.cr.git
Fetching https://github.com/anykeyh/generate.cr.git
Fetching https://github.com/will/crystal-pg.git
Fetching https://github.com/crystal-lang/crystal-db.git
Fetching https://github.com/phoffer/inflector.cr.git
Installing clear (0.7.2)
Installing admiral (1.8.0 at 0892415a8775fe59ff4c6de6cb5b21da8c9acd8e)
Installing generate (0.1.0 at 27a59d663ded8ce39a361e3a88b8dd747f59ce42)
Installing pg (0.19.0 at 650b16faf3c916b7bc30c9ec558871e2c396e212)
Installing inflector (0.1.8)
Installing db (0.7.0)
Writing shard.lock
I'll probably release 0.8.0 in a few days/weeks; meanwhile, you can use your own fork. And if you find out how to fix it, I would be curious to know what was the problem :)
I'll look into it today. Thanks.
I really like Clear, great ORM. Noticed that is missing some documentation will add some when I can
Hello, I'm closing this as we released v0.8