tmspzz/Rome

Should not print error if the file attempting to delete does not exist for `bcsymbolmap`

Open

#209 opened on Jan 13, 2020

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Haskell (771 stars) (54 forks)batch import
enhancementhelp wanted

Description

When doing the first download, it seems like the "Delete of the bcsymbolmap" causes an error to be printed.

Reproduction Steps:

  1. Create a Romefile with Alamofire
  2. Do the build, and upload the files.
  3. Do rome download

** Expected behavior** Will download the needed files and display:

Downloaded Alamofire from: swift5.1.2/Alamofire/iOS/Alamofire.framework-4.8.2.zip
Downloaded Alamofire.dSYM from: swift5.1.2/Alamofire/iOS/Alamofire.framework.dSYM-4.8.2.zip
Downloaded Alamofire.F8E21C42-AD64-3352-908B-BEE49D235DC3.bcsymbolmap from: swift5.1.2/Alamofire/iOS/F8E21C42-AD64-3352-908B-BEE49D235DC3.bcsymbolmap-4.8.2.zip
Downloaded Alamofire.3C52C344-AA08-3AEC-860A-996FC0701512.bcsymbolmap from: swift5.1.2/Alamofire/iOS/3C52C344-AA08-3AEC-860A-996FC0701512.bcsymbolmap-4.8.2.zip

Observed behavior:

Downloaded Alamofire from: swift5.1.2/Alamofire/iOS/Alamofire.framework-4.8.2.zip
Downloaded Alamofire.dSYM from: swift5.1.2/Alamofire/iOS/Alamofire.framework.dSYM-4.8.2.zip
Downloaded Alamofire.F8E21C42-AD64-3352-908B-BEE49D235DC3.bcsymbolmap from: swift5.1.2/Alamofire/iOS/F8E21C42-AD64-3352-908B-BEE49D235DC3.bcsymbolmap-4.8.2.zip
Error: no such file Carthage/Build/iOS/F8E21C42-AD64-3352-908B-BEE49D235DC3.bcsymbolmap
Downloaded Alamofire.3C52C344-AA08-3AEC-860A-996FC0701512.bcsymbolmap from: swift5.1.2/Alamofire/iOS/3C52C344-AA08-3AEC-860A-996FC0701512.bcsymbolmap-4.8.2.zip
Error: no such file Carthage/Build/iOS/3C52C344-AA08-3AEC-860A-996FC0701512.bcsymbolmap

It looks like in the line:

https://github.com/tmspzz/Rome/blob/3279870fcaac111df5f3a9fd03c10a45c063758c/src/Caches/S3/Downloading.hs#L182

It attempts to delete the file that exists. In the case that the file does not exist, it should just ignore it and not print and error.

Rome version: 0.23.1.61 OS and version: macOS Catalina

Contributor guide