This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Ensure we test for compatibility of serialized index format
ClosedPublic

Authored by kadircet on Nov 12 2020, 2:08 AM.

Diff Detail

Event Timeline

kadircet created this revision.Nov 12 2020, 2:08 AM
kadircet requested review of this revision.Nov 12 2020, 2:08 AM

As a side note, I've tested with a clangd-indexer before https://github.com/llvm/llvm-project/commit/71064b02701dd65065dd412fb01afe81ff83f746 and we got the failure (malformed/truncated refs).

Very nice, thanks for doing this!

clang-tools-extra/clangd/test/index-serialization/version-is-correct.test
2

I think this test is REQUIRES: zlib
(see windows failures)

2

nit: maybe say a bit more about what the test does? And separate what the test does vs what failure means vs what action to take a little.

This test tries to parse a checked-in binary index.
If it fails, there has been...
Please bump the version number...

4

nit: regenerate sample.idx

6

this isn't easy to copy/paste because of the comment markers.
This file isn't interpreted so there's no need for them, I think...

It could also be formatted so it's easier to recognize the command (surround by blank lines, indent by a couple of spaces?)

11

dexp ... -c="find B" | grep Bar?

kadircet updated this revision to Diff 305096.Nov 13 2020, 4:13 AM
  • Update comments
  • Query for Bar
  • Only run with zlib
kadircet marked 5 inline comments as done.Nov 13 2020, 4:13 AM
sammccall added inline comments.Nov 13 2020, 4:34 AM
clang-tools-extra/clangd/test/index-serialization/version-is-correct.test
6

again, we don't need the comment markers (but do need the line-continuations) for copy-paste

16

as discussed offline, maybe || not grep -v -e RUN: -e REQUIRES: %S ?

sammccall accepted this revision.Nov 13 2020, 4:34 AM
This revision is now accepted and ready to land.Nov 13 2020, 4:34 AM
kadircet updated this revision to Diff 305100.Nov 13 2020, 4:36 AM
  • Drop comment markers
  • Make failure print the doc
kadircet updated this revision to Diff 305106.Nov 13 2020, 5:04 AM
  • Drop subshell usage
This revision was landed with ongoing or failed builds.Nov 13 2020, 8:07 AM
This revision was automatically updated to reflect the committed changes.
dmajor added a subscriber: dmajor.Nov 13 2020, 9:36 AM

This broke the bots: http://lab.llvm.org:8011/#/builders/109/builds/2682

  File "/b/1/clang-x86_64-debian-fast/llvm.obj/tools/clang/tools/extra/clangd/test/lit.site.cfg.py", line 35
    config.have_zlib =
                      ^
SyntaxError: invalid syntax

Looks like it is already green at http://lab.llvm.org:8011/#/builders/109/builds/2693

Yep, I'm seeing the same, thanks!