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
Recently, my PR to enable using rust-analyzer from PATH was merged. After that I've decided to use a nix + direnv based installation which does not expose cargo or any other rust binary to the PATH. This is problematic, because if I understand correctly, currently runnables don't use delegate.which to determine the PATH to the binaries, instead just using the name. It doesn't work with directory local installations as right now create_terminal function from project/terminals.rs does not pass the full environment (the one acquired by executing delegate.shell_env) to the executed task.
The two possible solutions might be
Use delegate.which for runnables, falling back to just the name
Pass the shell_env to all task which is, in my opinion better, as it allows in the future to just use sh or something similar for language defined runnables without needing to worry about not having adequate environment variables set, therefore allowing for more advanced predefined tasks
See the create_terminal function to understand what environment we are using right now
Check for existing issues
Describe the bug / provide steps to reproduce it
Recently, my PR to enable using rust-analyzer from PATH was merged. After that I've decided to use a nix + direnv based installation which does not expose
cargo
or any other rust binary to the PATH. This is problematic, because if I understand correctly, currently runnables don't usedelegate.which
to determine the PATH to the binaries, instead just using the name. It doesn't work with directory local installations as right nowcreate_terminal
function fromproject/terminals.rs
does not pass the full environment (the one acquired by executingdelegate.shell_env
) to the executed task.The two possible solutions might be
delegate.which
for runnables, falling back to just the nameshell_env
to all task which is, in my opinion better, as it allows in the future to just usesh
or something similar for language defined runnables without needing to worry about not having adequate environment variables set, therefore allowing for more advanced predefined tasksSee the create_terminal function to understand what environment we are using right now
Environment
Zed: v0.140.4 (Zed Preview)
OS: macOS 14.5.0
Memory: 8 GiB
Architecture: aarch64
The text was updated successfully, but these errors were encountered: