This is an archive of the discontinued LLVM Phabricator instance.

YAML output for index-while-building
Needs ReviewPublic

Authored by yvvan on Jul 6 2018, 1:44 AM.

Details

Reviewers
nathawes
Summary

Should be compatible with the current index format accepted by clangd

Depends on https://reviews.llvm.org/D49009

Diff Detail

Event Timeline

yvvan created this revision.Jul 6 2018, 1:44 AM
yvvan edited the summary of this revision. (Show Details)Jul 6 2018, 1:45 AM
yvvan updated this revision to Diff 155331.Jul 13 2018, 1:31 AM

JSON is a subset of YAML, do we really need both outputs? I've noticed the schema for the output is actually different between YAML and JSON, wouldn't that be confusing?

Should be compatible with the current index format accepted by clangd

Do we really want that?
Note that we were not planning to keep the YAML index in clangd long-term, it was merely a convenient serialization routine available in LLVM land, so our implementation uses it for now. I would discourage to build tools that rely on the YAML format staying the same.

Maybe we could teach clangd to consume the index-while-build output (in binary format) when building the index instead? WDYT?

@ilya-biryukov I would name this revision "for test purpose". It works at some extent with the current clangd version and can be used by someone else. But since we had a discussion about YAML being a temporary solution I never planned to commit this revision.
So yes, I totally agree that using a binary format would be ideal for the "index while build' use case.