folke / lazy.nvim

💤 A modern plugin manager for Neovim
https://lazy.folke.io/
Apache License 2.0
14.77k stars 359 forks source link

bug: `hererocks` build step should use `vim.g.python3_host_prog` if set #1769

Open lsvmello opened 1 month ago

lsvmello commented 1 month ago

Did you check docs and existing issues?

Neovim version (nvim -v)

v0.10.1

Operating system/version

Windows 11

Describe the bug

The build step of hererocks use vim.fn.executable to find python, and this causes conflicts on Windows that have chocolatey installed, because chocolatey ships a python executable.

https://github.com/folke/lazy.nvim/blob/1159bdccd8910a0fd0914b24d6c3d186689023d9/lua/lazy/pkg/rockspec.lua#L36-L38

To fix this issue Neovim introduced g:python3_host_prog

Steps To Reproduce

  1. Windows machine with python and chocolatey installed
  2. Install rest-nvim/rest.nvim with hererocks enabled (as on repro below)

Expected Behavior

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    { "rest-nvim/rest.nvim" },
  },
  rocks = {
    enabled = true,
    hererocks = true,
  },
})
github-actions[bot] commented 4 days ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.