dlang / dub

Package and build management system for D
MIT License
677 stars 227 forks source link

Unacceptable follow-up behavior after failures wrt. package fetching/extracting #2624

Open kinke opened 1 year ago

kinke commented 1 year ago

It looks as if dub doesn't try to re-fetch/extract a package the next time after a previous run failed to fetch/extract that package. We've seen this behavior in at least 2 cases at work:

  1. A package couldn't be fetched because a private dub registry wasn't set up yet. dub still created the target dir in ~/dub/packages/… incl. lockfile as part of the failed run. So the next time, it assumed the package was available locally and didn't try to actually fetch it.
  2. An annoying Antivirus led to sporadic package zip extraction failures ('File locked by another process'). dub extracts into the final directory, so next time, dub used that half-extracted directory with missing files, leading to debugging headache.