[cfe-dev] RFC: A virtual file system for clang

Argyrios Kyrtzidis kyrtzidis at apple.com
Fri Feb 7 12:13:04 PST 2014


On Feb 7, 2014, at 11:09 AM, Manuel Klimek <klimek at google.com> wrote:

> On Fri, Feb 7, 2014 at 6:39 PM, Argyrios Kyrtzidis <kyrtzidis at apple.com> wrote:
> Hi Manuel,
> 
> On Feb 7, 2014, at 1:01 AM, Manuel Klimek <klimek at google.com> wrote:
> 
>> 
>> Some non-goals (at least for a first iteration):
>> 1) File system modification operations (create_directory, rename, etc.).  Clients will continue to use the real file system for these operations, and we don’t intend to detect any conflicts this might create.
>> 2) Completely virtual file buffers that do not exist on disk.
>> 
>> I'd vote for making that an explicit goal; two reasons:
>> 1. I don't think it'll make a first iteration harder to implement
>> 2. saying that we'll do things like that later will almost certainly make it super-hard to do later
>> 
> 
> 
> We don’t have the bandwidth to design / implement / test fully virtual files.
> 
> I'm curious why you think it will be a lot more effort; my gut feeling would be that this is probably going to be less effort (depending on what exactly you want to use the VFS layer for)

You can always prove me wrong, after we have the simpler case (mapping virtual paths to real paths) working ;-)

I just want to make clear that we are going to focus on what we need, which is to get modules for ObjC user frameworks working and fully supported. Virtual file buffers is not something we need at the moment (but to reiterate, we don’t want to prohibit either).


> if we don't want to break all of the Tooling layers in the process.

Not sure why they would break, if these are based on the FileManager. Also as long as the related “vfs” option is not passed to a compiler invocation to introduce a virtual layout via a configuration file, there should be no behavior change anywhere.

>  
> We also don’t have uses for them (apart from replacing the remapping of buffers in the SourceManager) so I think this should be driven by someone that actually needs this and is going to dogfood it.
> 
> Apart from that, we are definitely trying to make sure we will not do anything that will make adding virtual files prohibitively difficult, we think it can be added on top with maybe some refinements on the interface.
> While we are implementing the VFS if you think we are doing something that will make virtual file buffers “super-hard to do later” please let us know.
> 
> Will do.
> 
> Cheers,
> /Manuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140207/7f4061cc/attachment.html>


More information about the cfe-dev mailing list