# Precompile/build an extension

**URL:** <https://discourse.julialang.org/t/precompile-build-an-extension/105345>\
**Category:** General Usage\
**Tags:** question, package, precompilation, package-extensions\
**Created:** [October 24, 2023, 12:29pm UTC](https://discourse.julialang.org/t/precompile-build-an-extension/105345 "2023-10-24T12:29:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qfl3x](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qfl3x/32/16227_2.png) [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)\
**Post date:** [October 24, 2023, 12:29pm UTC](https://discourse.julialang.org/t/precompile-build-an-extension/105345/1 "2023-10-24T12:29:17Z")

</div>

Hello, is it currently possible to manually (equivalent of `pkg> build`) precompile a package extension after modifying it?

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [October 24, 2023, 12:43pm UTC](https://discourse.julialang.org/t/precompile-build-an-extension/105345/2 "2023-10-24T12:43:37Z")

</div>

`pkg> up` recompiles when everything that was modified. Except when precompilation failed last time it tried, in which case I think you could just do `using Both, Packages`. Not sure if this helps.

EDIT: you could also try `Pkg`’s `precompile` command: `pkg> precompile Both Packages`.

---

<div class="post-metadata">

**Author:** ![Qfl3x](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qfl3x/32/16227_2.png) [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)\
**Post date:** [October 24, 2023, 12:55pm UTC](https://discourse.julialang.org/t/precompile-build-an-extension/105345/3 "2023-10-24T12:55:43Z")

</div>

My issue is when the precompilation fails in particular. After `using Both, Packages`, the precompiler gives up on the extension and never tries again.

---

<div class="post-metadata">

**Author:** ![ffevotte](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffevotte/32/6587_2.png) [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Post date:** [October 25, 2023, 6:41pm UTC](https://discourse.julialang.org/t/precompile-build-an-extension/105345/4 "2023-10-25T18:41:24Z")

</div>

Does `Base.retry_load_extensions()` help in this case?
