antigen icon indicating copy to clipboard operation
antigen copied to clipboard

cache zcompile error

Open TheZoc opened this issue 7 years ago • 17 comments

Hello,

I just installed antigen (using a git clone) and, every time I modify my .zshrc (located in /home/zoc/.zsh/.zshrc - I use ZDOTDIR to add a .zsh directory in there) and restart the shell, I get the error:

-antigen-cache-generate:zcompile:65: can't open file: /home/zoc/.zshrc

Is this a real bug or am I doing something wrong?

Thank you very much in advance!

TheZoc avatar Dec 23 '17 21:12 TheZoc

It's probably a bug, let me look into it.

desyncr avatar Dec 23 '17 21:12 desyncr

The issue is back on a fresh OSX 10.13.2 install with homebrew on zsh 5.4.2 and antigen 2.2.3

-antigen-cache-generate:zcompile:65: can't open file: zsh

devalnor avatar Jan 14 '18 14:01 devalnor

I'll look at the issue. What's your antigen config?

desyncr avatar Jan 14 '18 14:01 desyncr

# Load source from Homebrew Install
source /usr/local/share/antigen/antigen.zsh

# Load the oh-my-zsh's library
antigen use oh-my-zsh

antigen bundle <<EOBUNDLES
    # Bundles from the default repo (robbyrussell's oh-my-zsh)
    # git

    # Syntax highlighting bundle.
    zsh-users/zsh-syntax-highlighting

    # Fish-like auto suggestions
    zsh-users/zsh-autosuggestions

    # Extra zsh completions
    zsh-users/zsh-completions

EOBUNDLES

# Load the theme
antigen theme robbyrussell

# Tell antigen that you're done
antigen apply

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

devalnor avatar Jan 15 '18 16:01 devalnor

Thanks gonna take a look at this!

desyncr avatar Jan 15 '18 16:01 desyncr

Another quick question. Is that file .zshrc or some other sourced file?

desyncr avatar Jan 15 '18 16:01 desyncr

Yes it's the complete .zshrc no other files.

devalnor avatar Jan 15 '18 16:01 devalnor

Tried on a clean install (zsh 5.4.2, antigen 2.2.3) but it seems I can't reproduce it. Tries both OSX and debian.

root@7d07be6e5a4b:~# ls -ltra
total 40
-rw-r--r-- 1 root root  140 Nov 19  2007 .profile
-rw-r--r-- 1 root root  570 Jan 31  2010 .bashrc
-rw-r--r-- 1 root root   44 Dec  2 04:11 .gitconfig
drwxr-xr-x 1 root root 4096 Dec  2 04:11 .ssh
drwxr-xr-x 1 root root 4096 Jan 15 16:16 ..
-rw-r--r-- 1 root root  687 Jan 15 16:21 .zshrc
-r--r--r-- 1 root root 1640 Jan 15 16:21 .zshrc.zwc
drwxr-xr-x 3 root root 4096 Jan 15 16:21 .antigen
-rw------- 1 root root  341 Jan 15 16:22 .zsh_history
drwx------ 1 root root 4096 Jan 15 16:22 .
root@7d07be6e5a4b:~# zsh
➜  ~ pwd
/root
➜  ~ zsh --version
zsh 5.4.2 (x86_64-unknown-linux-gnu)
➜  ~ antigen version
Antigen v2.2.3 (ff391b5)
Revision date: 2018-01-02 13:19:57 +0100

desyncr avatar Jan 15 '18 16:01 desyncr

You may set ANTIGEN_AUTO_CONFIG to false to avoid this behavior.

desyncr avatar Jan 15 '18 16:01 desyncr

I had this same issue. Removing the *.zwc files in the antigen directory ($ADOTDIR) solved it. Antigen will respect $ZDOTDIR, but make sure that it is set in ~/.zshenv before running antigen for the firts time so that antigen picks it up.

mattmc3 avatar Jun 19 '19 20:06 mattmc3

I had this same issue. Removing the *.zwc files in the antigen directory (ADOTDIR)solvedit.AntigenwillrespectZDOTDIR, but make sure that it is set in ~/.zshenv before running antigen for the firts time so that antigen picks it up.

Seems there are two zwc files in my home directory, called .zshrc.zwc and .antigen.zwc, so I removed both of them and problem solved. Thanks for the tips!

willzhqiang avatar Apr 17 '20 06:04 willzhqiang

Is there any progress? I am getting the same error. Here is my ~/.zshenv.

# Export ZDOTDIR
export ZDOTDIR="$HOME/.config/zsh"

# Manualy source .zshenv
source "$ZDOTDIR/.zshenv"

uhlajs avatar Jul 24 '20 14:07 uhlajs

You said 'Here is my ~/.zshenv'. What about your ~/.config/zsh/.zshenv ? And your .zshrc ? How are you loading antigen?

sparcbr avatar Aug 02 '20 03:08 sparcbr

@desyncr ~~There is pretty old version of antigen.zsh file cached on github FR mirror that might cause this and maybe other bugs. Check string "~/.zshrc" in attached antigenzsh.cached.curl.log There is HTTP response header x-served-by: cache-fra19128-FRA~~

Wrong. There is difference between develop and master branch in that file.

IvanGrund avatar Nov 21 '21 08:11 IvanGrund

https://github.com/zsh-users/antigen/issues/632#issuecomment-503733519 works for me when I encountered this after moving ~/.zshrc into ~/.zshrcd/ and configuring ~/.zshenv and $ZDOTDIR appropriately

adamancini avatar Nov 23 '22 21:11 adamancini

Also encountering this issue. Version: Antigen v2.2.2 (6bd497f) Zsh version: zsh 5.8 (x86_64-ubuntu-linux-gnu)

wosym avatar Jan 31 '23 10:01 wosym

Encountering this issue with antigen.zsh from master, but not with v2.2.3.

shvchk avatar Feb 10 '23 21:02 shvchk