Author Topic: C++ tagging engine and multi-file search/replace not updating - 25.0.0.8  (Read 238 times)

rowbearto

  • Senior Community Member
  • Posts: 1807
  • Hero Points: 121
In 25.0.0.8, for example I have a function that does:

int myfunc(struct mystruct1 *myptr1);

I do a multi-file search/replace and change "mystruct1" to "mystruct2".

Then when I do "push-tag" on myfunc somewhere that it is getting used, the "select symbol" dialog is showing both the old and new function signatures. It shows one function with the new "mystruct2" but still shows another choice with the function containing "mystruct1".

I think that it should only show the new one.

If I then do a multi-file search/replace on myptr1 to myptr2, now I see 3 selections in the "select symbol" dialog:
  mystruct1 myptr1
  mystruct2 myptr1
  mystruct2 myptr2

After retagging the workspace this issue goes away and I only see the latest one.

I am using 25.0.0.8.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3106
  • Hero Points: 449
Re: C++ tagging engine and multi-file search/replace not updating - 25.0.0.8
« Reply #1 on: October 07, 2020, 11:12:28 pm »
The tag file is updated in the background after a save (the search/replace is a bunch of saves).  Sounds to me like the update just had not finished yet.  In which case, we have no way to know that the outdated version in the tag file is not an overload (without making assumptions which may not be correct).

rowbearto

  • Senior Community Member
  • Posts: 1807
  • Hero Points: 121
Re: C++ tagging engine and multi-file search/replace not updating - 25.0.0.8
« Reply #2 on: October 08, 2020, 12:21:35 pm »
Hi Dennis:

It was many minutes after the search/replace that I had this issue, background tagging should have completed. It is a small workspace, 613 files, and it takes < 20 seconds when I fully retag it. I never had this issue with v24.

I would think that with a multi-file search/replace would trigger retagging of the handful of files that changed, and that retagging in the background should be very fast with maybe 5-6 files updated.

So I think v25 introduced a regression in SE here.

I also find myself needing to retag my workspace much more often then I used to. I'm doing writing lots of new code, so maybe tagging engine is not keeping up with it. But I can only change 1 file at a time, tagging speed should be much faster than my speed.

rowbearto

  • Senior Community Member
  • Posts: 1807
  • Hero Points: 121
Re: C++ tagging engine and multi-file search/replace not updating - 25.0.0.8
« Reply #3 on: October 08, 2020, 09:15:06 pm »
Is it possible that background tagging stopped running for me? If I'm in a situation like this again, is there a way I can check that background tagging is active?

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3106
  • Hero Points: 449
Re: C++ tagging engine and multi-file search/replace not updating - 25.0.0.8
« Reply #4 on: November 02, 2020, 09:06:25 pm »
Assuming you are using fairly default options, and have not disabled background tagging on save or other scenarios, one way to know background tagging is still alive is to just tickle one of the source files in your project (type a space and then delete it).  Then wait and watch for a bit and see if a message displays in the message bar indicating that the file was tagged in the background.

BTW. There is an option to enable message logging. 
    Macro > Set Macro Variable... > def_message_logging = 1
The messages will be saved to <config>/logs/message.log
You'll want to turn this off after you are done with it.

There is also an option to enable background tagging logging, but the output is not super-obvious to parse.  def_tagging_logging = 1

Remember to turn these logging options off after you are done experimenting.