savi-lang / savi

A fast language for programmers who are passionate about their craft.
BSD 3-Clause "New" or "Revised" License
153 stars 12 forks source link

`savi deps update` fails when run for the first time - succeeds the second time #447

Open mneumann opened 1 year ago

mneumann commented 1 year ago

Also see: https://github.com/mneumann-savi/MQTT/actions/runs/4187381765/jobs/7257136099

> savi deps update
Downloading new library versions from GitHub...
Downloaded ByteStream v0.20230131.0
Downloaded TCP v0.20230215.0
Downloaded IO v0.20221003.0
Downloaded OSError v0.20220325.0
Downloaded IPAddress v0.20230131.0
Downloaded Logger v0.20230131.0
Downloaded Time v0.20230131.0
Downloaded Timer v0.20220321.0
Downloaded Spec v0.20220928.0
Downloaded Map v0.20220304.0

Compilation Errors:

---

Failed to clone version v0.20230131.0 of this dependency:
from ./manifest.savi:40:
  :dependency Time v0
              ^~~~

- please ensure this location is correct, or try again later:
  from ./manifest.savi:41:
    :from "github:savi-lang/Time"
          ^~~~~~~~~~~~~~~~~~~~~~~

---

Failed to clone version v0.20230131.0 of this dependency:
from ./manifest.savi:56:
  :transitive dependency Time v0
                         ^~~~

- please ensure this location is correct, or try again later:
  from ./manifest.savi:57:
    :from "github:savi-lang/Time"
          ^~~~~~~~~~~~~~~~~~~~~~~
---

Failed to clone version v0.20220321.0 of this dependency:
from ./manifest.savi:59:
  :transitive dependency Timer v0
                         ^~~~~

- please ensure this location is correct, or try again later:
  from ./manifest.savi:60:
    :from "github:savi-lang/Timer"
          ^~~~~~~~~~~~~~~~~~~~~~~~

When savi deps update is run, the first time it fails. The second time, it succeeds downloading the remaining repos.

jemc commented 1 year ago

Looks like either a temporary network issue or GitHub rate limiting?

jemc commented 1 year ago

Savi is just running git clone --quiet --depth 1 --branch $version $url $dir, and this is the message you see when it fails.

Perhaps we need to add some retry logic to have it try a few more times before declaring failure?

mneumann commented 1 year ago

@jemc it fails locally too, not just in github actions. IIRC, I was once changing related code to limit git clones to run max 2 in parallel. I guess that's even too much. Maybe just clone them in sequence and retry if it fails...

mneumann commented 1 year ago

Trying with

> savi --version
savi version: v0.20230324.0
llvm version: 15.0.6

and getting the same problem:

> savi deps update
Downloading new library versions from GitHub...
Downloaded ByteStream v0.20230223.0
Downloaded TCP v0.20230215.2
Downloaded IO v0.20230215.1
Downloaded OSError v0.20220325.0
Downloaded IPAddress v0.20230131.0
Downloaded Logger v0.20230131.0
Downloaded Time v0.20230131.0
Downloaded Timer v0.20220321.0
Downloaded Spec v0.20220928.0
Downloaded Map v0.20220304.0

Compilation Errors:

---

Failed to clone version v0.20230131.0 of this dependency:
from ./manifest.savi:40:
  :dependency Time v0
              ^~~~

- please ensure this location is correct, or try again later:
  from ./manifest.savi:41:
    :from "github:savi-lang/Time"
          ^~~~~~~~~~~~~~~~~~~~~~~

A second run of savi deps update works.