ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
<FromGitter> <skinnyjames> > @skinnyjames hard to say w/o a reproducible scenario ⏎ ⏎ @Blacksmoke16 , just a follow up on shards install failing in docker, I am able to somewhat reproduce this with shards install on a docker build. ⏎ It seems to generally happen on cloning `https://github.com/mamantoha/http_proxy.git` as a dependency of `https://github.com/mamantoha/crest.git` ⏎ ...
<FromGitter> <skinnyjames> Itd oes seem that `git clone` is wrapped in retry (https://github.com/skinnyjames-forks/shards/blob/master/src/resolvers/git.cr#L319). I'd be surpised if it was netowrk related though.
<FromGitter> <Blacksmoke16> hmm
<FromGitter> <Blacksmoke16> what happens if you try to manually run that git command a few times? does it reproduce that way?
<FromGitter> <moe:busyloop.net> also what `shards --version` is that? 🤔 ⏎ my output of `shards --verbose` is completely different, doesn't use clone at all, only `git fetch`
<FromGitter> <moe:busyloop.net> your output almost looks like it's trying to clone the same shards multiple times in concurrently
<FromGitter> <Blacksmoke16> its in a retry so its failing to clone a few times until the retry is exhausted id guess
<FromGitter> <moe:busyloop.net> ah, it's serial, ok
<FromGitter> <Blacksmoke16> is it possible you already have them installed so it just needs to look for updates? afaik `git fetch` doesnt really allow for pulling a remote repo to your machine?
<FromGitter> <moe:busyloop.net> hm, `rm -rf lib ; shards install --verbose` doesn't show me any clones
<FromGitter> <Blacksmoke16> sec
<FromGitter> <moe:busyloop.net> which is a bit strange indeed
<FromGitter> <Blacksmoke16> no it deff clones
<FromGitter> <Blacksmoke16> `rm -rf ~/.cache/shards` then try again
<FromGitter> <moe:busyloop.net> ah, that was the trick yep
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <moe:busyloop.net> @skinnyjames: fwiw, you could try `--jobs=1` to make sure it's not something weird with the parallel fetching
<FromGitter> <moe:busyloop.net> but that has been released quite a while ago and i haven't heard complaints, yet, so seems unlikely to me
<FromGitter> <moe:busyloop.net> if you really want to go deep i suppose you could replace your `git` with a wrapper script that injects some verbose logging parameters
<FromGitter> <Blacksmoke16> or just see if you can run the command manually w/o `--quiet` and see if it reproduceds
<FromGitter> <moe:busyloop.net> yup that too
<FromGitter> <moe:busyloop.net> it's a bit annoying that shards doesn't pass --verbose through to the git commands
<FromGitter> <Blacksmoke16> Maybe it should if you pass it to shards
<FromGitter> <moe:busyloop.net> haven't problems with it myself but i can see how this is a more cumbersome to debug than it should be :/
<FromGitter> <Blacksmoke16> Could check the issues
<FromGitter> <moe:busyloop.net> yea
<FromGitter> <moe:busyloop.net> yea nah i don't fix it anyway. i'm generally trying to postpone all issues until chatgpt supports "fix issue #124"
<FromGitter> <moe:busyloop.net> in fact, wouldn't even be surprised if it could add that if you paste it the code, but too lazy to try
ur5us has quit [Ping timeout: 246 seconds]
yxhuvud has quit [Ping timeout: 252 seconds]
yxhuvud has joined #crystal-lang
<FromGitter> <skinnyjames> Ah, when running it manually it works the first time and then fails due to the file / directory already existing.
<FromGitter> <skinnyjames> Oh making a git wrapper is probably a good idea. I think it'd also be cool to log the full error (https://github.com/skinnyjames-forks/shards/blob/master/src/resolvers/git.cr#L437) as a side effect instead of only swallowing it in the retry. (Happy to open a PR)
_ht has joined #crystal-lang
<FromGitter> <skinnyjames> also: ⏎ ⏎ > Ah, when running it manually it works the first time and then fails due to the file / directory already existing.
<FromGitter> <skinnyjames> based on the output it does seem to be running `git clone` for different shard dependencies concurrently, and i notice that both of the deps for `crest` live in `github.com/mamantoha` so i do wonder if there is some sort of race condition at play? Thanks all, I'm going to keep digging into this angle.
<FromGitter> <moe:busyloop.net> @skinnyjames: mind sharing the `dependencies` part of your `shard.yml`? i couldn't reproduce it here
<FromGitter> <skinnyjames> absolutely! ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=63a434b5378d512c1827c418]
<FromGitter> <skinnyjames> Hm.. I just got a (perhaps related) error when doing a docker build and installing apt packages: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=63a4368f8f8df4262ab95bd9]
<FromGitter> <skinnyjames> I wonder if something is up with my..uh..ISP
<FromGitter> <skinnyjames> Or my docker configuration? I'm not sure this is an issue with shards. Big apologies for the misdirection - I was confused because it always failed on the same dependency
jmdaemon has quit [Quit: ZNC 1.8.2 - https://znc.in]
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp has joined #crystal-lang
<FromGitter> <moe:busyloop.net> np at all. DNS errors are iffy. ⏎ ⏎ fwiw, can confirm that i don't see any duplicate cloning when running `rm -rf ~/.cache/shards lib shard.lock ; shards install --verbose` with your `shard.yml`. so i think blacksmoke is right, the duplicates you've seen are most likely retries - due to the dns lookup errors.
<FromGitter> <moe:busyloop.net> if you have access to the resolver config on that machine then i'd try switching to the cloudflare or google resolvers: ⏎ ⏎ ```1.1.1.1 ⏎ 1.0.0.1 ⏎ 8.8.8.8 ⏎ 8.8.4.4``` ⏎ ⏎ those are usually more reliable than what ISPs and hosters provide by default. [https://gitter.im/crystal-lang/crystal?at=63a4570c378d512c18280952]
pusewicz has joined #crystal-lang
<FromGitter> <skinnyjames> Ah nice! thanks!
Stephie- has quit [Quit: Fuck this shit, I'm out!]
Vexatos has quit [Read error: Connection reset by peer]
Stephie has joined #crystal-lang
Vexatos has joined #crystal-lang
sagax has quit [Remote host closed the connection]
pusewicz is now known as pusewicz|away
pusewicz|away has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jmdaemon has joined #crystal-lang
ur5us has joined #crystal-lang
_ht has quit [Quit: _ht]
pusewicz has joined #crystal-lang
pusewicz is now known as pusewicz|away
FromGitter has quit [Ping timeout: 252 seconds]
oprypin has quit [Ping timeout: 272 seconds]
pusewicz|away has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SamantazFox has quit [Quit: Bye]
Daniel1970 has joined #crystal-lang
Daniel1970 has quit [Client Quit]
Daniel1970 has joined #crystal-lang