# How to load Requires.jl code of dependency while precompiling

**URL:** <https://discourse.julialang.org/t/how-to-load-requires-jl-code-of-dependency-while-precompiling/95962>\
**Category:** General Usage\
**Tags:** question\
**Created:** [March 12, 2023, 12:36pm UTC](https://discourse.julialang.org/t/how-to-load-requires-jl-code-of-dependency-while-precompiling/95962 "2023-03-12T12:36:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ToucheSir](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/touchesir/32/14411_2.png) [@ToucheSir](https://discourse.julialang.org/u/ToucheSir)\
**Post date:** [March 12, 2023, 4:38pm UTC](https://discourse.julialang.org/t/how-to-load-requires-jl-code-of-dependency-while-precompiling/95962/2 "2023-03-12T16:38:54Z")

</div>

I have good news and bad news. The good news is that I went quite deep down this rabbit hole while working on  
[Re-integrate NNlibCUDA as a package extension by ToucheSir · Pull Request #445 · FluxML/NNlib.jl · GitHub](https://github.com/FluxML/NNlib.jl/pull/445). The bad news is that it ended up at [Package extensions for Julia \< 1.9 - #17 by ToucheSir](https://discourse.julialang.org/t/package-extensions-for-julia-1-9/93397/17). TL;DR there isn’t much interest in having the Requires.jl fallback precompile.

It appears to me that part of the grand bargain of package extensions was that migrating from Requires.jl would at least be latency-neutral because the problems with precompilation were already present in the existing codebase. Adding new code under a `@require` block breaks that agreement, which is why I gave up on the aforementioned NNlib PR as-is. Perhaps StaticArrayInterface was not aware of this caveat when they added the Requires path?

---

_[View the full topic](https://discourse.julialang.org/t/how-to-load-requires-jl-code-of-dependency-while-precompiling/95962)._
