[all-commits] [llvm/llvm-project] 66d599: [clangd] Explicitly avoid background-indexing the ...

Sam McCall via All-commits all-commits at lists.llvm.org
Wed Jan 13 08:29:54 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 66d5994bd38a9be4a0c05de2b69f88b64e6845ce
      https://github.com/llvm/llvm-project/commit/66d5994bd38a9be4a0c05de2b69f88b64e6845ce
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2021-01-13 (Wed, 13 Jan 2021)

  Changed paths:
    M clang-tools-extra/clangd/index/Background.cpp
    M clang-tools-extra/clangd/index/Background.h
    M clang-tools-extra/clangd/index/BackgroundQueue.cpp
    M clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp

  Log Message:
  -----------
  [clangd] Explicitly avoid background-indexing the same file twice.

This used to implicitly never happen due to only discovering each CDB
once.

We may want to carefully support reindexing one day, but we need to do
it carefully (tricky tradeoffs) and it would need further support in
background indexer.

Making this explicit here rather than just turning off rebroadcast in
background index for a few reasons:
- allows *new* files in the same CDB to be indexed
- relying on bugs-at-a-distance cancelling each other out is bound to bite us
- gets us closer to actually supporting reindexing, which requires similar tracking

Differential Revision: https://reviews.llvm.org/D94503




More information about the All-commits mailing list