Closed maxbrunsfeld closed 2 years ago
Oh, it's because the future returned by watch::Receiver::recv()
resolves immediately with None
if the sender has been dropped, so we're busy looping in that line of code.
Side note: whats the solution to this. I don't understand macos enough yet to know, but it seems like this issue where launching from finder doesn't have a setup terminal environment causes problems for many apps (neovide included). Is there a correct way to launch such that the path is set up even when you run from finder?
In Atom, we would check if the app was launched from finder by inspecting certain environment variables like SHELL
. I think we were able to detect it pretty reliably. Then, if we concluded that it was launched from Finder, we would actually spawn a login shell process that just printed its PATH
environment variable (after loading the user's initialization script).
I think we'll need to do something like that in Zed on macOS, if we want to continue to rely on any external system-installed programs.
This happens to me when I launched Zed from finder, but also if I run Zed with the
PATH
environment variable set to the empty string.Sampling the process, I see that we're in a busy loop calling
memset
andmemmove
inside ofpostage::Stream::recv
. I see this in the call stack when attaching to the process with LLDB: