First indexing wrong due to missing include paths. CDT bug?

26 views
Skip to first unread message

oscar.as...@gmail.com

unread,
Jan 23, 2019, 5:17:25 AM1/23/19
to cmake4eclipse user mailing list
First indexing after starting up Eclipse is wrong. Include paths seem to be missing for the indexer, but looks good if I check paths under e.g. the CMAKE_EXPORT_COMPILE_COMMANDS parser. Everything works fine after re-index.

Steps to reproduce:
1. Have a project open.
2. Exit eclipse.
3. Make some changes and rebuild your project from command line.
4. Start eclipse again. Since files have changed Eclipse will trigger a re-index.

This first indexing seem to miss some include paths, but works fine after re-index. Maybe Eclipse starts the indexing too fast, before the Providers have provided the paths to the indexer?

- Is it CDT that should have asked providers for paths before starting the indexing?

- Or is it CMAKE_EXPORT_COMPILE_COMMANDS that should report paths to CDT earlier, before the indexing is started?

I have not seen this issue in Oxygen, but happens all the time in Eclipse 2018-12 with CDT 9.6.0.201812111211.
cmake4eclipse 1.13.0 is used.

Martin Weber

unread,
Jan 23, 2019, 12:16:48 PM1/23/19
to cmake4ecl...@googlegroups.com
Am Mittwoch, 23. Januar 2019, 11:17:25 CET schrieb oscar.as...@gmail.com:
> First indexing after starting up Eclipse is wrong. Include paths seem to be
> missing for the indexer, but looks good if I check paths under e.g. the
> CMAKE_EXPORT_COMPILE_COMMANDS parser. Everything works fine after re-index.

You write 'missing', do you refer to the include path shown on the
Preprocessor Include Path Settings page
or do you refer to the
Includes folder shown in the Project Explorer?
Which entries are missing? Those from the compiler-builtins-parser?
...

> This first indexing seem to miss some include paths, but works fine after
> re-index. Maybe Eclipse starts the indexing too fast, before the Providers
> have provided the paths to the indexer?
>
> - Is it CDT that should have asked providers for paths before starting the
> indexing?

You might ask this on the CDT dev-mailing list. But I doubt you will get an
valid answer there. Look at the CDT code base and how sparsely it is
documented.

>
> - Or is it CMAKE_EXPORT_COMPILE_COMMANDS that should report paths to CDT
> earlier, before the indexing is started?

ILanguageSettingsProvider implementations just get called to return their
entries: Method sig is public List<ICLanguageSettingEntry> getSettingEntries.
So I would say: No.

>
> I have not seen this issue in Oxygen, but happens all the time in Eclipse
> 2018-12 with CDT 9.6.0.201812111211. cmake4eclipse 1.13.0 is used.

Possibly a regression in CDT. Bug tracker is here: <https://bugs.eclipse.org/
bugs/buglist.cgi?quicksearch=product%3ACDT>

/Martin

--
Cd wrttn wtht vwls s mch trsr.




oscar.as...@gmail.com

unread,
Jan 28, 2019, 3:09:06 AM1/28/19
to cmake4eclipse user mailing list
Thanks!
I created a bug report:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=543882

Includes and defines from Language Providers are fine. However the indexer does not seem to use these includes in the first run.

Reply all
Reply to author
Forward
0 new messages