-
Notifications
You must be signed in to change notification settings - Fork 59
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: Targets from included Makefile only visible on first execution #280
Comments
Hey! having the exact same problem, when i run a target from a Makefile they all disappear and have to close and open the project again. Bumping for visibility :D |
I tried the repro that you suggested, but it seems to be working fine for me. Could you create a tiny repo with the Makefiles required to see this issue? Also double check that it happens with the minimal repro.lua file you provided (the current one is missing the The only thing I can think of that this could be related to is caching. You could try disabling caching with require("overseer").setup({
template_cache_threshold = 0,
}) |
Thank you @stevearc for getting back to me on this, I really want to start using this plugin, it looks amazing. Here is a small repository containing information about how to reproduce the issue and test it. Hopefully it's enough, let me know if there is anything else that you need. Edit: I tried setting the Thanks ⭐ |
We also have a function that uses treesitter to parse the Makefile and get the list of tasks from that, but it doesn't handle the `include` command mentioned in the issue. The weird flakiness was because on the first run the pcall to get the parser failed somewhere in _memoize (which seems like a Neovim bug), so we would fall back to parsing the output of `make` and actually produce the correct result. On subsequent runs, the parser would be fetched correctly and so the results would be missing the included tasks. The only advantage of the treesitter method is that it's faster, but parsing the output of `make` is fast enough, and it's better to be correct. We can just get rid of the treesitter logic entirely and always rely on parsing the output of `make`.
Thanks for the repro repo! It was very helpful; I was able to find the issue right away. Should be fixed now! |
Thank you! Can confirm that it's been resolved. 🎉 |
Neovim version (nvim -v)
0.9.5
Operating system/version
MacOS 14.4
Describe the bug
When including an external Makefile, the targets are only found by overseer once.
When opening neovim and running
:OverseerRun
I can see that all of my expected targets are there, also if I run:OverseerInfo
the number of tasks are correct.However, if I close this window and run either of the commands above again, the targets in the included Makefile is not found.
Restarting Neovim will fix it temporarily, but then again only once. See the Steps to Reproduce for more information.
What is the severity of this bug?
breaking (some functionality is broken)
Steps To Reproduce
shared/test
, it doesn't matter what it does.include ./<subdirectory-where-you-stored-shared-makefile>/Makefile
main/test
:OverseerInfo
or:OverseerRun
and you will see two different make targets available.Esc
(orq
if info screen).:OverseerInfo
or:OverseerRun
again and only the target from the Main Makefile is visible in theTask template
list (or only 1/1 task available on the overseer info screen).Expected Behavior
That the targets from the shared Makefile is available more than once per session.
Minimal example file
Examples
Main Makefile:
Shared Makefile:
Minimal init.lua
Additional context
No response
The text was updated successfully, but these errors were encountered: