v5.1.4/5.2 problems parsing its own code?

Francis Herne mail at flherne.uk
Sun Sep 17 23:10:15 UTC 2017


On Sunday, 17 September 2017 23:53:25 BST Francis Herne wrote:
> On Sunday, 17 September 2017 09:38:15 BST René J.V. Bertin wrote:
> > Hi,
> > 
> > I don't know who of you get to see new bug reports, so forgive me for
> > spamvertising the report I created yesterday:
> > 
> > https://bugs.kde.org/show_bug.cgi?id=384775
> > 
> > In short, opening my session containing the KDevelop project in v5.1.2.5
> > works fine, all headerfiles are found and the parser finds nothing
> > particular to yell about. Install 5.1.40 from yesterday's 5.2 branch head,
> > and things go south (more so on Mac than on Linux, at that). The ticket
> > has
> > a number of screenshots. I've done full project reparsing, I've tried
> > deleting the entire session cache dir, nothing helps. In some cases I even
> > get complaints about Qt headerfiles not being found. I've tried importing
> > a
> > copy of the source tree with a virgin build dir and using cmake 3.9.1
> > directly instead of through a wrapper (but with all the required options),
> > same thing. I tried with a wrapper that makes CMake behave as if it
> > doesn't
> > have server mode so that the import is done with the trusted old
> > compile_commands.json method. Same thing (except that nice 4x shorter
> > import time).
> > 
> > This is using libclang 4.0.1, from the same compiler install I'm using to
> > build with, showing that the commands from compile_commands.json are
> > sufficient.
> > 
> > I'm out of ideas, except the one that there's something broken somewhere
> > in
> > a subtle, perverse way - I haven't yet observed any of this in the few
> > other projects I've tested (all much smaller, and not recently completely
> > reorganised).
> > 
> > Food for a sunday afternoon thoughts, maybe (a rainy one at that, here).
> > 
> > R.
> 
> I've been having similar problems today with the 5.2 branch after having to
> clear the cache.
> 
> As far as I can tell, many header files are never being parsed, even when
> they're opened in the editor. For example, nothing in integraltype.h or
> declarationid.h is highlighted or appears in the DUChain, except macro
> #defines and uses for some reason.
> 
> That screws up the parsing for anything that includes them, and causes bogus
> errors all over the place.
> 
> There's no CPU activity, and no problems shown for the affected files,
> they're just sitting there.
> 
> I'll try reverting things and see if that changes anything.
> 
> -Francis

More experiments:
I set the problem scope to "All Projects". There are >20k errors, which causes 
the UI to hang for many seconds each time I try to interact with it...

The top ones are rather nonsensical:

"No namespace named 'KDevelop'; did you mean 'std::KDevelop'?"
"No viable conversion from 'std::QString' to incomplete type 'QString'"
etc.

Screenshot attached.

Something seems to have gone badly wrong with the namespace code...

I have clang 5.0.0, CMake 3.9.2, kdevelop from 5.2 git branch.

-Francis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdev_nonsense.png
Type: image/png
Size: 332060 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170918/e814c891/attachment-0001.png>


More information about the KDevelop-devel mailing list