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

regression: passing {} to a task casuses error (API) #309

Closed
Zeioth opened this issue Jun 6, 2024 · 2 comments
Closed

regression: passing {} to a task casuses error (API) #309

Zeioth opened this issue Jun 6, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Zeioth
Copy link

Zeioth commented Jun 6, 2024

Neovim version (nvim -v)

0.10.0

Operating system/version

Arch Linux

Describe the bug

  • Passing empty list to a task now causes an error. This is a regression.

What is the severity of this bug?

breaking (some functionality is broken)

Steps To Reproduce

Run the next snippet

local overseer = require("overseer")
local tasks = {}

task = overseer.new_task({
  name = "testing regression", strategy = { "orchestrator",
    tasks = {
      tasks,
    }}})
task:start()

You will get the next error
screenshot_2024-06-06_12-52-41_034358831

Expected Behavior

  • The old (desired) behavior is to just ignore the empty task without errors.

Minimal example file

No response

Minimal init.lua

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  { "stevearc/dressing.nvim", config = true },
  {
    "stevearc/overseer.nvim",
    config = function()
      require("overseer").setup({
        -- add your overseer config here
      })
    end,
  },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

local overseer = require("overseer")
local tasks = {}

task = overseer.new_task({
  name = "testing regression", strategy = { "orchestrator",
    tasks = {
      tasks,
    }}})
task:start()

Additional context

  • Tested on the latest overseer commit: a6dc060
  • This regression has been introduced in recent versions.
@Zeioth Zeioth added the bug Something isn't working label Jun 6, 2024
@Zeioth Zeioth changed the title regression: passing {} to a task casuses error regression: passing {} to a task casuses error Jun 6, 2024
@Zeioth Zeioth changed the title regression: passing {} to a task casuses error regression: passing {} to a task casuses error (API) Jun 6, 2024
@stevearc
Copy link
Owner

stevearc commented Jun 6, 2024

Should be fixed now

@Zeioth
Copy link
Author

Zeioth commented Jun 7, 2024

Tested and fixed indeed!

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

2 participants