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

build metadata without forcing full compilation #64

Open
mlwilkerson opened this issue Dec 5, 2023 · 2 comments
Open

build metadata without forcing full compilation #64

mlwilkerson opened this issue Dec 5, 2023 · 2 comments

Comments

@mlwilkerson
Copy link

When the NIF compilation takes an especially long time, I find myself wishing that my CI workflow didn't have to do a final mix compile --force prior to mix rustler_precompiled.download.

As far as I can tell, all that's actually necessary at that point for rustler_precompiled.download to do its job, writing the checksums file, is for the metadata to be built and written. Normally that's done by build_metadata/1 when compiling.

Actually building the NIFs again at that point doesn't seem to be necessary. Is it?

Would it be possible to just build and write the metadata without going through the entire compilation?

@philss
Copy link
Owner

philss commented Jun 21, 2024

I don't think we can build the metadata from outside the build of the module. But how do you change the config in a way that needs to rebuild the metadata?

@philss
Copy link
Owner

philss commented Jun 27, 2024

@mlwilkerson I think you can force the recompilation of the module with the following:

$ mix run -e "Kernel.ParallelCompiler.compile([(YourNativeModuleHere).module_info(:compile)[:source]])"

This will trigger the recompilation of that module, but will skip what is already compiled. WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants