Open danilort opened 2 years ago
I have observed the same in Epic anchors. Suddenly, without a pattern I have noticed, duplicate entries for the same anchor are under Epics.
I am having this problem as well. On version 1.10.1 and VS code version 1.73.1.
I don't know if this is the cause, but I noticed that there is a slight difference in the path of the double entries. One starts with lowercase drive letter /c:/ and the other starts with an uppercase drive letter /C:/.
I also noticed I was only seeing duplicates when a file with anchors was open in the open editors window.
just discovered this extension and LOVE it so much. wish I knew about it sooner.
I have this issue as well. Hopefully these repro notes will help @danilort fix:
settings.json:
"commentAnchors.tags.anchors": {
"ANCHOR": {
"scope": "workspace"
}
}
the issue is then triggered by:
//TODO: Remove/refactor all below this (legacy matching methods)
// this is used by:
// LINK ./foo.js#runSomething
// which is used by:
// LINK ../node_server/controllers/bar1.js#runFoo1
// LINK ../node_server/controllers/bar2.js#doFoo2
// LINK ../node_server/controllers/bar3.js#seeFoo3
Seems to only happen with a file with link to Anchor. If the same file has a link to a line number it doesn't duplicate the entries. The duplicate entries will also start showing up if you just focus another tab and switch back to the tab that has the link to the anchor. The actual link to anchor will only jump to the top of the file not the anchor line. Not sure if its related.
The issue seems to be that by calling the getAnchors in linkProvider.ts with a newly created fileUri its triggering an add to the cache since the keys are Uri objects @JordanDi123
INFO
CommentAnchors v1.9.6 (also beta 1.10.0) VSCODE v1.63.2 OS: Windows 10
Description
In the "Workspace Anchors" section I often see duplicates. It's not a big problem, but creates a bit of confusion.
Very strange.