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

Error when using theme with antigen #15

Open
NellyWhads opened this issue Jan 29, 2018 · 14 comments
Open

Error when using theme with antigen #15

NellyWhads opened this issue Jan 29, 2018 · 14 comments

Comments

@NellyWhads
Copy link

Hey there,

The error I get when using this theme with antigen is the following:
local:1: maximum nested function level reached

This happens 6-7 times after every command I execute, before I'm presented with the prompt line again.

My OS is Ubuntu 14.04 - I can post any more information as necessary, I'm just unsure how to debug the issue. This issue is not present when running on another Ubuntu-based install (Elementary OS Loki)

PS, I've confirmed that it is actually the theme that is causing the issue; commenting it out (and using robbyrussell, for example) makes zsh run just fine.

@subnixr
Copy link
Owner

subnixr commented Jan 29, 2018

The error I get when using this theme with antigen is the following:
local:1: maximum nested function level reached

The error looks like a recursion to me, and by looking at the code I think it might have something to do with ZLE setup, which atm has another issue.

My OS is Ubuntu 14.04 - I can post any more information as necessary, I'm just unsure how to debug the issue. This issue is not present when running on another Ubuntu-based install (Elementary OS Loki)

Do they run the same zsh version? Which one?

PS, I've confirmed that it is actually the theme that is causing the issue; commenting it out (and using robbyrussell, for example) makes zsh run just fine.

Out of curiosity, did you try disabling all your bundles except for minimal?

@NellyWhads
Copy link
Author

NellyWhads commented Jan 29, 2018

Do they run the same zsh version? Which one?

The machine with the issue is running 5.0.2 (installed from apt)
The non-issue machine will have to be checked tonight.

Out of curiosity, did you try disabling all your bundles except for minimal?

Yep - that's how I came to the conclusion that it was the theme causeing the errors to be thrown.

@NellyWhads
Copy link
Author

The zsh version with which there is no error is 5.1.1

@subnixr
Copy link
Owner

subnixr commented Mar 16, 2018

I have fixed the mentioned issue. Can you please update minimal and reconfirm the bug you encountered? Thanks

@trofimovilya
Copy link

Trying to plug in using source got the same problem

_mnml_bind_widgets:3: unknown file attribute: z
local:3: maximum nested function level reached
local:3: maximum nested function level reached

ZSH: zsh 5.4.2 (x86_64-apple-darwin15.6.0)

@subnixr
Copy link
Owner

subnixr commented Mar 18, 2018

_mnml_bind_widgets:3: unknown file attribute: z

This is odd, by looking at the line I can't understand what kind of error it is. I'm also running the same version of zsh (zsh 5.4.2 (x86_64-unknown-linux-gnu)).

Also, is the error shown when minimal is the only thing sourced? (you can prevent sourcing of configuration files by executing zsh -df)

@trofimovilya
Copy link

Indeed running zsh -d, zsh -f or zsh -df before sourcing solves the problem. But my own ~/.zshrc and ~/.zprofile are empty files and I can't figure out what makes the conflict with minimal.

@subnixr
Copy link
Owner

subnixr commented Mar 18, 2018

There are other files sourced as well, this flowchart explains it well. try take a look into those files and follow sourced files as well.

@trofimovilya
Copy link

I've cleared these config files:

~/.zprofile
~/.zshrc
~/.zshenv
~/.zlogin
~/.zlogout
/etc/zshenv

In /etc/zshrc I have only this:

# Correctly display UTF-8 with combining characters.
if [ "$TERM_PROGRAM" = "Apple_Terminal" ]; then
	setopt combiningchars
fi

In /etc/zprofile I have only this:

# system-wide environment settings for zsh(1)
if [ -x /usr/libexec/path_helper ]; then
	eval `/usr/libexec/path_helper -s`
fi

Still no luck, but I've figured out that -f or -d options are not necessary, I can just run zsh and after that source minimal.zsh and that gets rid off the error.

@trofimovilya
Copy link

I've come up with a kind of a solution by adding zsh command at the end of ~/.zprofile and sourcing minimal in ~/.zshrc. Thanks for your help and project.

@NellyWhads
Copy link
Author

@trofimovilya can you check if there is a solution while using antigen? I'm getting the same error you menitoned. I'm trying to avoid cloning the repo and sourcing it manually (by using antigen's built in functionality instead)

Thanks!

@hissssst
Copy link

hissssst commented Jan 29, 2022

I don't know if I have the same issue but I have something like this:

Problem description

Prompt plugin works with some errors when with zsh-vi-mode

Reproduction steps

I've got it down to minimal config able to reproduce this

source <(antibody init)

antibody bundle subnixr/minimal
antibody bundle jeffreytse/zsh-vi-mode

Just open a shell with this config and call any command (like ls) and see something like

_mnml_zle-line-init:11: maximum nested function level reached; increase FUNCNEST?
mnml_ssh:1: maximum nested function level reached; increase FUNCNEST?
mnml_pyenv:1: maximum nested function level reached; increase FUNCNEST?
mnml_status:1: maximum nested function level reached; increase FUNCNEST?
mnml_keymap:1: maximum nested function level reached; increase FUNCNEST?
mnml_cwd:1: maximum nested function level reached; increase FUNCNEST?

@subnixr
Copy link
Owner

subnixr commented Jan 30, 2022

Thanks for reporting the issue. It's been a long time since I last used antigen or any other zsh plugin manager, I'm out of the loop.

I need you to try these:

  • (control) source only minimal manually (without antibody or any other plugin manager) and check if the error still occurs.
  • source both plugins manually and check if the error still occurs
  • source only minimal with antibody and check if the error still occurs

I have the feeling it has something to do with #12 (comment) and probably antigen/antibody is doing something behind the curtains. I should check both codebases, but I'm a bit short on time

@hissssst
Copy link

hissssst commented Feb 2, 2022

@subnixr I've reproduced this error only when sourcing both plugins. Just antibody with minimal works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants