Shatur / neovim-tasks

A statefull task manager focused on integration with build systems.
GNU General Public License v3.0
108 stars 10 forks source link

fix: don't try to encode dap_open_command in JSON #21

Closed judemille closed 10 months ago

judemille commented 10 months ago

dap_open_command is a function, and Neovim gets very angry when asked to encode a function in JSON. I don't know if it silently allowed this before or what, but it's causing issues for me.

This just temporarily stores it, clears it in the project config while encoding, and then puts it back. Simple enough.

Shatur commented 10 months ago

dap_open_command is a function, and Neovim gets very angry when asked

How can I reproduce it?

judemille commented 10 months ago

How can I reproduce it?

Open a new project. Try to change a project setting (e.g. CMake args). This will cause the error in my environment.

Specificities: Up to date Arch Linux, LunarVim.

Shatur commented 10 months ago

Can't reproduce also on Arch. What Neovim version are you using?

judemille commented 10 months ago
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1702233742
Shatur commented 10 months ago

Same... I guess it depends on the dap config? There is a recent issue about it, maybe we should reconsider how dap should be integrated? https://github.com/Shatur/neovim-tasks/issues/22

judemille commented 10 months ago

I use the default function for DAP integration in this plugin, so I don't know why anything special would occur. Regardless, we shouldn't be encoding a function in JSON.

As for reconsidering DAP integration: That may well be a good idea.

judemille commented 10 months ago

In the meantime, can this be merged?