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

Blame panel not visible #2

Open
moltob opened this issue Sep 16, 2024 · 9 comments
Open

Blame panel not visible #2

moltob opened this issue Sep 16, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@moltob
Copy link

moltob commented Sep 16, 2024

Thank you for writing this extensions. It looks like exactly what I was looking for.

For some reason, I am not able to see the blame panel/sidebar/annotations. Relaunching/restarting VSCode did not help. No other git-related extension is active/installed.

Am I missing the obvious?

In the main editor a source file is open and I trigger the "toggle git blame annotations" command from the command panel. Noting happens in terms of editor/views. The "just blame" output window shows this (some internal names replaced with "xxx"):

🪲 Just Blame starting...
Create new blame instance for /home/xxx/work/xxx/zephyr/src/zephyr/services/entra_id/entitlement_update.py
Config:  {"colorScale":{"light":["#a4bed0","#aec5d5","#b8ccdb","#c2d4e0","#cddbe5","#d7e2ea","#e1e9ef","#ebf1f5","#f5f8fa","#fcfdfd"],"dark":["#65469b","#5e4190","#573c86","#50377b","#493371","#422e66","#3d2b5f","#362654","#2f214a","#291c3f"]},"locale":"en-GB"}
Workspace root: /home/xxx/work/xxx/zephyr
Relative path: src/zephyr/services/entra_id/entitlement_update.py
Running git blame: git --no-pager blame --porcelain "src/zephyr/services/entra_id/entitlement_update.py"
GitHub URL git@xxx-github.xxx.net:xxx/zephyr.git

In case it matters: This is VSCode running in Windows 10 connected to the local WSL instance, where the code/git lives.

Thanks!

@sapegin
Copy link
Owner

sapegin commented Sep 16, 2024

My only guess is that there's a runtime exception somewhere. Can you try to open Help → Toggle Developer Tools and see if there are any errors in the console?

@moltob
Copy link
Author

moltob commented Sep 16, 2024

You're right:

image

@sapegin
Copy link
Owner

sapegin commented Sep 16, 2024

This is very confusing, DateTimeFormat says that the +200 is an incorrect timezone, but I have the same timezone, and it works fine for me...

My guess is that maybe Electron on Windows doesn't support it? I'm on a Mac.

Can you try these two snippets in Code's DevTools console?

new Intl.DateTimeFormat('en', {dateStyle: 'long', timeStyle: 'long', timeZone: '+0200'}).format(new Date())
new Intl.DateTimeFormat('en', {dateStyle: 'long', timeStyle: 'long', timeZone: 'Europe/Berlin'}).format(new Date())

On my machine both work the same way in all browsers I have (Chromium, Firefox, Safari, and Code).

@moltob
Copy link
Author

moltob commented Sep 16, 2024

No issue in the console, it seems:

> new Intl.DateTimeFormat('en', {dateStyle: 'long', timeStyle: 'long', timeZone: '+0200'}).format(new Date())
'September 16, 2024 at 12:25:10 PM GMT+2'

> new Intl.DateTimeFormat('en', {dateStyle: 'long', timeStyle: 'long', timeZone: 'Europe/Berlin'}).format(new Date())
'September 16, 2024 at 12:25:20 PM GMT+2'

@moltob
Copy link
Author

moltob commented Sep 16, 2024

You want me to put some debug statements anywhere?

@sapegin
Copy link
Owner

sapegin commented Sep 16, 2024

Not sure what to log exactly; we can wrap the whole thing in try/catch so it won't crash the whole thing at least...

sapegin added a commit that referenced this issue Sep 16, 2024
@sapegin
Copy link
Owner

sapegin commented Sep 16, 2024

I published a new version (2.0.5) with try/catch and additional logs, so it shouldn't crash at least. I'm still not sure how to debug/fix the actual issue.

@sapegin sapegin added the bug Something isn't working label Sep 16, 2024
@moltob
Copy link
Author

moltob commented Sep 16, 2024

It does show annotations now. The vscode output shows this:

Error formatting date: Invalid time zone specified: +0200
Timestamp: "2022-09-16T12:08:16.000Z"
Time zone: +0200

@moltob
Copy link
Author

moltob commented Sep 16, 2024

I looked at your code and for me using the replacement TZ/format is just fine. Feel free to close the issue, whenever you like, unless you want to debug anything that comes to your mind. I am happy trying out anything you suggest.

Or just close. 😄

Thanks again for your effort and instantaneous support.

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