Home » Developing U++ » U++ Developers corner » theide with libclang
|
|
|
Re: theide with libclang, first milestone finished [message #58788 is a reply to message #58787] |
Wed, 31 August 2022 12:33 |
Tom1
Messages: 1212 Registered: March 2007
|
Senior Contributor |
|
|
mirek wrote on Wed, 31 August 2022 12:37Tom1 wrote on Wed, 31 August 2022 10:50Hi,
Sorry. This must be caused by something strange deeper in my own code, since creating a simple test case does not seem to trigger showing it.
Anyway, I will stop wasting your time on this one for now. (I bet you have something better to do...
Thanks and best regards,
Tom
Ah, ok, by the screenshot I immediatelly see this non-clang version anyway (new theide has arrow instead of ":")
Mirek
Thanks Mirek!
For some reason my upp.src had slipped back to master branch. Anyway, I switched back to clang and now all my problems are gone. Arrows are shown instead of colon and there are no more "WARNING: EMIT" for overrides. Thanks!
Best regards,
Tom
|
|
|
Re: theide with libclang, first milestone finished [message #58824 is a reply to message #58788] |
Thu, 15 September 2022 08:31 |
Tom1
Messages: 1212 Registered: March 2007
|
Senior Contributor |
|
|
Mirek,
Would it be possible to add support for working with git branches in TheIDE menu?
Support for 'switching branch' for any git repository currently in use would be most useful, but possibly also support for creating and merging of branches.
Best regards,
Tom
|
|
|
|
Re: theide with libclang, first milestone finished [message #58828 is a reply to message #58826] |
Thu, 15 September 2022 14:10 |
Tom1
Messages: 1212 Registered: March 2007
|
Senior Contributor |
|
|
mirek wrote on Thu, 15 September 2022 10:48Tom1 wrote on Thu, 15 September 2022 08:31Mirek,
Would it be possible to add support for working with git branches in TheIDE menu?
Support for 'switching branch' for any git repository currently in use would be most useful, but possibly also support for creating and merging of branches.
Best regards,
Tom
I would like to, I just do not quite know how to do it right. So far "Terminal at file directory" was my favorite tool in this regard...
Plus it is not quite related to Assist/clang, correct?
I plan a batch of another theide improvements after libclang is merged. Which now seems will be quite soon.
Mirek
Yes, sorry. This is not the place for this discussion. Anyway, I'm looking forward to progress on this too.
Best regards,
Tom
|
|
|
|
Re: theide with libclang, first milestone finished [message #58842 is a reply to message #58836] |
Sat, 17 September 2022 05:54 |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate Contributor |
|
|
Merged version. Linux.
libclang: crash detected during reparsing
libclang: crash detected during parsing: {
'source_filename' : '(null)'
'command_line_args' : ['clang', '-I/home/ssg/dvlp/cpp/sergey/upp', '-I/home/ssg/dvlp/cpp/code/upp/git/uppsrc', '-I/home/ssg/dvlp/cpp/code/upp/git/bazaar', '-I/home/ssg/.local/tmp/dvlp/cpp/code/upp/.config/u++/ide/UppHub/SysExec', '-I/home/ssg/.local/tmp/dvlp/cpp/code/upp/.config/u++/ide/UppHub/Updater', '-I/usr/include/freetype2', '-I/usr/include/libpng16
', '-I/usr/include/freetype2', '-I/usr/include/libpng16
', '-I/usr/include/freetype2', '-I/usr/include/libpng16
', '-I/usr/include/gtk-3.0', '-I/usr/include/at-spi2-atk/2.0', '-I/usr/include/at-spi-2.0', '-I/usr/include/dbus-1.0', '-I/usr/lib64/dbus-1.0/include', '-I/usr/include/gtk-3.0', '-I/usr/include/gio-unix-2.0', '-I/usr/include/cairo', '-I/usr/include/pango-1.0', '-I/usr/include/harfbuzz', '-I/usr/include/pango-1.0', '-I/usr/include/fribidi', '-I/usr/include/harfbuzz', '-I/usr/include/atk-1.0', '-I/usr/include/cairo', '-I/usr/include/pixman-1', '-I/usr/include/freetype2', '-I/usr/include/libpng16', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/libpng16', '-I/usr/include/libmount', '-I/usr/include/blkid', '-I/usr/include/glib-2.0', '-I/usr/lib64/glib-2.0/include
', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/libpng16', '-I/usr/include/libmount', '-I/usr/include/blkid', '-I/usr/include/glib-2.0', '-I/usr/lib64/glib-2.0/include
', '-I/usr/include/libpng16
', '-I/usr/include/c++/10.2', '-I/usr/include/c++/10.2/x86_64-unknown-linux-gnu', '-I/usr/include/c++/10.2/backward', '-I/usr/local/include', '-I/usr/lib/clang/12.0.1/include', '-I/usr/include', '-I/usr/include/c++/10.2', '-I/usr/include/c++/10.2/x86_64-unknown-linux-gnu', '-I/usr/include/c++/10.2/backward', '-I/usr/local/include', '-I/usr/lib/clang/12.0.1/include', '-I/usr/include', '-DflagGUI', '-DflagPOSIX', '-DflagLINUX', '-DCLANG', '/home/ssg/dvlp/cpp/code/upp/git/uppsrc/Core/lheap.cpp', '-DflagDEBUG', '-DflagDEBUG_FULL', '-DflagMAIN', '-DflagCLANG', '-xc++', '-std=c++17', '-Dlint'],
'unsaved_files' : [],
'options' : -2147483136,
}
Regards,
Novo
|
|
|
Re: theide with libclang, first milestone finished [message #58843 is a reply to message #58842] |
Sat, 17 September 2022 06:44 |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate Contributor |
|
|
Is it possible to disable libclang support during compilation?
I'm having troubles trying to cross-compile Clang. Actually, I couldn't compile it at all.
I'm trying to cross-compile TheIDE for Windows on Linux.
Regards,
Novo
|
|
|
|
|
Re: theide with libclang, first milestone finished [message #58846 is a reply to message #58844] |
Sat, 17 September 2022 12:37 |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate Contributor |
|
|
mirek wrote on Sat, 17 September 2022 05:04
Check Setup BTW, I would start with disabling automatic indexer... BTW, I might be wrong, but I think for theide, every "indexer thread" and "autocomplete file cache" is about 200MB of memory.
Opening a project and closing it in a couple of seconds leads to "Invalid memory access" ...
EDIT: Happens after full rebuild.
Regards,
Novo
[Updated on: Sat, 17 September 2022 12:44] Report message to a moderator
|
|
|
|
Re: theide with libclang, first milestone finished [message #58848 is a reply to message #58847] |
Sat, 17 September 2022 12:57 |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate Contributor |
|
|
mirek wrote on Sat, 17 September 2022 06:48
Maybe your libclang is somehow deffective?
I'm using "Void Linux". Its default clang version is 12.0.1.
Void Linux is like a stable version of Arch.
I do not have any problems with ccls on these machines ...
Regards,
Novo
|
|
|
Re: theide with libclang, first milestone finished [message #58849 is a reply to message #58848] |
Sat, 17 September 2022 13:01 |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate Contributor |
|
|
I'm getting weird error messages in console on exit.
/usr/include/glib-2.0/glib/gtypes.h:32:10: error: 'glibconfig.h' file not found
/usr/include/glib-2.0/glib/gversionmacros.h:375:2: error: "GLIB_VERSION_MIN_REQUIRED must be >= GLIB_VERSION_2_26"
/usr/include/glib-2.0/glib/gtypes.h:548:2: error: unknown ENDIAN type
/usr/include/glib-2.0/glib/garray.h:49:3: error: unknown type name 'guint8'
/usr/include/glib-2.0/glib/garray.h:75:36: error: unknown type name 'gsize'
...
/home/ssg/dvlp/cpp/sergey/upp/amap/amap.cpp:81:2: error: cannot initialize object parameter of type 'Upp::TopWindow' with an expression of type 'amap'
/home/ssg/dvlp/cpp/sergey/upp/amap/amap.cpp:83:2: error: no matching member function for call to 'Icon'
/home/ssg/dvlp/cpp/code/upp/git/uppsrc/CtrlCore/TopWindow.h:174:13: note: candidate function not viable: no known conversion from 'amap' to 'Upp::TopWindow' for object argument
/home/ssg/dvlp/cpp/code/upp/git/uppsrc/CtrlCore/TopWindow.h:176:13: note: candidate function not viable: requires 2 arguments, but 1 was provided
...
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Regards,
Novo
|
|
|
Re: theide with libclang [message #58856 is a reply to message #58579] |
Sun, 18 September 2022 12:22 |
jjacksonRIAB
Messages: 220 Registered: June 2011
|
Experienced Member |
|
|
Seemed OK at first but:
- Include file completion doesn't work (you're probably already aware of this)
- Alt+C works in .cpp files (only one direction though, from inner class scope to outer) but not .h files. It also appears to sometimes get the outer class name wrong.
Biggest issue thus far is 100% CPU and memory exhaustion. Before indexing, TheIDE uses around 50 megabytes, after first indexing it goes up to around 150, then eventually libclang breaks, autocomplete stops working for some symbols, then all - a second indexing increases memory usage until it reaches around 1.8 gig. This is with only one core enabled. With all cores, it uses all available system memory and freezes the OS... typically when compiling.
[Updated on: Sun, 18 September 2022 12:23] Report message to a moderator
|
|
|
|
|
Re: theide with libclang [message #58859 is a reply to message #58858] |
Sun, 18 September 2022 16:57 |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate Contributor |
|
|
In my case (Lenovo ThikPad T530 8GB RAM, 2 cores (4 threads), indexer is using 4 threads) when indexing TheIde itself:
- 1.3GB when reindexing all src. Memory usage doesn't go down after reindexing.
- 300MB when opening an already indexed TheIde project.
I guess, memory allocation strategy is inefficient.
Regards,
Novo
|
|
|
Goto Forum:
Current Time: Mon May 06 05:01:49 CEST 2024
Total time taken to generate the page: 0.03160 seconds
|