Skip to content
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

prompt function error: want 0 arguments, got 1 #9

Open
href opened this issue Jan 14, 2020 · 3 comments
Open

prompt function error: want 0 arguments, got 1 #9

href opened this issue Jan 14, 2020 · 3 comments

Comments

@href
Copy link
Owner

@href href commented Jan 14, 2020

This seems to be an issue with elvish-gitstatus and Elvish HEAD. Somewhat at random, the following error will pop up:

prompt function error: want 0 arguments, got 1

This cannot be reliably triggered and it is unclear what causes it, though it looks like a race-condition.

@href

This comment has been minimized.

Copy link
Owner Author

@href href commented Jan 20, 2020

With the latest HEAD (elves/elvish@4198512), the error is now different and occurs much more frequently (to the point of being annoying):

prompt function error: styled-text cannot be iterated

Do you see the same thing @zzamboni? @xiaq, any progress on some kind of tracing for Elvish?

@zzamboni

This comment has been minimized.

Copy link
Contributor

@zzamboni zzamboni commented Jan 21, 2020

I have not seen this specific error, but I have continued seeing the original one sporadically, particularly on large git repos when my machine is loaded, so I think it must be a race condition or timeout somewhere, but I still cannot pin it down.

@href

This comment has been minimized.

Copy link
Owner Author

@href href commented Jan 24, 2020

Okay, the prompt function error: styled-text cannot be iterated error was due to the changes to all. I used to have the following stale transform (to keep the prompt as is until it changes):

edit:prompt-stale-transform = $all~

Changing it to the following made the error go away:

edit:prompt-stale-transform = [text]{
    put $text
}

This might have also solved my initial error, as I haven't seen the prompt function error: want 0 arguments, got 1 in a bit, but since that error is somewhat random I'll have to wait and see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.