-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ale does not use compile_commands.json file in C++ #3307
Comments
You may need to use Where does the |
Dear w0rp, |
setting |
ok but without these settings previous versions of ALE worked with my C++ projects and with my C projects it still works... |
I don't know the root cause but in your case setting |
adding '.' to g:ale_c_build_dir_names does not solve my issue... |
If I may butt in here, I had the same issue. In my case it was because the
I 'fixed' it by changing line 351 in
to
where
I don't know if this is a botch or what, but it's worked in my projects. |
@Kimplul Could you report that as an issue? If issues aren't reported, they won't be fixed. I think that issue can be fixed by resolving the path from compile commands relative to the |
@cridemichel Can you produce a minimal C++ project that repeats the bug? If you can create a GitHub repository that contains a |
Dear w0rp, best C. |
@cridemichel There's no |
yes sorry I generated it ...I have just committed it to the repository
|
Dear w0rp, |
I have fixed your issue now, similar to how @Kimplul mentioned. ALE now resolves |
it works! thank you very much!! best C. |
* master: (195 commits) Close dense-analysis#3285 - lint_file is now dynamic Close dense-analysis#3309 - Add b:ale_lint_delay Fix dense-analysis#3323 - Set default for g:ale_filename_mappings Add sql-lint to supported tools dense-analysis#3324 - Enable rls by default Set prettier working directory to where .prettierignore is (dense-analysis#3101) Fix dense-analysis#3319 - Force modifications to buffers Fix dense-analysis#3318 - Escape macros when parsing C flags Fix C flag parsing and tests on Windows Mention --fast, and document running Windows tests locally dense-analysis#3318 Refactor C flag parsing to set up for quoting arguments dense-analysis#3266 - Catch echo visual selection errors Label the test cases more clearly Fix dense-analysis#3317 - Parse -include from C flags Fix dense-analysis#3316 - Repeat -relative for ALERepeatSelection Fix dense-analysis#3307 - Handle compile_commands paths better Fix a typo dense-analysis#3314 - Tell people how to make new plug mappings dense-analysis#3312 - Just check if additionalTextEdits is non-empty Fix dense-analysis#3312 - Fix a false positive for auto imports ...
this issue seems to be back again with latest ALE. In my project I have the following compile_commands.json file: [
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -c -Wall -std=c++17 -O3 -I /usr/local/include/ -o expand expand.cpp",
"file": "expand.cpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -c -Wall -std=c++17 -O3 -I /usr/local/include/ -o mcsim_psd mcsim_psd.cpp",
"file": "mcsim_psd.cpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c mcsim_psd.hpp",
"file": "mcsim_psd.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/mc.hpp",
"file": "../mdlib/mc.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/pvector.hpp",
"file": "../mdlib/pvector.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/randnumgen.hpp",
"file": "../mdlib/randnumgen.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/random_extra.hpp",
"file": "../mdlib/random_extra.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/pcg_random.hpp",
"file": "../mdlib/pcg_random.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/pcg_extras.hpp",
"file": "../mdlib/pcg_extras.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/pcg_uint128.hpp",
"file": "../mdlib/pcg_uint128.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/pmatrix.hpp",
"file": "../mdlib/pmatrix.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/linked_cell_lists_3d.hpp",
"file": "../mdlib/linked_cell_lists_3d.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/particle.hpp",
"file": "../mdlib/particle.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/params.hpp",
"file": "../mdlib/params.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/parser.hpp",
"file": "../mdlib/parser.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/mcsim.hpp",
"file": "../mdlib/mcsim.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/nnl_3d.hpp",
"file": "../mdlib/nnl_3d.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/patchy.hpp",
"file": "../mdlib/patchy.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/particleset.hpp",
"file": "../mdlib/particleset.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/mcsim_mol.hpp",
"file": "../mdlib/mcsim_mol.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/mcsim_molp_ps.hpp",
"file": "../mdlib/mcsim_molp_ps.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c particle_psd.hpp",
"file": "particle_psd.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../semidisks/particle_sd.hpp",
"file": "../semidisks/particle_sd.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../hard_boxes/particle_boxes.hpp",
"file": "../hard_boxes/particle_boxes.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../hard_boxes/params_boxes.hpp",
"file": "../hard_boxes/params_boxes.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../mdlib/polyhedron.hpp",
"file": "../mdlib/polyhedron.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c ../semidisks/params_sd.hpp",
"file": "../semidisks/params_sd.hpp"
},
{
"directory": "/Users/demichel/MDsimul++/patchy_semidisks",
"command": "c++ -Wall -std=c++17 -O3 -I /usr/local/include/ -c params_psd.hpp",
"file": "params_psd.hpp"
}
] and all entries with a relative path to current dir (/Users/demichel/MDsimul++/patchy_semidisks) are ignored by ALE. best Cristiano |
same here, ALE just uses my .vimrc settings and totally ignores compile_commands.json in the same directory(top of the project) |
Still an issue with current version It seems. How can we help debug? |
My compile_commands.json has only absolute paths, so those cannot be at fault. |
Information
VIM version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 15 2020 20:27:49)
macOS version
Included patches: 1-1456
Operating System:
mac osx Catilina 10.15.6
What went wrong
In my c++ projects ALE used compile_commands.json file but after some recent update it is not using it anymore.
In my c projects compile_commands.json file is still used as expected.
:ALEInfo
The text was updated successfully, but these errors were encountered: