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

Errors / Warnings on First ZSH Launch #56

Closed
SeanOBoyle opened this Issue Jul 4, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@SeanOBoyle

SeanOBoyle commented Jul 4, 2018

A handful of zplugin calls that I took straight from the example show errors / warnings on the first launch of zsh. I don't see anything wrong on subsequent runs. Not sure if the compile errors indicate a possible performance issue or should just be ignored.

Using:
zplugin ice pick"async.zsh" src"pure.zsh"; zplugin light sindresorhus/pure
Results in the following on first run of zsh:

Cloning into '/home/sean/.zplugin/plugins/sindresorhus---pure'...
OBJ: 796, PACKED: 790/796, COMPRESS: 100%, RECEIVING: 100%          
Compiling async.zsh...
-zplg-compile-plugin:zcompile:30: can't open file: async.zsh
Compilation failed. Don't worry, the plugin will work also without compilation
Consider submitting an error report to Zplugin or to the plugin's author

Using:

zplugin ice wait"0" as"program" pick"bin/git-dsf"
zplugin light zdharma/zsh-diff-so-fancy

Results in the following on first run of zsh:

Compiling git-dsf...
-zplg-compile-plugin:zcompile:30: can't open file: git-dsf
Compilation failed. Don't worry, the plugin will work also without compilation

Using:

zplugin ice as"program" pick"$ZPFX/bin/git-*" make"PREFIX=$ZPFX" wait"0"
zplugin light tj/git-extras

Results in the following on first run of zsh:

Cloning into '/home/sean/.zplugin/plugins/tj---git-extras'...
OBJ: 5459, PACKED: 5413/5459, COMPRESS: 100%, RECEIVING: 100%          
No files for compilation found (pick-ice didn't match)
@robobenklein

This comment has been minimized.

Show comment
Hide comment
@robobenklein

robobenklein Jul 10, 2018

For git-dsf I think that's intended behaviour. (There's nothing compile-compatible, but there's no harm in trying.)

As for missing out on async.zsh, I think I have a similar problem with my call:

  zplugin ice from"gh" pick"lib/git.zsh" nocompletions blockf \
    atload'!local f; for f in ${_ZSHRC_OMZ_LIBS}; do source lib/$f; done' \
    compile"lib/(${(j.|.)_ZSHRC_OMZ_LIBS})"
  zplugin load robbyrussell/oh-my-zsh

In which it fails to find git.zsh when it should look for lib/git.zsh I believe.

Downloading robbyrussell/oh-my-zsh...

Cloning into '/home/robo/.zplugin/plugins/robbyrussell---oh-my-zsh'...
OBJ: 18668, PACKED: 18660/18668, COMPRESS: 100%, RECEIVING: 100%          
Compiling git.zsh...
-zplg-compile-plugin:zcompile:30: can't open file: git.zsh

robobenklein commented Jul 10, 2018

For git-dsf I think that's intended behaviour. (There's nothing compile-compatible, but there's no harm in trying.)

As for missing out on async.zsh, I think I have a similar problem with my call:

  zplugin ice from"gh" pick"lib/git.zsh" nocompletions blockf \
    atload'!local f; for f in ${_ZSHRC_OMZ_LIBS}; do source lib/$f; done' \
    compile"lib/(${(j.|.)_ZSHRC_OMZ_LIBS})"
  zplugin load robbyrussell/oh-my-zsh

In which it fails to find git.zsh when it should look for lib/git.zsh I believe.

Downloading robbyrussell/oh-my-zsh...

Cloning into '/home/robo/.zplugin/plugins/robbyrussell---oh-my-zsh'...
OBJ: 18668, PACKED: 18660/18668, COMPRESS: 100%, RECEIVING: 100%          
Compiling git.zsh...
-zplg-compile-plugin:zcompile:30: can't open file: git.zsh
@psprint

This comment has been minimized.

Show comment
Hide comment
@psprint

psprint Jul 10, 2018

Collaborator

Thanks, there was a bug in -zplg-compile-plugin, it didn't use absolute path where it should.

I tested the plugins and software packages you enumerated in initial post.

  1. sindresorhus/pure

Fixed but funny I now cannot recall why (weird;). Apparently 73f9e24 is needed also when pick-target-file isn't in subdirectory.

  1. zdharma/zsh-diff-so-fancy

Fixed by the 73f9e24 "missing target's path" patch. Of course, this compiles a /bin/sh script, so it lacks real meaning.

  1. tj/git-extras

Fixed by d9b549e and two things it allows: 1) absolute-path pick''pick"$ZPFX/..." is a pattern that uses absolute-path via $ZPFX. 2) New ice nocompile'', which in general blocks compilation of pick''-pointed files, however when passed exclamation mark (i.e. nocompile'!'), then only defers the compilation to be run after make. This way it's possible to first install files by make'', and then compile them at location where they are installed:

zplugin ice as"program" pick"$ZPFX/bin/git-*" make"PREFIX=$ZPFX" nocompile'!'
zplugin light tj/git-extras

In general it's fairly main change that I've added nocompile'' ice, it is needed for tj/git-extras and other non-Zsh things. One thing, you would probably want that Zplugin compiles all pick''-matching files, not only the first one?

Collaborator

psprint commented Jul 10, 2018

Thanks, there was a bug in -zplg-compile-plugin, it didn't use absolute path where it should.

I tested the plugins and software packages you enumerated in initial post.

  1. sindresorhus/pure

Fixed but funny I now cannot recall why (weird;). Apparently 73f9e24 is needed also when pick-target-file isn't in subdirectory.

  1. zdharma/zsh-diff-so-fancy

Fixed by the 73f9e24 "missing target's path" patch. Of course, this compiles a /bin/sh script, so it lacks real meaning.

  1. tj/git-extras

Fixed by d9b549e and two things it allows: 1) absolute-path pick''pick"$ZPFX/..." is a pattern that uses absolute-path via $ZPFX. 2) New ice nocompile'', which in general blocks compilation of pick''-pointed files, however when passed exclamation mark (i.e. nocompile'!'), then only defers the compilation to be run after make. This way it's possible to first install files by make'', and then compile them at location where they are installed:

zplugin ice as"program" pick"$ZPFX/bin/git-*" make"PREFIX=$ZPFX" nocompile'!'
zplugin light tj/git-extras

In general it's fairly main change that I've added nocompile'' ice, it is needed for tj/git-extras and other non-Zsh things. One thing, you would probably want that Zplugin compiles all pick''-matching files, not only the first one?

@psprint psprint closed this Jul 28, 2018

psprint added a commit that referenced this issue Jul 28, 2018

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