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

fix: replace tbl_flatten to flatten():totable() if using nvim-0.10 #131

Merged
merged 2 commits into from
May 23, 2024

Conversation

pablobfonseca
Copy link
Contributor

Keeps support for nvim < 0.10

@mochaaP
Copy link
Member

mochaaP commented May 21, 2024

Tests failed, please check.
https://github.com/nvimtools/none-ls.nvim/actions/runs/9166231657/job/25204751007?pr=131#step:5:470

@pablobfonseca
Copy link
Contributor Author

@mochaaP I've been trying to debug the tests, and this seems to be an issue only with the terraform_validate spec, here:

-- null-ls/builtins/diagnostics/terraform_validate.lua:64
rewritten_diagnostic.filename = u.path.join(params.cwd, new_diagnostic.range.filename)

params.cwd returns a dict-like table:

{
  [2] = "main.tf"
}

and vim.iter(...):flatten() only works with list-like tables
I've tried to use the terraform_validate manually and it seems to be working fine, could it be something specific for the terraform_validate spec?

@pablobfonseca
Copy link
Contributor Author

@mochaaP the tests are passing now, can we merge it?

@mochaaP
Copy link
Member

mochaaP commented May 23, 2024

Thanks!

@mochaaP mochaaP merged commit aa4442a into nvimtools:main May 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants