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

panic: Any { .. } when including deps files on a Makefile #150

Closed
Sigmanificient opened this issue Dec 15, 2023 · 9 comments · Fixed by #154
Closed

panic: Any { .. } when including deps files on a Makefile #150

Sigmanificient opened this issue Dec 15, 2023 · 9 comments · Fixed by #154
Labels
bug Something isn't working

Comments

@Sigmanificient
Copy link
Contributor

Not sure how to help with this issue but running fzf-make causes a panic:

nix run github:kyu08/fzf-make
panic: Any { .. }
@kyu08
Copy link
Owner

kyu08 commented Dec 15, 2023

@Sigmanificient
Thank you for your report!
I have some questions.

  1. This occurs every time you launch fzf-make or only sometimes?
  2. What is the version you use?
  3. Does fzf-make --version work fine?

@kyu08 kyu08 added the bug Something isn't working label Dec 15, 2023
@Sigmanificient
Copy link
Contributor Author

Sigmanificient commented Dec 15, 2023

Hi, here is some details that might help you:

Asking for version & help works fine

fzf-make --version
v0.11.0

Running on a directory without Makefile opens an empty GUI
image
and quitting it causes panic: Any { .. }

Running with RUST_BACKTRACE=1 does not provide further information.

Running on a directory with a Makefile causes instant crash.
It seems to work when using this dummy Makefile:

a:
     echo "test"
.PHONY: a

image

Although still panicking on exit.

Here is my project Makefile:
https://gist.github.com/Sigmanificient/a7e54f6152ece75430a8f8846b06d9d6

@Sigmanificient Sigmanificient changed the title Newer version cause a panic panic: Any { .. } on non-trivial Makefile? Dec 15, 2023
@Sigmanificient
Copy link
Contributor Author

Sigmanificient commented Dec 15, 2023

It seems that removing the 2 last lines make it works again

-include $(DEP)
-include $(DEP_DEBUG)

These lines correspond to headers dependencies defined above:

DEP := $(OBJ:.o=.d)
DEP_DEBUG := $(OBJ_DEBUG:.o=.d)

Here is an example of a .d file:

.build/release/config_loader.o: config_loader.c quell/ql_base.h \
 quell/ql_debug.h quell/ql_base.h quell/ql_string.h simulation.h
quell/ql_base.h:
quell/ql_debug.h:
quell/ql_base.h:
quell/ql_string.h:
simulation.h:

Their purposes are to watch for a header change to recompile the C file that uses the modified header

@Sigmanificient Sigmanificient changed the title panic: Any { .. } on non-trivial Makefile? panic: Any { .. } when including deps files on a Makefile Dec 15, 2023
@kyu08
Copy link
Owner

kyu08 commented Dec 15, 2023

Ahh! I see!
Now, fzf-make can not interpret include file path that includes variable like -include $(DEP).

I will fix this problem. Thank you for your input and take time for this!

@Sigmanificient
Copy link
Contributor Author

Ahh! I see! Now, fzf-make can not interpret include file path that includes variable like -include $(DEP).

I will fix this problem. Thank you for your input and take time for this!

Those files might not exist before the run by the user, as for the - before the include keyword.
In the previous scenario, they existed but beware to consider this too.

@kyu08
Copy link
Owner

kyu08 commented Dec 15, 2023

As a short time measure, I'll fix this to ignore a makefile that can not be found and include-directive with variable.
After that, I will think what is better solution.

@Sigmanificient
Copy link
Contributor Author

If you want to challenge yourself, feel free to check out the Makefile featured in this project.

It imports a list of sub-makefiles from a variable with make preprocessor and eval along a global helper makefile,
but use a condition to exclude the global helper makefile to import in sub-makefiles

@Sigmanificient
Copy link
Contributor Author

0.11.0 -> 0.12.0

@kyu08
Copy link
Owner

kyu08 commented Dec 17, 2023

Thanks!

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

Successfully merging a pull request may close this issue.

2 participants