Andersbakken / rtags

A client/server indexer for c/c++/objc[++] with integration for Emacs based on clang.
http://www.rtags.net
GNU General Public License v3.0
1.83k stars 253 forks source link

reindex does not work #801

Open ku3mich opened 8 years ago

ku3mich commented 8 years ago

Hi I new with rtags but it is odd:

I have a file a.c

int func(int a){
  return a + 1;
}

int main(){
  int p = func(10);
  p++;

  return p;
}

do following: $ rc -W pwd Deleted project: /usr/src/q/ $ rc -c cc a.c $ rc -F func a.c:1:5: int func(int a){ add a few empty lines to a.c from beginning, do rc -c cc a.c again, do rc -F func and get: a.c:1:5:

seems re-index does not work?

restart rdm, do rc -F func and get correct result a.c:3:5: int func(int a){

so only after restart rdm index is actualized? what I'm doing wrong?

Andersbakken commented 8 years ago

Interesting. This is definitely supposed to work.

Can you try the following:

$ rc -W pwd Deleted project: /usr/src/q/ $ rc -c cc a.c $ rc -F func a.c:1:5: int func(int a){ add a few empty lines to a.c from beginning, $ touch a.c $ rc -F func

And see if this helps?

What editor are you using to make the changes to a.c?

We're trying to monitor the filesystem for changes to determine when we need to reindex the file but it's conceivable that and editor might be able to fool us into thinking that nothing's changed.

regards

Anders

ku3mich commented 8 years ago

thanks, unfortunately I can not reproduce bug now I tried from scratch and all works as expected.

Maybe issue with different compiler I use? I use sdcc and gcc, some files added to rtags with rc -c sdcc file.c some with rc -c gcc -c cfile.c

How rtags determine compiler? Is there any differences with processing file?

Anyway I will keep you updated.

I tried a lot stuff like rtags but seems rtags+emacs is the best! Thanks a lot for this project!

Regards, Sergei Kuz'michev

On 24 September 2016 at 07:56, Anders Bakken notifications@github.com wrote:

Interesting. This is definitely supposed to work.

Can you try the following:

$ rc -W pwd Deleted project: /usr/src/q/ $ rc -c cc a.c $ rc -F func a.c:1:5: int func(int a){ add a few empty lines to a.c from beginning, $ touch a.c $ rc -F func

And see if this helps?

What editor are you using to make the changes to a.c?

We're trying to monitor the filesystem for changes to determine when we need to reindex the file but it's conceivable that and editor might be able to fool us into thinking that nothing's changed.

regards

Anders

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Andersbakken/rtags/issues/801#issuecomment-249345392, or mute the thread https://github.com/notifications/unsubscribe-auth/ADUZCMW1mOm_NeiUxEKdPt6kV3bguFAAks5qtK1ogaJpZM4KCxwk .