This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Rename global-symbol-builder to clangd-indexer.
ClosedPublic

Authored by ilya-biryukov on Sep 12 2018, 7:25 AM.

Details

Summary

Given that the indexer binary is put directly into ./bin directory
when built, 'clangd-' prefix seems to provide better context to the
reader than 'global-'.

The new name is also shorter and easier to type.

Diff Detail

Repository
rL LLVM

Event Timeline

ilya-biryukov created this revision.Sep 12 2018, 7:25 AM
  • Rebase, updated the added test

We've used the new name internally before and now that we're testing this, we need to be consistent.
The 'clangd-symbol-builder' looks like a better choice, so I'm pitching changing upstream first.

ioeric accepted this revision.Sep 12 2018, 7:31 AM

lgtm

+1 to clang-symbol-builder

This revision is now accepted and ready to land.Sep 12 2018, 7:31 AM

I mean clangd-symbol-builder

sammccall accepted this revision.Sep 12 2018, 7:47 AM

Much better.
I think clangd-indexer might be even better, but up to you.

clangd-indexer looks nice and short. @ioeric, WDYT?

  • Rename to clangd-indexer

clangd-indexer looks nice and short. @ioeric, WDYT?

You beat it to me, but I thought we didn't use indexer as it could be confused with the actual indexing?

You beat it to me, but I thought we didn't use indexer as it could be confused with the actual indexing?

Sorry. Not a big deal, can revert back if needed.
Mostly like indexer since it's shorter. Also not very confusing, since we call the thing it produces an "index", so calling it an "indexer" seems fine.

What's the index you're referring to? Building data structures for faster search?

My 2 cents: clangd-indexer looks great! Typing 3-token tool name is always sad for me :( It's also easier to remember/understand in the first place.

You beat it to me, but I thought we didn't use indexer as it could be confused with the actual indexing?

Sorry. Not a big deal, can revert back if needed.
Mostly like indexer since it's shorter. Also not very confusing, since we call the thing it produces an "index", so calling it an "indexer" seems fine.

What's the index you're referring to? Building data structures for faster search?

Yes. The current symbol builder produces *symbol table*, which can be easily confused with an index. We might have a different tool that builds the symbol index structure (e.g. serialized dex), which might be a better candidate for the name "indexer".

You beat it to me, but I thought we didn't use indexer as it could be confused with the actual indexing?

Sorry. Not a big deal, can revert back if needed.
Mostly like indexer since it's shorter. Also not very confusing, since we call the thing it produces an "index", so calling it an "indexer" seems fine.

What's the index you're referring to? Building data structures for faster search?

Yes. The current symbol builder produces *symbol table*, which can be easily confused with an index. We might have a different tool that builds the symbol index structure (e.g. serialized dex), which might be a better candidate for the name "indexer".

Part of the reason I like "indexer" here is I don't think it should be a separate tool - it'd be nice if this tool would spit out a RIFF file with Dex posting lists ready to be loaded.
(For huge codebases, things look different - but we've been talking about using a different entrypoint for those anyway due to bifurcation around merge-on-the-fly etc)

ioeric accepted this revision.Sep 12 2018, 8:39 AM

You beat it to me, but I thought we didn't use indexer as it could be confused with the actual indexing?

Sorry. Not a big deal, can revert back if needed.
Mostly like indexer since it's shorter. Also not very confusing, since we call the thing it produces an "index", so calling it an "indexer" seems fine.

What's the index you're referring to? Building data structures for faster search?

Yes. The current symbol builder produces *symbol table*, which can be easily confused with an index. We might have a different tool that builds the symbol index structure (e.g. serialized dex), which might be a better candidate for the name "indexer".

Part of the reason I like "indexer" here is I don't think it should be a separate tool - it'd be nice if this tool would spit out a RIFF file with Dex posting lists ready to be loaded.
(For huge codebases, things look different - but we've been talking about using a different entrypoint for those anyway due to bifurcation around merge-on-the-fly etc)

I wasn't aware that we are also expanding the scope of the symbol builder. If being short is not the only reason here, I have no problem.

Thanks for the comments everyone!
Will land this tomorrow, since I'm buildcop this week anyway.

ilya-biryukov retitled this revision from [clangd] Rename global-symbol-builder to clangd-symbol-builder. to [clangd] Rename global-symbol-builder to clangd-indexer..Sep 12 2018, 8:54 AM
ilya-biryukov edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.
clang-tools-extra/trunk/clangd/CMakeLists.txt