Home » Developing U++ » U++ Developers corner » theide with libclang
theide with libclang [message #58579] |
Sun, 26 June 2022 09:32  |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
In https://github.com/ultimatepp/ultimatepp/tree/llbm_ide branch there lives my recent development effort of integrating theide with libclang.
Now I can proudly announce that I have reached the first milestone: libclang autocomplete is now integrated well enough for me to actually start using this version of theide. Did not tested/fixed outside of windows yet though... (that said, windows seems the most complicated as we have to provide libclang.dll to the release).
Anyway, I would appreciate some more testers for this. In order to compile/use this version in windows, you need libclang.dll from official llvm release and you will also need to add include/lib paths to build method (in future, this will be coming with theide).
Mirek
[Updated on: Thu, 07 July 2022 15:29] Report message to a moderator
|
|
|
Re: theide with libclang, first milestone finished [message #58580 is a reply to message #58579] |
Sun, 26 June 2022 12:53   |
Oblivion
Messages: 1202 Registered: August 2007
|
Senior Contributor |
|
|
Hello Mirek,
I've succesfully compiled the branch on Linux, however, it doesn't seem to work at all. (No assist/code completion, etc...)
(Linux 5.18, GNOME 42.1 (Wayland), LLVM/CLANG 13.0.1 (x64))
Keep in mind that this was just a quick test, Later I'll do some more...
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
|
|
|
Re: theide with libclang, first milestone finished [message #58581 is a reply to message #58580] |
Sun, 26 June 2022 14:18   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
Oblivion wrote on Sun, 26 June 2022 12:53Hello Mirek,
I've succesfully compiled the branch on Linux, however, it doesn't seem to work at all. (No assist/code completion, etc...)
(Linux 5.18, GNOME 42.1 (Wayland), LLVM/CLANG 13.0.1 (x64))
Keep in mind that this was just a quick test, Later I'll do some more...
Best regards,
Oblivion
Probably RedefineMacros() function problems - in linux, I believe it should not be there at all.
|
|
|
|
Re: theide with libclang, first milestone finished [message #58583 is a reply to message #58582] |
Sun, 26 June 2022 18:07   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
OK, good news and bad news (for now):
The problem is caused by CXTranslationUnit_PrecompiledPreamble flag for clang parser. For some reason, when I specify this in Linux, libclang ignores #includes.
Without this flag, it now works. Downside is that it is much slower than in Win32 where CXTranslationUnit_PrecompiledPreamble works...
Now I am pretty sure this must be some problem of my code, as you are actually supposed to use this and I bet other ides are using this flag. But so far I was not able to crack it...
Anyway, you should now be able to test it, hopefully, for initial impressions.
[Updated on: Sun, 26 June 2022 18:08] Report message to a moderator
|
|
|
|
|
|
|
|
Re: theide with libclang, first milestone finished [message #58612 is a reply to message #58579] |
Sun, 03 July 2022 16:19   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
I checked a clang-enabled version of TheIDE in Linux (debug version).
It is using 100% of CPU all the time. Initially, I thought that this is Clang indexing UPP files, but after waiting for 50 minutes I figured out that this must be a bug with TheIDE.
Regards,
Novo
|
|
|
|
|
|
Re: theide with libclang, first milestone finished [message #58628 is a reply to message #58626] |
Thu, 07 July 2022 16:33   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
mirek wrote on Thu, 07 July 2022 07:23Can please somebody retest in Linux? I believe autocomplete works now great (I mean, fast enough).
"make -f umkMakefile" - works.
Regular "make" (build TheIDE) didn't work (problem with linking).
Problem with CPU is fixed.
Autocomplete doesn't work for me. For example:
Dot won't be autocompled. Ctrl+Space doesn't help either. I also tried autocomplete with TAB.
To be fair, I never used autocomplete with TheIDE before, but I use it with VIM all the time.
Regards,
Novo
|
|
|
|
|
Re: theide with libclang, first milestone finished [message #58631 is a reply to message #58629] |
Thu, 07 July 2022 18:00   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
mirek wrote on Thu, 07 July 2022 11:01
Are you testing latest llbm_ide branch, right? (make reference is confusing me a bit)
Yes, I'm using the llbm_ide branch. Last time I tested against rev. 14dad3e.
The only possible problem I can imagine is that I copied .config (all of it) from the previous version of TheIDE.
Regards,
Novo
|
|
|
Re: theide with libclang, first milestone finished [message #58632 is a reply to message #58630] |
Thu, 07 July 2022 18:41   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
mirek wrote on Thu, 07 July 2022 11:02Can you test removing "CXTranslationUnit_PrecompiledPreamble" from sources (you will easily find where)?
I checked that. Removing "CXTranslationUnit_PrecompiledPreamble" doesn't make any difference.
Ctrl+Space uses string on the left as a prefix for search.
Dot doesn't trigger method autocomplition.
Interestingly, umk doesn't check dependencies anymore. I need to "rebuild all" each time.
Regards,
Novo
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 01:22:11 CEST 2025
Total time taken to generate the page: 0.01881 seconds
|