Comments (20)
Hm, ok. This sounds very logical. I believe, I will have to rework the way I manage cindex. It is a pain to work with libclang python bindings :)
On ubuntu, if you install clang 3.8
you don't get libclang.so
, you get libclang-3.8.so.1
. This is one issue. I guess, I will reopen it separately.
The other one is the issue with std
namespace not being recognized. I encountered the same error on my machine yesterday, and for now I don't know what causes it. It was not there before, so I will probably try different releases to try to find where I have introduced this bug.
Sorry for the inconvenience. I will keep you posted as soon as I find out anything.
from easyclangcomplete.
Also, why do you use -std=gnu++1z
? Any particular reason for this? Why not -std=c++1z
? Can you try it?
from easyclangcomplete.
I have moved discussions about searching for a correct .so
file to another issue #22
from easyclangcomplete.
It is same with all other flags (c++11, c++14, c++1z).
I don't think that the issue is related to namespace std
. In libclang mode I have no completions at all, even for classes declared in the same file or any other namespace (e. g. boost
).
from easyclangcomplete.
Could you also provide the file you are testing it on?
from easyclangcomplete.
You can use literally any file, for example test.cpp and test_vector.cpp from tests/
from easyclangcomplete.
Unfortunately I am clueless for now. I've just learned from issue #23 that libclang 3.8 can misbehave. Could you try the plugin with another version of clang? Like 3.6? If it is a hassle for you, I will try to install clang 3.8 on my system and see what happens.
from easyclangcomplete.
Same for clang 3.7.1
from easyclangcomplete.
May I still ask you to try clang 3.6? This is the one I have tested it on. Then we can have some common ground. For now I cannot reproduce the behavior.
from easyclangcomplete.
Wow! It works on clang 3.6.2 in libclang mode (after appropriate fix in cindex36.py).
from easyclangcomplete.
Am I right that you are using some python3 port of official libclang python bindings, with different release of cindex.py for each version of clang?
Something works with clang 3.8 if I replace cindex38.py with the one from this repo https://bitbucket.org/Anteru/python3-libclang
from easyclangcomplete.
Yep, I am using a port of bindings, and they are far from guaranteed to be right. Thank you for a suggestion.
May I ask which change did you do in cindex36
?
from easyclangcomplete.
I had to change libclang.so file name to make it work on my system. This is about #22, not about this issue.
from easyclangcomplete.
Ok, I understand. then it seems that the fix would be to use libclang that you linked for clang version 3.8 (and I will adapt the official ones for 3.7). And then solving issue #22 Then this issue will be closed.
from easyclangcomplete.
Unfortunately that one doesn't work out of box. I didn't check it thoroughly, but sometimes it throws errors instead of completions.
from easyclangcomplete.
Ok, thanks for all that info. Then I will probably try to adapt the official ones to run with Python 3
from easyclangcomplete.
I had a look at the current cindex38.py
and it is exactly the same as the official one after running 2to3
on it and enforcing utf8
encoding. So I don't have any further idea what could be happening. I have installed clang 3.8 on my system and I do not get autocompletions just as in your case. In addition to that if I try it multiple times plugin_host
eventually crashes.
I have tried to annotate what is being called from cindex 3.8 with no luck. Also I tried to blatantly replace cindex3.8.py
with the contents of cindex3.6.py
and it did not change the behavior by even a slightest bit. But the plugin_host
does not crash :)
So, now I am totally clueless. I will continue searching what can cause this, maybe somebody has encountered this. For now, I suggest using clang 3.6
from easyclangcomplete.
Although, after using the cindex that you have linked: https://bitbucket.org/Anteru/python3-libclang the completions seem to work. I will keep that version for now. Will push it in the upcoming days.
from easyclangcomplete.
Also, seems like the relevant fix is inspired by http://reviews.llvm.org/D17226 as referenced here in the new cindex38.py
from easyclangcomplete.
@riazanovskiy I have replaced cindex38.py
by another version and it is working for me with clang 3.8. Can you try it out? I will close the issue for now, but feel free to reopen if something is not working.
from easyclangcomplete.
Related Issues (20)
- Designated initializers don't seem to be parsed correctly HOT 5
- Headers autocompletion suggestion HOT 3
- An erroneous warning HOT 3
- Crash on drag-selection near an error HOT 11
- Suppress message about success build HOT 6
- Headers from listed add_definitions are not getting included and pch breaks completion HOT 1
- Go to declaration of includes? HOT 1
- Not working on apple m1 arch64 HOT 6
- Could be possible to disable to show the popup immediately when clicking on a line that has an error? HOT 2
- Files with same name share error messages HOT 2
- Headers are not auto-completed in Sublime Text 4 HOT 2
- "Clean current CMake cache" doesn't works on Windows HOT 2
- Windows can't detect the include folder from the CMakeLists.txt file HOT 5
- Using defintions declared on the CMakeLists.txt from windows gives "Error: Expected expression" HOT 2
- TypeError: argument of type 'NoneType' is not iterable on macos m1 HOT 5
- Headers are normal but STL keep loading errors HOT 1
- Wont find libclang automatically on Debian Testing HOT 10
- Recursive names project fails to build dependency tree project
- Crash when entering `std::vector.re` HOT 4
- Cannot use GCC HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easyclangcomplete.