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

cache zcompile error #632

Open
TheZoc opened this issue Dec 23, 2017 · 17 comments
Open

cache zcompile error #632

TheZoc opened this issue Dec 23, 2017 · 17 comments
Assignees

Comments

@TheZoc
Copy link

TheZoc commented Dec 23, 2017

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!

@desyncr desyncr added the Bug label Dec 23, 2017
@desyncr desyncr self-assigned this Dec 23, 2017
@desyncr
Copy link
Member

desyncr commented Dec 23, 2017

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

@devalnor
Copy link

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

@desyncr
Copy link
Member

desyncr commented Jan 14, 2018

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

@desyncr desyncr reopened this Jan 14, 2018
@devalnor
Copy link

# 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

@desyncr
Copy link
Member

desyncr commented Jan 15, 2018

Thanks gonna take a look at this!

@desyncr
Copy link
Member

desyncr commented Jan 15, 2018

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

@devalnor
Copy link

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

@desyncr
Copy link
Member

desyncr commented Jan 15, 2018

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
Copy link
Member

desyncr commented Jan 15, 2018

You may set ANTIGEN_AUTO_CONFIG to false to avoid this behavior.

@mattmc3
Copy link

mattmc3 commented Jun 19, 2019

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.

@willzhqiang
Copy link

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!

@uhlajs
Copy link

uhlajs commented Jul 24, 2020

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"

@sparcbr
Copy link

sparcbr commented Aug 2, 2020

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

@IvanGrund
Copy link

IvanGrund commented Nov 21, 2021

@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.

@adamancini
Copy link

#632 (comment) works for me when I encountered this after moving ~/.zshrc into ~/.zshrcd/ and configuring ~/.zshenv and $ZDOTDIR appropriately

@wosym
Copy link

wosym commented Jan 31, 2023

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

@shvchk
Copy link

shvchk commented Feb 10, 2023

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

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

No branches or pull requests