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

bug: Running a custom template in very large repo freezes neovim #360

Open
dbatten5 opened this issue Sep 26, 2024 · 0 comments
Open

bug: Running a custom template in very large repo freezes neovim #360

dbatten5 opened this issue Sep 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dbatten5
Copy link

dbatten5 commented Sep 26, 2024

Neovim version (nvim -v)

NVIM v0.10.0

Operating system/version

MacOS 14.6.1

Describe the bug

Apologies for the vagueness but I'm not really sure how to pinpoint this issue.
I'm also not 100% this is an issue with overseer as it only happens periodically
but it does seem to happen only after I run an overseer task.

I work in a very large monorepo at work. I have some custom overseer templates
that I run, e.g. the following

    overseer.register_template({
      name = "Mypy",
      builder = function()
        local file = vim.fn.expand("%")
        local cmd = { "mypy", file }
        return {
          cmd = cmd,
          components = {
            "open_output",
            "base",
          },
        }
      end,
      priority = 10,
      condition = {
        filetype = "python",
      },
    })

where base is

      component_aliases = {
        base = {
          {
            "on_output_quickfix",
            open_on_exit = "failure",
          },
          "on_result_diagnostics_trouble",
          "default",
        },
      },

Often when I run this command and others like it, when the command
finishes my neovim process freezes up and I end up having to kill
the process. I can see that nvim is taking up ~99% CPU before I kill it.
Is overseer doing any scanning of files? I have a similar issue with
neotest and I think it's because after running a test it scans through
every file in the repo.

I've added extra logging and can't see anything untowards in the logs:

[DEBUG] Starting task mypy /path/to/file.py
[DEBUG] Task mypy /path/to/file.py exited with code 0
[DEBUG] task(1)[on_complete_dispose] complete, waiting for output view
[DEBUG] VimLeavePre clean up terminal tasks {}

Full config here:

    overseer.setup({
      templates = {},
      task_list = {
        bindings = {
          ["<C-k>"] = false,
          ["<C-j>"] = false,
          ["<up>"] = "ScrollOutputUp",
          ["<down>"] = "ScrollOutputDown",
        },
      },
      component_aliases = {
        base = {
          {
            "on_output_quickfix",
            open_on_exit = "failure",
          },
          "on_result_diagnostics_trouble",
          "default",
        },
      },
      log = {
        {
          type = "echo",
          level = vim.log.levels.WARN,
        },
        {
          type = "file",
          filename = "overseer.log",
          level = vim.log.levels.DEBUG,
        },
      },
    })

What is the severity of this bug?

blocking (cannot use plugin)

Steps To Reproduce

Run a custom template on a very large repo

Expected Behavior

Neovim shouldn't freeze after running the template.

@dbatten5 dbatten5 added the bug Something isn't working label Sep 26, 2024
@dbatten5 dbatten5 changed the title bug: Running a customer template in very large repo freezes neovim bug: Running a custom template in very large repo freezes neovim Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant