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

No files for compliation found #4

Open
HeroCC opened this issue Dec 8, 2023 · 2 comments
Open

No files for compliation found #4

HeroCC opened this issue Dec 8, 2023 · 2 comments

Comments

@HeroCC
Copy link

HeroCC commented Dec 8, 2023

# before
zinit lucid wait has'pyenv-virtualenv-init' atclone'pyenv virtualenv-init - > pyenv-venv.zsh' atpull'%atclone' pick'pyenv-venv.zsh' nocompile'!' id-as'pyenv-venv2' for @zdharma-continuum/null

Downloading zdharma-continuum/null… (at label: pyenv-venv2…)
Cloning into '$HOME/.local/share/zinit/plugins/pyenv-venv2'...
==> Compiling pyenv-venv.zsh [OK]

# after 
zinit lucid wait has'pyenv-virtualenv-init' eval'pyenv virtualenv-init -' id-as'pyenv-venv1' for @zdharma-continuum/null

Downloading zdharma-continuum/null… (at label: pyenv-venv1…)
Cloning into '$HOME/.local/share/zinit/plugins/pyenv-venv1'...
==> No files for compilation found
Warning: ∞zinit-compile-plugin-hook hook returned with 1
[eval] Caching output of (`pyenv virtualenv-init -…')

I notice the "No files for compilation found" warning when using the eval ice. However, the zwc file does exist:

ls $HOME/.local/share/zinit/plugins/pyenv-venv1
LICENSE.md  evalcache.zsh  evalcache.zsh.zwc  readme.md

Is there a way to make sure zinit loaded the complied version? Is this error benign / can it be fixed?

@NICHOLAS85
Copy link
Owner

Zinit by default attempts to compile a plugin before the atclone ice runs. In your original command, you used the ice nocompile'!', which forces compilation to occur after your atclone ice.

When using zdharma-continuum/null, Zinit throws that error by default due to no files being available to compile, this may be a bug/feature introduced at some point as I believe Zinit used to not throw this error when using zdharma-continuum/null

The cache generation in z-a-eval runs during the atclone process of loading a plugin and thus when used with zdharma-continuum/null Zinit attempts to compile the plugin before z-a-eval creates the cache. To avoid this error message for now, you can add nocompile'!' as you used in your first example.

zinit lucid wait has'pyenv-virtualenv-init' eval'pyenv virtualenv-init -' nocompile'!' id-as'pyenv-venv1' for @zdharma-continuum/null

Regardless the message is harmless as the cache is still being sourced during a plugin load and Zsh always uses the compiled version when it is available. I'll do some research to see if there is anything I can do about the error but the above should solve your problem if you care about hiding that error message.

@HeroCC
Copy link
Author

HeroCC commented Dec 17, 2023

Great, thank you! I'll leave the ticket open for your investigation, but your workaround worked successfully.

HeroCC added a commit to HeroCC/dotfiles that referenced this issue Dec 21, 2023
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

2 participants