[PATCH] D78959: [WIP][FileCollector] move Root creation

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 09:39:02 PDT 2020


JDevlieghere added a comment.

In D78959#2006318 <https://reviews.llvm.org/D78959#2006318>, @jkorous wrote:

> In D78959#2006231 <https://reviews.llvm.org/D78959#2006231>, @JDevlieghere wrote:
>
> > For lldb for example it would be disappointing to reproduce a bug with reproducer capture enabled, only to find out at the last minute that we couldn't capture the files because we couldn't create the root.
>
>
> Yes, this was the only reason I thought we might want to create it eagerly. Maybe we should then make existence of the dir (and maybe write access) an explicit requirement in doc comment and push this responsibility to client code? WDYT?


I would keep the approach in the patch. If the directory already exists then `create_directories` is a no-op, so if the client wants to deal with the error eagerly they can, otherwise they can rely on `copyFiles` doing the right thing. It would be good to include that in the docs.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78959/new/

https://reviews.llvm.org/D78959





More information about the llvm-commits mailing list