packer.nvim icon indicating copy to clipboard operation
packer.nvim copied to clipboard

`nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'` doesn't work with max_jobs

Open gregorias opened this issue 3 years ago • 8 comments

  • nvim --version: v0.6.0
  • git --version: 2.34.1
  • Operating system/version: Manjaro
  • Terminal name/version: Kitty 0.23.1

Steps to reproduce

  1. Add config = { max_jobs=4, }, to the packer.setup call. The number of jobs should be less than the number of plugins configured. If max_jobs is greater, I can't reproduce this issue.
  2. Run nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'

Actual behaviour

The sync run hangs and doesn't finish.

Expected behaviour

Packer syncs and quits.

packer files

Plugin specification file(s)

Just adding the max_jobs setting should be enough to reproduce.

packer log file

It's empty.

packer compiled file

Just adding the max_jobs setting should be enough to reproduce.

gregorias avatar Dec 29 '21 20:12 gregorias

This happens for me even if I comment out my max_jobs configuration. With PackerCompile as well, not just PackerSync.

knpwrs avatar Jan 20 '22 15:01 knpwrs

can confirm i had the same issue with max jobs removing it made it work for me. 3d847fb

danielnehrig avatar May 02 '22 20:05 danielnehrig

also you can set ulimit -n 4096 in your shell cfg to make packer work with a lot of plugins if it gets stuck while PackerSync PackerInstall i'm saying this because im seeing a lot of people setting max_jobs because of that

danielnehrig avatar May 03 '22 23:05 danielnehrig

I'm experiencing this issue, but in my case it is happening the opposite. When I reached the number of 80 plugins packer got stuck. I am using lunarvim, and this was the original packer config:

{
    package_root = opts.package_root or join_paths(vim.fn.stdpath "data", "site", "pack"),
    compile_path = compile_path,
    snapshot_path = snapshot_path,
    log = { level = "warn" },
    git = { clone_timeout = 300 },
    display = {
      open_fn = function()
        return require("packer.util").float { border = "rounded" }
      end,
    },
  }

Then I just added max_jobs = 50, and now I can install my 114 plugins without problem. What is the default max_jobs value? What happens when it is not set?

danielo515 avatar Jul 06 '22 11:07 danielo515

I'm experiencing this issue, but in my case it is happening the opposite. When I reached the number of 80 plugins packer got stuck. I am using lunarvim, and this was the original packer config:

{
    package_root = opts.package_root or join_paths(vim.fn.stdpath "data", "site", "pack"),
    compile_path = compile_path,
    snapshot_path = snapshot_path,
    log = { level = "warn" },
    git = { clone_timeout = 300 },
    display = {
      open_fn = function()
        return require("packer.util").float { border = "rounded" }
      end,
    },
  }

Then I just added max_jobs = 50, and now I can install my 114 plugins without problem. What is the default max_jobs value? What happens when it is not set?

it does what it says if you set it it'll limit clones/pulls by x amount of jobs when its not set its unlimited

danielnehrig avatar Jul 06 '22 15:07 danielnehrig

That's very weird. Why would limiting the number of concurrent processes help with my freezing problem?

On Wed, Jul 6, 2022 at 5:03 PM Daniel Nehrig @.***> wrote:

I'm experiencing this issue, but in my case it is happening the opposite. When I reached the number of 80 plugins packer got stuck. I am using lunarvim, and this was the original packer config:

{ package_root = opts.package_root or join_paths(vim.fn.stdpath "data", "site", "pack"), compile_path = compile_path, snapshot_path = snapshot_path, log = { level = "warn" }, git = { clone_timeout = 300 }, display = { open_fn = function() return require("packer.util").float { border = "rounded" } end, }, }

Then I just added max_jobs = 50, and now I can install my 114 plugins without problem. What is the default max_jobs value? What happens when it is not set?

it does what it says if you set it it'll limit clones/pulls by x amount of jobs when its not set its unlimited

— Reply to this email directly, view it on GitHub https://github.com/wbthomason/packer.nvim/issues/751#issuecomment-1176334917, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARKJWOJ7D4ANDKHGE5ML2LVSWN53ANCNFSM5K6RXIQA . You are receiving this because you commented.Message ID: @.***>

--

https://danielorodriguez.com

danielo515 avatar Jul 06 '22 15:07 danielo515

because ulimit

danielnehrig avatar Jul 06 '22 16:07 danielnehrig

This happens for me even if I comment out my max_jobs configuration. With PackerCompile as well, not just PackerSync.

I have the same issue, remove the max_jobs makes headless mode works. But unfortunately, I have to set max_jobs = 10 makes packersync in TUI mode works. This is a contradiction.

milanglacier avatar Aug 07 '22 07:08 milanglacier