Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bookmarks not showing #16

Closed
alanloi opened this issue Apr 21, 2020 · 8 comments
Closed

Bookmarks not showing #16

alanloi opened this issue Apr 21, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@alanloi
Copy link

alanloi commented Apr 21, 2020

Bookmarks are not appearing on the panel.

Getting this error each time i click on a document in the editor:

[2020-04-21 20:28:57.283] [exthost] [error] TypeError: Cannot read property 'parent' of undefined
	at InlineBookmarkTreeDataProvider.getParent (c:\Users\Dev\.vscode\extensions\tintinweb.vscode-inline-bookmarks-0.0.16\src\features\inlineBookmarks.js:401:24)
	at c:\Users\Dev\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:573:427
	at c:\Users\Dev\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:54:761
	at new Promise (<anonymous>)
	at Object.t.asPromise (c:\Users\Dev\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:54:733)
	at e.resolveParent (c:\Users\Dev\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:573:395)
	at e.resolveUnknownParentChain (c:\Users\Dev\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:573:116)
	at c:\Users\Dev\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:572:213
@tintinweb tintinweb added the bug Something isn't working label May 5, 2020
@tintinweb
Copy link
Owner

hi @alanloi,

thanks for the bug report and sorry for not getting back to you earlier.

the error you're getting is weird. vscode's treeview should actually never call getParent with an element that is undefined 🤔

anyway, I am going to fortify the code so that it returns undef in case the caller already provides undef. that should fix the symptom. however, it'd still be interesting to understand why it's being called that way.

can you reliably reproduce?

@alanloi
Copy link
Author

alanloi commented May 5, 2020

hi @tintinweb

Yes, i can reproduce it each time, let me know once you have a fix and i can retest it for you.

I have the same set up on another machine and it seems to work fine on that. Perhaps it's something local.

@tintinweb
Copy link
Owner

tintinweb commented May 5, 2020

also going to add a command that clears the internal state as kind of a last resort. maybe the data the extension was working on was messed up.

I am going to provide you with a fixed version for testing in this thread later today. Appreciate your help 🙌

@alanloi
Copy link
Author

alanloi commented May 5, 2020

No worries, let me know what to do. I'll be here for another few hours at least.

tintinweb added a commit that referenced this issue May 5, 2020
fixed follow-mode not checking for undef
@tintinweb
Copy link
Owner

@alanloi please try this:

try to reproduce if the issue still persists. if so, try cmd + shift + p -> inlineBookmarks.debug.state.reset and re-open files in the editor that contain bookmarks. the view should autopopulated whenever a file is opened in the editor.

cheers 🙌

@alanloi
Copy link
Author

alanloi commented May 6, 2020

@tintinweb

I've retested and the error is gone. Thanks for your help.

The other thing i noticed earlier was, i reinstalled v16 and the bookmarks did not work at first. I restarted vscode and still no luck. Then i switched to a different project and it started to recognise the inline bookmark comments.

I haven't been able to reproduce it failing again, but it seems to be all working fine now, even before i installed the v17 update.

@tintinweb
Copy link
Owner

@alanloi

thanks for the feedback!

that could be related to the inline bookmarks being stored in the workspace cache. let me know if you see this more often and I'll investigate.

cheers,

@alanloi
Copy link
Author

alanloi commented May 6, 2020

@tintinweb 👌👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants