justincady wrote:

> If we specify path mapping but haven't copied the index, we'll index the 
> project from scratch, and the index will contain non-local paths. Reindexing 
> of the project also happens if a user made a mistake in path mappings. I'm 
> not sure how expected this behavior is or whether it can be controlled.

I attempted to make scenarios like this more visible with 
d91388319892e176740fe0dca896d90309cac780. There may be more to do here, but in 
each scenario I could imagine the user _might_ be doing it intentionally. Thus, 
I only logged a message for debugging as opposed to shutting down with an error.

> Given that we convert paths every time we load/save the index, I'm still 
> leaning more toward a solution with a separate conversion tool (if a user 
> specifies incorrect path mappings, a tool can return an error; we can keep 
> index with local path). In your NFS scenario, this may be worse in terms of 
> performance, but it seems relatively uncommon, and perhaps a remote index 
> could be used for it (but then it seems that we will need to implement 
> support for locally modified files)

Understood. I will point out that a network mount might be more common than it 
seems, especially if that enables zero-cost cloning for each developer 
workspace. And for the size of some repositories, a local clone isn't feasible. 
I acknowledge that repo size might be less common though.

Even if we decide to go with the separate tool, my goal with the latest round 
of commits was to get to a place of "this is the best way to do it _if_ we 
decide to go this route."

https://github.com/llvm/llvm-project/pull/180285
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to