www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - GitHub dlang-community/setup-dlang v1 workflow woes

reply Anonymouse <zorael gmail.com> writes:
So for a good while now the D GitHub workflow hasn't worked for 
me. It invariably ends up like this, with one job failing to 
fetch dependencies and bringing the rest to a halt.

 \> Run dub test
 Package lu not found in registry at https://code.dlang.org/ 
 (fallbacks registry at > https://code-mirror.dlang.io/, 
 registry at https://dub-registry.herokuapp.com/): HTTP request 
 returned status code 0 ()
 Failed to find any versions for package lu, referenced by 
 dgithubtest ~master
 Error: Process completed with exit code 2.
I made a reduced repo showcasing it; https://github.com/zorael/dgithubtest. The example above is taken from https://github.com/zorael/dgithubtest/actions/runs/952832093, but I'm not sure if you can see the logs. Fork the repo if you want to try it yourself. It's always that dependency. I guess I could hack around it and `while true; dub fetch` until it succeeds. Is that the only play? Not sure if this is more a learn or general topic, apologies.
Jun 19
parent reply Petar Kirov [ZombineDev] <petar.p.kirov gmail.com> writes:
On Saturday, 19 June 2021 at 17:31:48 UTC, Anonymouse wrote:
 So for a good while now the D GitHub workflow hasn't worked for 
 me. It invariably ends up like this, with one job failing to 
 fetch dependencies and bringing the rest to a halt.

 \> Run dub test
 Package lu not found in registry at https://code.dlang.org/ 
 (fallbacks registry at > https://code-mirror.dlang.io/, 
 registry at https://dub-registry.herokuapp.com/): HTTP request 
 returned status code 0 ()
 Failed to find any versions for package lu, referenced by 
 dgithubtest ~master
 Error: Process completed with exit code 2.
I made a reduced repo showcasing it; https://github.com/zorael/dgithubtest. The example above is taken from https://github.com/zorael/dgithubtest/actions/runs/952832093, but I'm not sure if you can see the logs. Fork the repo if you want to try it yourself. It's always that dependency. I guess I could hack around it and `while true; dub fetch` until it succeeds. Is that the only play?
As far as I can see, 9/10 jobs succeed without a problem and the the one that fails is the dmd-2.084.0 one. I'm pretty sure that this has little to do with GH Actions CI service or the setup-dlang action, but actually with the version of Dub bundled with this old version of dmd. You can verify this by running `dub -v` before `dub test`. Most likely there was an old Dub issue related to how it handled downloads from registries that has been fixed since. Unfortunately, setup-dlang [doesn't yet][1] support installing the latest version of Dub separately from the compiler, so if you need to test your project with an old version of dmd, you may need to install Dub manually. [1]: https://github.com/dlang-community/setup-dlang/issues/30
 Not sure if this is more a learn or general topic, apologies.
In general, https://github.com/dlang/dub/issues or https://github.com/dlang-community/setup-dlang/issues would be more appropriate, but its not a problem to discuss things here as well.
Jun 19
parent Anonymouse <zorael gmail.com> writes:
On Saturday, 19 June 2021 at 23:15:48 UTC, Petar Kirov 
[ZombineDev] wrote:
 As far as I can see, 9/10 jobs succeed without a problem and 
 the the one that fails is the dmd-2.084.0 one. I'm pretty sure 
 that this has  little to do with GH Actions CI service or the 
 setup-dlang action, but actually with the version of Dub 
 bundled with this old version of dmd. You can verify this by 
 running `dub -v` before `dub test`. Most likely there was an 
 old Dub issue related to how it handled downloads from 
 registries that has been fixed since.
I bumped the version of the older compiler to 2.085 and now it does indeed work. Thanks.
Jun 20