WillAyd commented on issue #45286:
URL: https://github.com/apache/arrow/issues/45286#issuecomment-2598607876

   OK so starting with a fresh repo I did notice some interesting things:
   
   ```bash
   $ cd cpp
   $ cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON 
-DARROW_BUILD_TESTS=ON -DARROW_COMPUTE=ON -G Ninja -DCMAKE_BUILD_TYPE=Debug
   $ cmake --build build
   ```
   
   My emacs configuration contains this with respect to eglot:
   
   ```lisp
   (use-package eglot
     :hook (prog-mode . eglot-ensure)
     :config
     (add-to-list 'eglot-server-programs '((c++-mode c-mode) . ("clangd" 
"--header-insertion=never"))))
   ```
   When I open the Arrow project in emacs, I see that my events buffer shows a 
lot of messages:
   
   ```
   [stderr]  I[10:17:13.612] Loaded compilation database from 
/home/willayd/clones/arrow2/cpp/build/compile_commands.json
   [stderr]  I[10:17:13.613] ASTWorker building file 
/home/willayd/clones/arrow2/cpp/src/arrow/compute/kernels/scalar_compare_test.cc
 version 0 with command 
   [stderr]  [/home/willayd/clones/arrow2/cpp/build]
   [stderr]  /usr/bin/c++ --driver-mode=g++ -DARROW_HAVE_RUNTIME_AVX2 
-DARROW_HAVE_RUNTIME_AVX512 -DARROW_HAVE_RUNTIME_BMI2 
-DARROW_HAVE_RUNTIME_SSE4_2 -DARROW_HAVE_SSE4_2 -DARROW_WITH_TIMING_TESTS 
-I/home/willayd/clones/arrow2/cpp/build/src 
-I/home/willayd/clones/arrow2/cpp/src 
-I/home/willayd/clones/arrow2/cpp/src/generated -isystem 
/home/willayd/clones/arrow2/cpp/build/_deps/googletest-src/googlemock/include 
-isystem 
/home/willayd/clones/arrow2/cpp/build/_deps/googletest-src/googletest/include 
-isystem /home/willayd/clones/arrow2/cpp/thirdparty/flatbuffers/include 
-isystem /home/willayd/clones/arrow2/cpp/build/_deps/googletest-src/googletest 
-isystem /home/willayd/clones/arrow2/cpp/build/_deps/googletest-src/googlemock 
-Wredundant-move -Wno-noexcept-type -Wno-self-move -fdiagnostics-color=always 
-Wall -Wno-conversion -Wno-sign-conversion -Wdate-time -Wimplicit-fallthrough 
-Wunused-result -fno-semantic-interposition -msse4.2 -g -Werror -O0 -ggdb 
-std=c++17 -fPIE -o src/arrow/comput
 
e/kernels/CMakeFiles/arrow-compute-scalar-math-test.dir/scalar_compare_test.cc.o
 -c -resource-dir=/usr/lib/llvm-18/lib/clang/18 -- 
/home/willayd/clones/arrow2/cpp/src/arrow/compute/kernels/scalar_compare_test.cc
   [stderr]  I[10:17:13.617] Loaded compilation database from 
/home/willayd/clones/arrow2/cpp/build/compile_commands.json
   [stderr]  I[10:17:13.617] --> window/workDoneProgress/create(0)
   [stderr]  I[10:17:13.617] Enqueueing 384 commands for indexing
   [stderr]  I[10:17:13.682] Indexed 
/home/willayd/clones/arrow2/cpp/src/arrow/util/bit_run_reader.cc (823 symbols, 
2085 refs, 37 files)
   [stderr]  I[10:17:13.682] Failed to compile 
/home/willayd/clones/arrow2/cpp/src/arrow/util/bit_run_reader.cc, index may be 
incomplete
   [stderr]  I[10:17:13.798] <-- textDocument/inlayHint(2)
   [stderr]  I[10:17:13.806] Indexed 
/home/willayd/clones/arrow2/cpp/src/arrow/array/array_binary.cc (2441 symbols, 
6568 refs, 51 files)
   [stderr]  I[10:17:13.806] Failed to compile 
/home/willayd/clones/arrow2/cpp/src/arrow/array/array_binary.cc, index may be 
incomplete
   [stderr]  I[10:17:13.817] <-- reply(0)
   [stderr]  I[10:17:13.817] --> $/progress
   [stderr]  I[10:17:13.817] --> $/progress
   [jsonrpc] e[10:17:13.846] <-- $/progress 
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}
   [jsonrpc] e[10:17:13.846] <-- $/progress 
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"2/385","percentage":0}}}
   [jsonrpc] e[10:17:13.847] <-- $/progress 
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"3/385","percentage":0}}}
   [jsonrpc] e[10:17:13.847] <-- $/progress 
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"3/385","percentage":0}}}
   [stderr]  I[10:17:13.830] Indexed 
/home/willayd/clones/arrow2/cpp/src/arrow/util/future.cc (2712 symbols, 7057 
refs, 54 files)
   [stderr]  I[10:17:13.830] Failed to compile 
/home/willayd/clones/arrow2/cpp/src/arrow/util/future.cc, index may be 
incomplete
   [stderr]  I[10:17:13.839] --> $/progress
   [stderr]  I[10:17:13.839] --> $/progress
   [jsonrpc] e[10:17:13.880] <-- $/progress 
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"4/385","percentage":1}}}
   [jsonrpc] e[10:17:13.880] <-- $/progress 
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"4/385","percentage":1}}}
   [stderr]  I[10:17:13.859] --> $/progress
   [stderr]  I[10:17:13.859] --> $/progress
   [stderr]  I[10:17:13.958] Indexed 
/home/willayd/clones/arrow2/cpp/src/arrow/util/task_group_test.cc (5270 
symbols, 16694 refs, 185 files)
   [stderr]  I[10:17:13.960] Failed to compile 
/home/willayd/clones/arrow2/cpp/src/arrow/util/task_group_test.cc, index may be 
incomplete
   [jsonrpc] e[10:17:14.042] <-- $/progress 
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"5/385","percentage":1}}}
   [stderr]  I[10:17:14.028] Indexed 
/home/willayd/clones/arrow2/cpp/src/arrow/util/int_util.cc (3046 symbols, 9374 
refs, 57 files)
   [stderr]  I[10:17:14.028] Failed to compile 
/home/willayd/clones/arrow2/cpp/src/arrow/util/int_util.cc, index may be 
incomplete
   [stderr]  I[10:17:14.033] Indexed 
/home/willayd/clones/arrow2/cpp/src/arrow/compute/kernels/vector_selection_internal.cc
 (4881 symbols, 15574 refs, 93 files)
   [stderr]  I[10:17:14.033] Failed to compile 
/home/willayd/clones/arrow2/cpp/src/arrow/compute/kernels/vector_selection_internal.cc,
 index may be incomplete
   [stderr]  I[10:17:14.036] --> $/progress
   [stderr]  I[10:17:14.036] --> $/progress
   [jsonrpc] e[10:17:14.064] <-- $/progress 
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"5/385","percentage":1}}}
   [stderr]  I[10:17:14.061] --> $/progress
   [stderr]  I[10:17:14.061] --> $/progress
   [jsonrpc] e[10:17:14.096] <-- $/progress 
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"6/385","percentage":1}}}
   [jsonrpc] e[10:17:14.096] <-- $/progress 
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"6/385","percentage":1}}}
   [stderr]  I[10:17:14.074] Built preamble of size 3166416 for file 
/home/willayd/clones/arrow2/cpp/src/arrow/compute/kernels/scalar_compare_test.cc
 version 0 in 0.46 seconds
   [stderr]  E[10:17:14.081] tidy-config error at 
/home/willayd/clones/arrow2/.clang-tidy:30:0: unknown key 
'AnalyzeTemporaryDtors'
   [stderr]  E[10:17:14.081] Error parsing clang-tidy configuration in 
/home/willayd/clones/arrow2/.clang-tidy: Invalid argument
   [stderr]  I[10:17:14.085] Indexed 
/home/willayd/clones/arrow2/cpp/src/arrow/compute/kernels/scalar_cast_dictionary.cc
 (4682 symbols, 14396 refs, 96 files)
   [stderr]  I[10:17:14.085] Failed to compile 
/home/willayd/clones/arrow2/cpp/src/arrow/compute/kernels/scalar_cast_dictionary.cc,
 index may be incomplete
   [stderr]  I[10:17:14.087] Indexed 
/home/willayd/clones/arrow2/cpp/src/arrow/vendored/uriparser/UriShorten.c (689 
symbols, 4029 refs, 75 files)
   [jsonrpc] e[10:17:14.127] <-- $/progress 
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"7/385","percentage":1}}}
   [jsonrpc] e[10:17:14.128] <-- $/progress 
{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"7/385","percentage":1}}}
   ```
   
   So my guess is maybe the LSP needs time to properly index the compilation 
database before the lsp starts using it, and it may just be a sequencing issue
   
   There's also an error in there about invalid .clang-tidy arguments, although 
I'm not sure that's related. This is running on stock ubuntu 24.04
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to