Question

Is it possible to reinstall or recompile an already installed package in Julia? I did not find any hints in the official documentation. whos() did not reveal anything useful either.

Best


As was pointed out in the answer below by @ivarne my question can also be understood as:

"How can I reload a package that has been loaded with import or using in a Julia session?"

This question has also been answered by @ivarne.

Was it helpful?

Solution

You can re-run the package build script with Pkg.build("pkgname"). The actual compiling of the packages is just in time so they are complied when you load them.

OTHER TIPS

Not sure about the terminology you use, but if you think about reloading a package (with import or using), it is complicated and the best approach is to restart Julia.

A function called reload() exists, but it has some limitations. While developing a Package, you might consider using something like the Autoreload.jl package to make it easier to reload the files you are working on.

If you are developing package and heve it installed using dev command, than Base.compilecache(Base.PkgId(PDFIO)) does the job.
In this case PDFIO is the package that I'm working on. It is more convenient than restarting julia.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top