Open dukc opened 6 months ago
So this lazy initialization is done by Phobos. If it can't find Curl, it throws an Exception.
Which we end up catching: https://github.com/dlang/dub/blob/a91307124eaa87d0fbdf47a5766c21ad00dfc4f3/source/dub/dub.d#L1804-L1807
I assume dub --verbose
would help here, but we should probably handle this better.
System information
Bug Description
An error message like this leads me to think I would have connection problems, code.dlang.org would be down, or the package would be missing. None of those was the case. Instead, Strace revealed the problem:
The real problem here is with the library search paths, as they obviously aren't patched to include curl, meaning something with the Nix derivation used to install it is wrong.
Dub didn't help diagnosing the problem, though. If it can't find curl, I'd expect it to report that in the error message instead of "download failed", or even worse "package not found in registry".
How to reproduce?
Hide the Curl library from DUB and try to build something that local caches aren't enough for.