-
Notifications
You must be signed in to change notification settings - Fork 11
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
require
fails when requiring a macro-utils file from other macro files with compilerEnv
as _G
#48
Comments
That error is from Fennel directly, seems that it behaves the same outside of Hotpot.
|
Interesting, I will do some more testing and open an issue on the Fennel repo. Thanks for you help! |
Opened the following issue on the Fennel repository: bakpakin/Fennel#406 |
bakpakin/Fennel#406 is fixed now 🎉 |
I'll hold this open for now until I can make sure its fixed inside Hotpot too, have to review how we handle macro searching to make sure we are using the new code. I think it should be fine but it's been a few months. We run a bit of custom stuff to makes sure macro files are tracked as a dependency for cache invalidation which requires a one-line patch to fennel.lua to test. |
I was looking to check another issue and I saw that this issue was still open. At the moment it has worked perfectly so I think this issue can be closed. |
The issue is that when the compiler macro option
compilerEnv
is set to_G
,and you want to
require
a module that uses macro-exclusive functions from themacro file, neovim displays the following error:
This could be the case if you want to share code between multiple macro files,
and therefore you create an utils module.
If you don't use that compiler macro option or you don't use an utils module
but have the code in the same macro file, everything works perfectly.
How to reproduce the issue
Note: you must have Docker installed on your computer.
Clone the following repository: datwaft/hotpot-issue_48
Execute the following terminal command:
After that execute neovim:
Expected result
Current result
The following error is displayed.
The text was updated successfully, but these errors were encountered: