mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.5k stars 302 forks source link

Reduce how many times the Node runtime auto-detected notification is displayed #975

Closed robmv closed 2 years ago

robmv commented 2 years ago

Describe the bug

Every time VS Code is started the Node runtime auto-detected. Using /usr/bin/node. is displayed. This is annoying, the notification bell remain unread until I go and remove the notification.

To Reproduce

Steps to reproduce the behavior:

  1. Open VS Code with this extension installed.
  2. See notification.

Expected behavior

I expect the notification to be displayed one time, and probably later if it finds another different runtime than the current one, or maybe no notification at all.

Screenshots

image

Desktop (please complete the following information):

Additional information

There is a setting named sqltools.disableReleaseNotifications but not one to disable this, maybe that is another way to solve this issue..

gjsjohnmurray commented 2 years ago

Please update to 0.25.1 which reinstates the previous default (false) for auto-detection of a Node runtime. Of the four "official" drivers, only the SQLite one needs a Node runtime identified. This is documented here.

robmv commented 2 years ago

Thanks for the fast response, solved. I don't use the SQLite driver but if its users haven't said something about the notification being annoying, maybe I am too picky :(

gjsjohnmurray commented 2 years ago

Glad this has helped you. Closing, but will keep your feedback in mind in case others concur.

oaahmad commented 2 years ago

@gjsjohnmurray I am using SQLite and find the notification a little annoying. Please consider not showing it on every startup (or at least adding a setting to disable it). Thanks

gjsjohnmurray commented 2 years ago

@oaahmad does the gearwheel button on that notification allow you to suppress it?

oaahmad commented 2 years ago

@gjsjohnmurray Doesn't look like it. Clicking the gearwheel only shows a "manage extension" option. Clicking that option opens the extension page (with the readme)

gjsjohnmurray commented 2 years ago

@oaahmad I suggest you change your sqltools.useNodeRuntime setting to be the string that the message reports instead of true. For example if your message is identical to the one in the screenshot at the top of this issue you would change

    "sqltools.useNodeRuntime": true,

to

    "sqltools.useNodeRuntime": "usr/bin/node",

If you are on Windows the auto-detected patch will contain backslashes, in which case you must double these in the JSON string.

oaahmad commented 2 years ago

That works thank you. My only concern now is if I have to switch between operating systems (I would need a different path for macOS vs Windows), but I don't have to do that right now so I can worry about that later

117503445 commented 1 year ago

@gjsjohnmurray I think it's possible to not send a notification when node is successfully detected, since the user doesn't care about that.

Now every time vscode starts, it sends out a notification that the node was successfully detected, which bothers me. But I can't specify the path to the node either, because I use both windows, macos , linux and the path to the node is different in those systems. And if the path to the node is specified, then it won't work across OSes.

gjsjohnmurray commented 1 year ago

@117503445 this is requested in #1043