12 made me think, it seems like the only way to guarantee direnv is setup before other extensions is to do it both synchronously (no promises in the initialization code) and at process startup (otherwise it depends on extension activation order).
When reloading, it actually causes the extension host to restart because again, that seems like the only reliable way to ensure the new env is applied.
Which makes for a pretty badly behaved extension in some ways (it takes effect even if it's deactivated), but I don't see much alternative if we want to guarantee it happens first.
12 made me think, it seems like the only way to guarantee direnv is setup before other extensions is to do it both synchronously (no promises in the initialization code) and at process startup (otherwise it depends on extension activation order).
When reloading, it actually causes the extension host to restart because again, that seems like the only reliable way to ensure the new env is applied.
Which makes for a pretty badly behaved extension in some ways (it takes effect even if it's deactivated), but I don't see much alternative if we want to guarantee it happens first.