New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async section are not rendering #1193
Comments
Interesting. I guess maybe async worker fails sometimes. Maybe we can fix that be restarting it. If you're struggling with the async rendering, you can try disabling it for now, by: SPACESHIP_PROMPT_ASYNC=false |
Not sure if this is related, but it sounds like they might be akin to one another. I just updated via antigen, and received something like Disabling async via the above command, stopped the error. It was extremely annoying there for a moment. |
Same issue as @anoduck here. |
I also have the issue as @jamerst. I have the same setup, Fedora Workstation, Gnome Termnial, ZSH version. I have disabled async untill the main issue is found. |
This issue can cause printing of the prompt (or part of it) twice. In my case, having |
i can provide another data point here: i did have the same issue as @jamerst under Linux mint 20.3 una |
@haschu Beginning to believe that receiving the message |
I guess that's because Spaceship doesn't handle worker failure properly. We have a todo-task for it here: https://github.com/spaceship-prompt/spaceship-prompt/blob/master/lib/core.zsh#L61-L67 We should implement worker error handling, something like pure prompt has: https://github.com/sindresorhus/pure/blob/main/pure.zsh#L507-L530 |
Hey, everyone! I've tried to resolve the issue. Now the worker is trying to relaunch itself when it gets failed. Hopefully this will help to resolve the issue. Let me know if it doesn't. |
i'm using the latest 192231e but the async doesn't work at all. |
I am also having the same issue as above, adding when adding
running WSL2 |
I need to revise my comments: it's not "the async doesn't work at all". a more precise description would be:
also i tried to:
sadly the failure rate remains unchanged |
Hopefully this PR #1246 will help to partly resolve this problem. |
@zachliu yes, but it could block the whole process blocking the rendering of other sections |
i see, i'm not using the kubectl section. but i'm going to dig a bit deeper on the terraform section. its behavior is particularly troubling |
I have this issue on most sections, even on |
ok new data point: before my
in order for the
now here comes the fun part:
|
Okay, I've finally run into the similar problem. I got UPD: Though, removing only |
@denysdovhan I really feel for ya. |
Hey everyone, check v4.6.0 version. It resolved the issue with always displaying |
it's still the same for me: Linux mint 20.3 una |
The same issue still exists in v4.6.0 for me. Several sections are always blocked by My workaround is to disable
|
Issue still persist for me |
Ok, got it working with latest zsh-async
|
I can test the latest ( |
Inital testing doesn't show any change for me. I'll check everything is wired together since @mufasa71 seems to be working with the latest 👇 More for my information when I come back to this |
@KyleOndy if you have old |
@mufasa71 , hmm, I'll need to look into that. In a fresh environemnt I do see the git branch information with So its likely there is some cache on my local setup, I need to do some digging into where these caches are. |
I pushed the updated zsh-async v1.8.6 to master branch. No published version yet. Please let me know if this resolves this issue for you (especially those who use Linux distros). Use the latest master (should be loaded automatically if you use any zsh plugin manager tool, like zgen, zplug, etc) |
I'm still having issues (Debian 11 / Zsh 5.8 / f174447) |
When should we expect async loading to be fixed? |
@dmint789 unfortunately I can't give exact ETA for the fix of this problem. I understand that you really want this to be fixed, but try to understand that I'm maintaining this project in my free time, besides my daytime job, missile strikes and electricity outages during the war. Any help with this issue is highly appreciated. Thanks for understanding! |
Dude, seriously... be careful out there. We completely understand. |
FTR Fedora still has this problem. I was showing the theme to a newbie on a clean F38 install with omz and all we ever saw was |
I had the same problem, solution was turning off all the plugins I dont actually use 😅 |
Enabled sections: SPACESHIP_PROMPT_ORDER=(
# user # Username section
dir # Current directory section
host # Hostname section
git # Git section (git_branch + git_status)
python # Python section
# venv # virtualenv section
# conda # conda virtualenv section
exec_time # Execution time
async # Async jobs indicator
# line_sep # Line break
jobs # Background jobs indicator
exit_code # Exit code section
# time # Time stampts section
char # Prompt character
) The setup is pretty lean. |
@denysdovhan Yes, I totally understand. It's not such a big deal, since there is the option to disable async rendering. |
@anoduck That didn't work for me unfortunately, still shows ... for the async section |
@dmint789 Just some basic, and probably stupid questions.
|
Hey all, I think I was able to pinpoint the issue to This also explains because in this issue we have seen many different prompts having the issue: at the end of the day, it is up to how long a command takes, and there are so many variables... On my PC, I noticed that the threshold is around 50ms: if any command takes less than that, then it is not properly returned by As a temporary workaround, I set a diff --git a/async.zsh b/async.zsh
index de13e75..8a8a981 100644
--- a/async.zsh
+++ b/async.zsh
@@ -28,6 +28,8 @@ _async_job() {
# Disable xtrace as it would mangle the output.
setopt localoptions noxtrace
+ sleep 0.05
+
# Store start time for job.
float -F duration=$EPOCHREALTIME This addresses the problem for me, although now the prompt is way slower (0.05s of delay for each section). I wonder if the root cause is a bug in zpty, or the problem is that Hope it can be useful! |
@rpadovani Hey, this is a great finding. I've been dinging deep into this problem as well. I also found that adding a I believe we should work together in order to fix that problem at |
This work really great! It solve the issue in my device. I use |
I found a solution for this, I hope it works for you also in .zshrc add this which you can find in the docs here SPACESHIP_PROMPT_ORDER=(
time # Time stamps section
user # Username section
dir # Current directory section
host # Hostname section
git # Git section (git_branch + git_status)
hg # Mercurial section (hg_branch + hg_status)
package # Package version
node # Node.js section
bun # Bun section
deno # Deno section
ruby # Ruby section
python # Python section
elm # Elm section
elixir # Elixir section
xcode # Xcode section
swift # Swift section
golang # Go section
perl # Perl section
php # PHP section
rust # Rust section
haskell # Haskell Stack section
scala # Scala section
kotlin # Kotlin section
java # Java section
lua # Lua section
dart # Dart section
julia # Julia section
crystal # Crystal section
docker # Docker section
docker_compose # Docker section
aws # Amazon Web Services section
gcloud # Google Cloud Platform section
azure # Azure section
venv # virtualenv section
conda # conda virtualenv section
dotnet # .NET section
ocaml # OCaml section
vlang # V section
zig # Zig section
purescript # PureScript section
erlang # Erlang section
kubectl # Kubectl context section
ansible # Ansible section
terraform # Terraform workspace section
pulumi # Pulumi stack section
ibmcloud # IBM Cloud section
nix_shell # Nix shell
gnu_screen # GNU Screen section
exec_time # Execution time
async # Async jobs indicator
line_sep # Line break
battery # Battery level and status
jobs # Background jobs indicator
exit_code # Exit code section
sudo # Sudo indicator
char # Prompt character
) and then delete everything you don't need. for me it became like this
And also don't forget to remove all plugins in |
Is there an existing issue for this?
The problem
The rendering of async sections such as Git is not reliable and frequently fails to render:
It seems to be random with no discernible pattern. The async indicator (...) also never disappears, it is always there, and the async count is always 23 when enabled.
Relevant Zsh configuration
What is version of Spaceship are you using?
v4.2.5
What is version of Zsh are you using?
5.8.1
What operation system are you running?
Fedora Linux 36 (Cinnamon)
Do you use any Zsh framework or plugin manager?
Antibody
Which terminal emulator do you use?
Gnome Terminal (v3.44.1)
Additional information
No response
The text was updated successfully, but these errors were encountered: