英文:
How can I force a Julia package to redo precompilation?
问题
我添加了一个包到我的Julia环境中,并且这个包成功预编译。然而,控制台中记录了几条日志消息和错误。这些错误似乎已经被捕获,因为它们没有导致预编译失败。
我如何强制我的Julia环境中的一个包重新进行预编译?
英文:
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
得分: 1
朱莉亚包通常预编译到 DEPOT_PATH[1]/compiled/v#.#/包的名称
,其中 DEPOT_PATH[1]
通常是位于您的主目录下的 ~/.julia
。
强制重新编译的一种方法是删除上述位置的缓存文件。
另一种方法是使用包名称作为 String
调用以下函数。
force_recompile(package_name::String) = Base.compilecache(Base.identify_package(package_name))
对于通过 Pkg.develop
或 ] dev
导入的包,修改包文件也会强制重新编译。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论