Open zeptonaut opened 9 years ago
/poke
Hi sorry for the delay, life is a little busy right now.
I think you entered the wrong directory here:
M-x irony-cdb-json-add-compile-commands-path RET /usr/local/google/home/charliea/chrome/src/out/Debug RET /usr/local/google/home/charliea/chrome/src/out/Debug/compile_commands.json RET
The first directory should be the project root, files under this directory will be looked for in the corresponding compilation database, file outside this directory aren't, so if you enter an out-of-source build directory as project root, it won't work. Try something like /usr/local/google/home/charliea/chrome/src/
instead.
Awesome - thank you so much! I really appreciate you taking the time out of your busy life to help!
It looks like M-: (irony-cdb-json--locate-db) RET
is now returning the sensible response (/usr/local/google/home/charliea/chrome/src/out/Debug/compile_commands.json
). However, M-x irony-cdb-menu
still says "No compilation database in use."
Any ideas?
Can you print the debug info as explained here:https://github.com/Sarcasm/irony-mode/issues/190#issuecomment-93062550
It returns:
I: found compilation database: /usr/local/google/home/charliea/chrome/src/out/Debug/compile_commands.json
Another message should follow this one, do you have one? If not maybe you can toggle M-x toggle-debug-on-error RET
and see if you have an error.
Ah - it looks like part of the command was just taking a really, really long time. Here's what the full result was:
"I: found by guessing: (((-MMD -MF obj/third_party/libvpx/source/libvpx/vp8/common/x86/libvpx_intrinsics_ssse3.variance_ssse3.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=233105-2 -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DUSE_UDEV -DDONT_EMBED_BUILD_METADATA -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DUSE_LIBPCI=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GLIBCXX_DEBUG=1 -Igen -I../../third_party/libvpx/source/config/linux/x64 -I../../third_party/libvpx/source/libvpx -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-reserved-user-defined-literal -Xclang -load -Xclang /usr/local/google/home/charliea/chrome/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -fcolor-diagnostics -B/usr/local/google/home/charliea/chrome/src/third_party/binutils/Linux_x64/Release/bin -Wno-conversion -Wno-parentheses-equality -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -mssse3 -Wno-format -Wno-unused-result -m64 -march=x86-64 -O0 -g -gdwarf-4 -funwind-tables -gsplit-dwarf -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare) . /usr/local/google/home/charliea/chrome/src/out/Debug))"
I'd say the command took at least a minute to execute, though.
If I just run (irony-cdb-json--load-db (irony-cdb-json--locate-db))
, it takes about the same amount of time.
Yeah, reading the compilation database is slow, the implementation is far from optimal for big projects, see #176. This is likely to change in the future.
Is there any reason that you can see that this would prevent (irony-cdb-menu)
from saying that there was a database, though?
You mean that even after a minute the compilation database menu say that no compilation database was found?
Yep. It immediately says "no compilation database found", but even if I wait a few minutes, it continues to say the same thing.
Okay, I think I can reproduce the issue now but I haven't really changed Irony much lately so I'm wondering if it's not due to my Emacs version.
What version of Emacs are you using?
I have 24.5.1, I should try tomorrow at work to see on an older Emacs version.
Nevermind, no issue with Emacs 24.5.1, my WIP on irony at home was the culprit.
Can you show your irony-mode configuration?
First off - huge thanks for all the awesome work you've done on this project!
I'm trying to get irony-mode to provide completion for Chromium code, which is built with Ninja.
I generated the compile commands with:
This successfully generates a file at:
After this I added the compilation database to irony-mode with:
However, now when I go to a file that's covered by the generated build rules and type
M-x irony-cdb-menu
, I'm greeted with a message saying "No compilation database in use."Any ideas on how I've messed up the compilation database configuration?
Here are a few pieces of values that might be useful (based on the questions you asked in #190):
C-h v irony-cdb-json--project-alist RET
(("/usr/local/google/home/charliea/chrome/src/out/Debug/" . "/usr/local/google/home/charliea/chrome/src/out/Debug/compile_commands.json"))
M-: (irony-cdb-json--locate-db) RET
nil
M-: (irony-cdb-json--target-path) RET
"/usr/local/google/home/charliea/chrome/src/third_party/WebKit/Source/core/timing/Performance.cpp"
M-: (irony-cdb-json--find-best-prefix-path (irony-cdb-json--target-path) '("/usr/local/google/home/charliea/chrome/src/third_party/WebKit/Source/core/timing/Performance.cpp"))
"/usr/local/google/home/charliea/chrome/src/third_party/WebKit/Source/core/timing/Performance.cpp"
I suspect that I'm doing something stupid, but I'm not quite sure what it is. Any ideas on how to fix this?