Gruntfuggly / todo-tree

Use ripgrep to find TODO tags and display the results in a tree view
Other
1.44k stars 139 forks source link

Highlight not working in vscode insiders #685

Closed Elias-Graf closed 1 year ago

Elias-Graf commented 1 year ago

The highlight stopped working (since a few versions, actually) in the insider build.

I've verified it on my OSX system, and on my Windows machine.

I've observed the following error in the "Extension Host" output:

2022-10-18 08:55:51.208 [error] TypeError: Class constructor Qt cannot be invoked without 'new'
    at p (/Users/elias/.vscode-insiders/extensions/gruntfuggly.todo-tree-0.0.219/dist/extension.js:99:15596)
    at /Users/elias/.vscode-insiders/extensions/gruntfuggly.todo-tree-0.0.219/dist/extension.js:99:18900
    at Array.forEach (<anonymous>)
    at Timeout.k [as _onTimeout] (/Users/elias/.vscode-insiders/extensions/gruntfuggly.todo-tree-0.0.219/dist/extension.js:99:18873)
    at listOnTimeout (node:internal/timers:561:11)
    at process.processTimers (node:internal/timers:502:7)
Elias-Graf commented 1 year ago

The issue seem to be missing new keywords here:

https://github.com/Gruntfuggly/todo-tree/blob/2993e2ee2713c1000f76abe81e295b5ecf6d9eb9/src/highlights.js#L103-L104

and here:

https://github.com/Gruntfuggly/todo-tree/blob/2993e2ee2713c1000f76abe81e295b5ecf6d9eb9/src/highlights.js#L109-L110

Maybe that was previously allowed, but apparently not any more. Adding those two new fixes the issue. I currently don't have time to test this on multiple builds (stable etc.), but I can do that later today and submit a pull request.

Elias-Graf commented 1 year ago

I'm actually not sure what caused this incompatibility, maybe this commit: https://github.com/microsoft/vscode/commit/65c18dff87a12dac9c45861bf908daee71cf9afa? I'm sadly not versed enough in those "hacky" / old JavaScript things to make a definitive statement.

Anyway, since the line below the added keyword already seemed to use new anyway, it shouldn't be an issue. Additionally, I tested it on the newest insider and release version.