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

Improve macro file compilng #47

Open
Olical opened this issue Dec 9, 2024 · 0 comments
Open

Improve macro file compilng #47

Olical opened this issue Dec 9, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Olical
Copy link
Owner

Olical commented Dec 9, 2024

See #46 (comment) for more thoughts.

Right now if you write a macro file the whole project is recompiled. That should still be an option but we should also have a mode where we filter for files that mention this macro file by module name. It's so simple it's silly, but hopefully good enough for almost all cases.

Then if we have a chain of macro files depending on each other we'll need to recursively walk up until we find the real .fnl source files that depend on this macro dependency tree. We would also then need to be really careful not to introduce infinite cycles so we'd have to keep a table of "seen" files in order to not go around and around.

This could allow us (in most cases) to only compile the exact files required. Sometimes we would compile one or two others that mention the module in a comment but that's no big deal. Even if it cuts the compiling workload by 50%, that's a big win on large projects like Conjure!

@Olical Olical added the enhancement New feature or request label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant