zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
2.73k stars 122 forks source link

[bug]: multiple issues with new `make` ice #639

Open Gerrit-K opened 4 months ago

Gerrit-K commented 4 months ago

What happened?

PR #613 broke my setup with tj/git-extras (and it might apply to other setups, too).

Here's what I observed:

  1. Since git-extras default target is install already, zinit will effectively install it twice: once via make and once via make install. There seems to be no check for that and I didn't find a way to skip make and only run make install.
  2. The check for PREFIX = here doesn't account for the other forms of variable assignments. Because git-extras uses the form PREFIX ?= it is not picked up by zinit when running make, not even if the ice is specified as above. This leads to the first call to make not receiving the prefix (even though it's explicitly specified at the ice), resulting in an error.
  3. As mentioned at the end of the last point, the ice modifier PREFIX=$ZPFX is not added to the first build step.

Steps to reproduce

zinit lucid for make"PREFIX=$ZPFX" tj/git-extras

Relevant output

==> Downloading tj/git-extras
Cloning into '/Users/user/.zinit/plugins/tj---git-extras'...
⠼ ███████████ OBJ: 100, PACK: 7765/7765, COMPR: 100%, REC: 100%, RES: 100%
[debug] tj---git-extras: No Cmake files found in /Users/user/.zinit/plugins/tj---git-extras
[debug] make: setting quiet mode
==> make: Building...
[debug] make: eval make -C /Users/user/.zinit/plugins/tj---git-extras --jobs 4 prefix=/Users/user/.zinit/polaris 2>/dev/null 1>&2
Warning: make: Build returned 2
==> make: Installing in ~zpfx
[debug] make: eval make -C /Users/user/.zinit/plugins/tj---git-extras --jobs 4 prefix=/Users/user/.zinit/polaris PREFIX=/Users/user/.zinit/polaris 2>/dev/null 1>&2

Screenshots and recordings

No response

Operating System & Version

OS: darwin22.1.0 | Vendor: apple | Machine: arm | CPU: arm64 | Processor: arm | Hardware: arm64

Zsh version

zsh 5.9 (arm-apple-darwin22.1.0)

Terminal emulator

iTerm2 with screen-256color

If using WSL on Windows, which version of WSL

None

Additional context

No response

Code of Conduct