next-ls icon indicating copy to clipboard operation
next-ls copied to clipboard

Cleanup same file occurrences when inserting a symbol

Open crbelaus opened this issue 1 year ago • 3 comments

This pull request ensures that when inserting a symbol we clean up the existing symbols for the same file.

Previously we were just removing the existing symbols for the same module, which worked if we update a module or rename its file. This left one corner case uncovered: renaming the module while keeping the filename.

This pull request fixes this and should fix #305. To test this you can perform the steps that I wrote in there and confirm that after renaming the module, the old module information is not present anymore in the symbols table.

crbelaus avatar Oct 25 '23 17:10 crbelaus

Marking as a draft as the tests are failing and I won't have time to fix it today.

crbelaus avatar Oct 25 '23 17:10 crbelaus

I am completely lost regarding the tests. I've cleaned everything and switched to main and they still fail on my machine. Not sure what I did 🙈

crbelaus avatar Oct 26 '23 14:10 crbelaus

@crbelaus i'll take a look tonight, no worries! Thanks for the hard work 💪

mhanberg avatar Oct 26 '23 14:10 mhanberg