How can I force a Julia package to redo precompilation?

628 Views Asked by At

I added a package to my Julia environment, and the package successfully precompiled. However, several log messages and errors were logged to the console. The errors seem to have been caught because they did not cause precompilation to fail.

How do I force a Julia package in my environment to redo precompilation?

1

There are 1 best solutions below

0
Mark Kittisopikul On

Julia packages are usually precompiled to DEPOT_PATH[1]/compiled/v#.#/NameOfPackage where DEPOT_PATH[1] is usually ~/.julia in your home directory.

One way to force recompilation is to delete the cache files at the above location.

Another way is to invoke the following function with the name of the package as a String.

force_recompile(package_name::String) = Base.compilecache(Base.identify_package(package_name))

For packages imported via Pkg.develop or ] dev, modify the package files will also force recompilation.