Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » ide now using libclang
ide now using libclang [message #58835] Fri, 16 September 2022 10:57 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
After 3 months of development, theide is now using libclang for Assist. There are still some issues to fix/improve, but overall it now seems stable enough (and useful) for the community to start using/testing.

Some notes and (sometimes) temporary issues:

- in Linux, we have yet to alter the installation script to install libclang. However, as we are using runtime loading for it, when not installed it just means Assist does not work...

- Unfortunately one of drawbacks of libclang is that it does not work inside templates. I have a workaround in mind for autocomplete maybe, but for now it is a feature, not a bug.

- There is a new function, Alt-U - find all usage of current function/variables. There are more to come...

- Navigator is now usable, but still needs some work. Will work a bit differently.

- All libclang parsing is done in background threads. It is MUCH heavier on computing resources than our home-grown parser. The impact can be to a degree adjusted in Setup... Especially "indexer" - the component that needs to recompile all files of project to keep track of everything - is heavy, probably needs at least 4 CPU cores to be used reasonable. It is possible to make it "on command" in setup. That said, with 5950X, it takes 11s to reindex theide sources, which IMO is fine.

(this merge happened right now, so it will be in nightly builds tomorrow)
Re: ide now using libclang [message #58839 is a reply to message #58835] Fri, 16 September 2022 13:25 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
./umk reference CoPipe CLANG -bus
/home/buildbot/worker/l-upp/build/reference/CoPipe/CoPipe.cpp:21:7: error: no member named 'Pipe' in 'Upp::CoWork'
                        co.Pipe(PROCESSLINE, [=] { SplitLine(line); });
                        ~~ ^
/home/buildbot/worker/l-upp/build/reference/CoPipe/CoPipe.cpp:35:8: error: no member named 'Pipe' in 'Upp::CoWork'
                                co.Pipe(PROCESSID, [=] { ProcessId(w); });
                                ~~ ^


Regards,
Novo
Re: ide now using libclang [message #58840 is a reply to message #58839] Fri, 16 September 2022 13:47 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Novo wrote on Fri, 16 September 2022 13:25
./umk reference CoPipe CLANG -bus
/home/buildbot/worker/l-upp/build/reference/CoPipe/CoPipe.cpp:21:7: error: no member named 'Pipe' in 'Upp::CoWork'
                        co.Pipe(PROCESSLINE, [=] { SplitLine(line); });
                        ~~ ^
/home/buildbot/worker/l-upp/build/reference/CoPipe/CoPipe.cpp:35:8: error: no member named 'Pipe' in 'Upp::CoWork'
                                co.Pipe(PROCESSID, [=] { ProcessId(w); });
                                ~~ ^


Thanks, that example needs to be deleted. Pipe was an experimental concept that failed.

Mirek
Re: ide now using libclang [message #58905 is a reply to message #58840] Fri, 23 September 2022 12:49 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi Mirek,

When compiling with MSBT22x64, I get:
C:\upp-git\upp.src\uppsrc\Core\Other.h(123): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
C:\upp-git\upp.src\uppsrc\Core\Other.h(143): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
C:\upp-git\upp.src\uppsrc\CtrlLib/DropChoice.h(83): warning C4099: 'Upp::PopUpList::Popup': type name first seen using 'struct' now seen using 'class'
C:\upp-git\upp.src\uppsrc\CtrlLib/DropChoice.h(54): note: see declaration of 'Upp::PopUpList::Popup'
C:\upp-git\upp.src\uppsrc\CtrlCore\ImageWin32.cpp(233): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
C:\upp-git\upp.src\uppsrc\CtrlCore\ImageWin32.cpp(263): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
C:\upp-git\upp.src\uppsrc\CtrlCore\ImageWin32.cpp(297): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
C:\upp-git\upp.src\uppsrc\CtrlCore\ImageWin32.cpp(323): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data
C:\upp-git\upp.src\uppsrc\CtrlCore\CtrlAttr.cpp(137): warning C4244: 'initializing': conversion from 'Upp::int64' to 'Upp::dword', possible loss of data
C:\upp-git\upp.src\uppsrc\CtrlCore\CtrlAttr.cpp(161): warning C4244: 'return': conversion from 'Upp::int64' to 'int', possible loss of data
C:\upp-git\upp.src\uppsrc\CtrlCore\CtrlAttr.cpp(162): warning C4244: 'return': conversion from 'Upp::int64' to 'int', possible loss of data
C:\upp-git\upp.src\uppsrc\CtrlCore\CtrlDraw.cpp(282): warning C4101: 'q': unreferenced local variable
C:\upp-git\upp.src\uppsrc\CtrlCore\Win32Clip.cpp(412): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
C:\upp-git\upp.src\uppsrc\plugin\sqlite3\Sqlite3upp.cpp(644): warning C4244: 'argument': conversion from '__int64' to 'int', possible loss of data


Best regards,

Tom
Re: ide now using libclang [message #58913 is a reply to message #58905] Sat, 24 September 2022 10:20 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3357
Registered: August 2008
Senior Veteran
Some of them also happen in MSVC 2017.

Best regards
IƱaki
Re: ide now using libclang [message #58951 is a reply to message #58835] Thu, 29 September 2022 02:37 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 697
Registered: December 2005
Location: Budapest, Hungary
Contributor
Thanks for your work. I compiled it.
It is not so slow, quite usable on an ancient i7.

I can see two problems now:

In AddressBook example, in a method of AddressBook class, if I type a member's name and a dot, it doesn't see the member's members. It is OK on local/global variables or arguments. Is this because of that template "feature"?

An other thing is, that Help's history is buggy. It works only, if the topic has internal links with labels (e.g. TheIDE help / Build flags).
Cross references and clicking on tree items are not going into history (e.g. Used packages / Core / ArrayMap, and you click to a cross link, such as AMap or moveable). (I think, this bug is since implementing label handling in topic links.)

Edit:
My system is Ubuntu 20.4 with libclang1-10

[Updated on: Thu, 29 September 2022 02:40]

Report message to a moderator

Re: ide now using libclang [message #58952 is a reply to message #58835] Thu, 29 September 2022 03:00 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 697
Registered: December 2005
Location: Budapest, Hungary
Contributor
BTW, this new assist is extremely useful. It can recognize my macro generated class declarations. Cool! Thanks a lot!
Re: ide now using libclang [message #58953 is a reply to message #58952] Thu, 29 September 2022 08:22 Go to previous message
peterh is currently offline  peterh
Messages: 108
Registered: November 2018
Location: Germany
Experienced Member
Yes, it can also find overloaded operators with Alt-J and functionality of the "C" Button and find references with Alt-U in the designer is much improved and helpful.

[Updated on: Thu, 29 September 2022 08:22]

Report message to a moderator

Previous Topic: Core/SSH package, underlying libssh2 library is upgraded to 1.10.0
Next Topic: ide: Edits now also shown in scrollbar
Goto Forum:
  


Current Time: Sat Apr 27 01:58:58 CEST 2024

Total time taken to generate the page: 0.03140 seconds