Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] IIndex.getFilesWithUnresolvedIncludes() returns excluded files

Thanks for the input.

I changed the settings you mention in my workspace and indeed I have a far more robust environment for my purposes. Changing these settings made that I now better understand the behaviour of the indexer in regards to the excluded resources.

I also found the indexer to behave far more consistent with the first 2 options you mention off. So I have a workaround :-).

There still is the inconsistent results before and after running the indexer after removing resources as described below (when the first 2 options are on default).

As it clearly is related to the first 2 options -which imply some fussy logic on how these headers and sources are found- one can rightly debate that the path to "the situation you are in" impacts the result and as such the inconsistent result is "by design". This inconsistency can easily be compared to a failing build that is fixed with a build->clean.

The way I see it now I think it is up to cdt-dev to decide whether this inconsistency is "a bug" a "by design". Both are very defend-able.

If it is by design I would add something like the following to this page http://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Fconcepts%2Fcdt_c_indexer.htm :

"If you notice that the indexer is not behaving correctly forcing a clean (index->rebuild index) on the indexer database may fix the problem. This can happen because the indexer works with historic data which may be outdated."

Best regards
Jantje

Op 18/07/2017 om 23:32 schreef kesselhaus:
I guess, first of all, you should ask the question about the preferences
workspace and per project, since the Indexer Settings has two options here:

* Index source files not included in the build (default on)
* Index unused headers (default on)
* Index all header variants  (default off)

* Build configuration for the indexer
	* Use active build configuration
	* Use the build configuration specified in the projects indexer settings

Am 05.06.2017 um 14:46 schrieb Jonah Graham:
Hi Jantje,

It sounds like you have found a legitimate bug. Can you see how to fix
it? Obviously the index update is being triggered properly when
exclude is removed.

These are the questions I would aim to answer (in order):
Is the index update process being run when a folder is excluded?
Is the index failing to see the change?
Is the index seeing the change, but failing to remove a file that is
now excluded?

I am not sure how to fix this, hopefully someone else on the list has
a better idea.

Jonah


~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com


On 4 June 2017 at 17:45, Jan Baeyens <jan@xxxxxxxxxx> wrote:
Jonah

Thanks for the answer.

I investigated this more in detail and I can reproduce the issue as follows.
Create a CDT project with following files
main.cpp
hide/hide.h
hide/hide.cpp

hide.h contains
extern int doYouSeeMe;

hide.cpp contains
  int doYouSeeMe=8;

main.cpp contains
void haha(){
     int t;
     t=doYouSeeMe;
}

ctrl left click on doYouSeeMe in main.cpp and you go to hide.cpp
add the hide folder to the excluded resources
ctrl left click still sends you to hide.cpp
rebuild the index
ctrl left click no longer works (as should be)

undo the exclude and all works again
Exclude hide.cpp and doYouSeeMe is still found in hide.cpp
Rebuild the index and crtl left click leads to hide.h

It looks as if excluding files does not properly adjusts the index.

Best regards
Jantje




Op 31/05/2017 om 16:53 schreef Jonah Graham:
Sorry I don't have a proper answer for you on your questions. Perhaps

my incomplete answers will stimulate some conversation.

On 29 May 2017 at 01:18, Jan Baeyens <jan@xxxxxxxxxx> wrote:
Is this by design or is this a bug?
I don't know. Could easily be by design as the indexer tries to index
everything.

In both cases what is the best way to check whether the file is a
excluded
file?
Are you referring to the build settings? My guess is you need to look
in the project description code rather than the indexer code to figure
that out.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev




Back to the top