You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like that it doesn't auto-restart when I change the direnv during development, but on startup it's often just a bit annoying I have to click it each time I open a new window.
I know that it's not possible to skip this step of reloading extensions, so I thought it could auto-restart when opening the window?
The text was updated successfully, but these errors were encountered:
I don't think vscode has API to determine whether we are (still) starting up (also see below) so we'd have to modify the load during activation. The experiment/sync branch might have some inspiration in case you want to give it a go.
Some caveats that come to mind:
It's Hard to really determine whether we're still in startup, because the direnv execution can take arbitrarily long. Like when it starts downloading and/or building a whole toolchain or dependencies to work on stuff. And when the first run on activation does take long, and one starts working while it runs, then getting interrupted would suck 😔
In case stuff goes wrong and the extension keeps believing it has to restart then this would throw it into an infinite automatic restart loop, we might want some protection against that 🤔
…That said, the same arguments apply to the existing auto restart preference, so if we default to false that should be fine*? And I can start thinking about some auto restart loop detection.
I don't think vscode has API to determine whether we are (still) starting up (also see below) so we'd have to modify the load during activation. The experiment/sync branch might have some inspiration in case you want to give it a go.
I will check it out 🤘
It's Hard to really determine whether we're still in startup, because the direnv execution can take arbitrarily long.
Wouldn't we be able to save the timestamp when direnv execution starts and have an arbitrary (configurable) max time for the auto-reload?
In case stuff goes wrong and the extension keeps believing it has to restart then this would throw it into an infinite automatic restart loop, we might want some protection against that 🤔
That is a good idea 😅
Is there a persistent storage for vscode extensions? Or use .direnv/vscode-ext-data.json (as that should be in gitignore)?
There you could save the last auto-restart attempt (and if it was successfull), and if there was a recent one (&& it did not succeed) - then skip auto-reload... or something like that 🤔
Thanks for this great extension ❤️
I like that it doesn't auto-restart when I change the direnv during development, but on startup it's often just a bit annoying I have to click it each time I open a new window.
I know that it's not possible to skip this step of reloading extensions, so I thought it could auto-restart when opening the window?
The text was updated successfully, but these errors were encountered: