# Precompilation: Why does order matter when "using" packages for the first time?

**URL:** https://discourse.julialang.org/t/precompilation-why-does-order-matter-when-using-packages-for-the-first-time/107056
**Category:** New to Julia
**Created:** [December 2, 2023, 7:37pm UTC](https://discourse.julialang.org/t/precompilation-why-does-order-matter-when-using-packages-for-the-first-time/107056 "2023-12-02T19:37:37Z")
**Posts on this page:** 7
**Page:** 2

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [December 4, 2023, 11:59pm UTC](https://discourse.julialang.org/t/precompilation-why-does-order-matter-when-using-packages-for-the-first-time/107056/21 "2023-12-04T23:59:37Z")

</div>

> [@Tetrakai](#):
>
> After seeing the results in my last post do you think I should still open the github issue with Lux?
> 
> It seems to me this specific problem could be fixed but ultimately it is with how the package manager handles dependencies with extensions (correct me if I’m wrong, I just started trying Julia last month). As you say, depending on order of installation is descending into a whole new lower level of dependency hell.

The output suggests there are some problems with extension packages. I have not figured out if it is specific to a couple extension packages or if there is a particular issue with how extension packages are activated and compiled in general.

Extension packages are relatively new and are loaded when two or more packages are loaded. Perhaps @kristoffer.carlsson can interpret your pastebin better than I as well.

> <https://github.com/jonniedie/ComponentArrays.jl/tree/main/ext>
>
> //github.com/jonniedie/ComponentArrays.jl/tree/main/ext

> <https://github.com/jonniedie/ComponentArrays.jl/blob/main/ext/ComponentArraysAdaptExt.jl>

I’m going to ping @avikpal since he authored many of the extension packages in question.

> [@Tetrakai](#):
>
> I just realized there is another factor here that may matter. I am using juliaup, so at least the relevant directories may not be the same. Perhaps if using that there should be a note logged in versioninfo() or somewhere to help future debugging.

This should not be an issue. `juliaup` development is pretty tightly coordinated with Julia. It’s an official mechanism of installing Julia. It also stores content in `~/.julia` by default.

---

<div class="post-metadata">

### Author: ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)
#### Post date: [December 5, 2023, 9:07am UTC](https://discourse.julialang.org/t/precompilation-why-does-order-matter-when-using-packages-for-the-first-time/107056/22 "2023-12-05T09:07:30Z")

</div>

I wonder if this might be related to the issue [cycle creation issue with new weakdeps code · Issue #48533 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/48533), that was e.g. fixed in [tweak how some packages are loaded in extensions by KristofferC · Pull Request #63 · JuliaStats/LogExpFunctions.jl · GitHub](https://github.com/JuliaStats/LogExpFunctions.jl/pull/63)?

---

<div class="post-metadata">

### Author: ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)
#### Post date: [December 5, 2023, 3:40pm UTC](https://discourse.julialang.org/t/precompilation-why-does-order-matter-when-using-packages-for-the-first-time/107056/23 "2023-12-05T15:40:08Z")

</div>

I could not reproduce it yet, unfortunately. It took several minutes but it compiled everything nicely and `using...` works too:

> **Full REPL output**
>
> ░ tamasgal@silentbox-(6):tmp/precompile  main »●  
> ░ 16:21:51 \> juliap  
> \_  
> \_ \_ _(_)\_ | Documentation: [https://docs.julialang.org](https://docs.julialang.org)  
> (_) | (_) (_) |  
> \_ \_ | | \_\_ \_ | Type “?” for help, “]?” for Pkg help.  
> | | | | | | |/ ` | |  
> | | || | | | (_| | | Version 1.9.4 (2023-11-14)  
> _/ |\ __‘_|_|_|\__ ’\_| | Official [https://julialang.org/](https://julialang.org/) release  
> |\_\_/ |
> 
> (precompile) pkg\> add ComponentArrays@v0.15.5  
> add Lux@v0.5.10  
> add LuxAMDGPU@v0.2.0  
> add LuxCUDA@v0.3.1  
> add OneHotArrays@v0.2.4  
> add Optimisers@v0.3.1  
> add OrdinaryDiffEq@v6.59.3  
> add SciMLSensitivity@v7.47.0  
> add Zygote@v0.6.67  
> Updating registry at `~/.julia/registries/KM3NeT`  
> Updating git-repo `git@git.km3net.de:common/julia-registry.git`  
> Updating registry at `~/.julia/registries/General.toml`  
> Resolving package versions…  
> Installed PackageExtensionCompat ─ v1.0.2  
> Installed Functors ─────────────── v0.4.5  
> Installed ComponentArrays ──────── v0.15.5  
> Updating `~/tmp/precompile/Project.toml`  
> [b0b7db55] + ComponentArrays v0.15.5  
> Updating `~/tmp/precompile/Manifest.toml`  
> [79e6a3ab] + Adapt v3.7.1  
> [4fba245c] + ArrayInterface v7.6.1  
> [d360d2e6] + ChainRulesCore v1.18.0  
> [bbf7d656] + CommonSubexpressions v0.3.0  
> [34da2185] + Compat v4.10.1  
> [b0b7db55] + ComponentArrays v0.15.5  
> [163ba53b] + DiffResults v1.1.0  
> [b552c78f] + DiffRules v1.15.1  
> [ffbed154] + DocStringExtensions v0.9.3  
> [f6369f11] + ForwardDiff v0.10.36  
> [d9f16b24] + Functors v0.4.5  
> [615f187c] + IfElse v0.1.1  
> [92d709cd] + IrrationalConstants v0.2.2  
> [692b3bcd] + JLLWrappers v1.5.0  
> [2ab3a3ac] + LogExpFunctions v0.3.26  
> [1914dd2f] + MacroTools v0.5.11  
> [77ba4419] + NaNMath v1.0.2  
> [65ce6f38] + PackageExtensionCompat v1.0.2  
> [aea7be01] + PrecompileTools v1.2.0  
> [21216c6a] + Preferences v1.4.1  
> [ae029012] + Requires v1.3.0  
> [276daf66] + SpecialFunctions v2.3.1  
> [aedffcd0] + Static v0.8.8  
> [0d7ed370] + StaticArrayInterface v1.4.1  
> [1e83bf80] + StaticArraysCore v1.4.2  
> [efe28fd5] + OpenSpecFun\_jll v0.5.5+0  
> [0dad84c5] + ArgTools v1.1.1  
> [56f22d72] + Artifacts  
> [2a0f44e3] + Base64  
> [ade2ca70] + Dates  
> [f43a241f] + Downloads v1.6.0  
> [7b1f6079] + FileWatching  
> [b77e0a4c] + InteractiveUtils  
> [b27032c2] + LibCURL v0.6.4  
> [76f85450] + LibGit2  
> [8f399da3] + Libdl  
> [37e2e46d] + LinearAlgebra  
> [56ddb016] + Logging  
> [d6f4376e] + Markdown  
> [ca575930] + NetworkOptions v1.2.0  
> [44cfe95a] + Pkg v1.9.2  
> [de0858da] + Printf  
> [3fa0cd96] + REPL  
> [9a3f8284] + Random  
> [ea8e919c] + SHA v0.7.0  
> [9e88b42a] + Serialization  
> [6462fe0b] + Sockets  
> [2f01184e] + SparseArrays  
> [4607b0f0] + SuiteSparse  
> [fa267f1f] + TOML v1.0.3  
> [a4e569a6] + Tar v1.10.0  
> [8dfed614] + Test  
> [cf7118a7] + UUIDs  
> [4ec0a83e] + Unicode  
> [e66e0078] + CompilerSupportLibraries\_jll v1.0.5+0  
> [deac9b47] + LibCURL\_jll v8.4.0+0  
> [29816b5a] + LibSSH2\_jll v1.11.0+1  
> [c8ffd9c3] + MbedTLS\_jll v2.28.2+0  
> [14a3606d] + MozillaCACerts\_jll v2022.10.11  
> [4536629a] + OpenBLAS\_jll v0.3.21+4  
> [05823500] + OpenLibm\_jll v0.8.1+0  
> [bea87d4a] + SuiteSparse\_jll v5.10.1+6  
> [83775a58] + Zlib\_jll v1.2.13+0  
> [8e850b90] + libblastrampoline\_jll v5.8.0+0  
> [8e850ede] + nghttp2\_jll v1.52.0+1  
> [3f19e933] + p7zip\_jll v17.4.0+0  
> Precompiling project…  
> 7 dependencies successfully precompiled in 4 seconds. 32 already precompiled.  
> Resolving package versions…  
> Installed ADTypes ────────────── v0.2.5  
> Installed WeightInitializers ─── v0.1.2  
> Installed LuxCore ────────────── v0.1.6  
> Installed Optimisers ─────────── v0.3.1  
> Installed LuxLib ─────────────── v0.3.8  
> Installed ConcreteStructs ────── v0.2.3  
> Installed NNlib ──────────────── v0.9.8  
> Installed TruncatedStacktraces ─ v1.4.0  
> Installed LuxDeviceUtils ─────── v0.1.10  
> Installed LLVMExtra\_jll ──────── v0.0.27+1  
> Installed CEnum ──────────────── v0.5.0  
> Installed PartialFunctions ───── v1.2.0  
> Installed KernelAbstractions ─── v0.9.13  
> Installed LLVM ───────────────── v6.4.1  
> Installed Lux ────────────────── v0.5.10  
> Downloaded artifact: LLVMExtra  
> Updating `~/tmp/precompile/Project.toml`  
> [b2108857] + Lux v0.5.10  
> Updating `~/tmp/precompile/Manifest.toml`  
> [47edcb42] + ADTypes v0.2.5  
> [a9b6321e] + Atomix v0.1.0  
> [fa961155] + CEnum v0.5.0  
> [2569d6c7] + ConcreteStructs v0.2.3  
> [187b0558] + ConstructionBase v1.5.4  
> [46192b85] + GPUArraysCore v0.1.5  
> [63c18a36] + KernelAbstractions v0.9.13  
> [929cbde3] + LLVM v6.4.1  
> [b2108857] + Lux v0.5.10  
> [bb33d45b] + LuxCore v0.1.6  
> [34f89e08] + LuxDeviceUtils v0.1.10  
> [82251201] + LuxLib v0.3.8  
> [872c559c] + NNlib v0.9.8  
> [3bd65402] + Optimisers v0.3.1  
> [570af359] + PartialFunctions v1.2.0  
> [189a3867] + Reexport v1.2.2  
> [efcf1570] + Setfield v1.1.1  
> [90137ffa] + StaticArrays v1.7.0  
> [781d530d] + TruncatedStacktraces v1.4.0  
> [013be700] + UnsafeAtomics v0.2.1  
> [d80eeb9a] + UnsafeAtomicsLLVM v0.1.3  
> [d49dbf32] + WeightInitializers v0.1.2  
> [dad2f222] + LLVMExtra\_jll v0.0.27+1  
> [9fa8497b] + Future  
> [4af54fe1] + LazyArtifacts  
> [10745b16] + Statistics v1.9.0  
> Precompiling project…  
> 22 dependencies successfully precompiled in 19 seconds. 50 already precompiled.  
> Resolving package versions…  
> Installed Xorg\_libpciaccess\_jll ─── v0.16.0+1  
> Installed NUMA\_jll ──────────────── v2.0.14+0  
> Installed hsakmt\_roct\_jll ───────── v5.5.1+0  
> Installed Xorg\_xorgproto\_jll ────── v2019.2.0+2  
> Installed ROCmDeviceLibs\_jll ────── v5.6.1+1  
> Installed libdrm\_jll ────────────── v2.4.110+0  
> Installed LLVM\_jll ──────────────── v14.0.6+4  
> Installed GPUCompiler ───────────── v0.25.0  
> Installed hsa\_rocr\_jll ──────────── v5.4.4+0  
> Installed TimerOutputs ──────────── v0.5.23  
> Installed rocminfo\_jll ──────────── v5.4.4+0  
> Installed HIP\_jll ───────────────── v5.4.4+0  
> Installed ROCmCompilerSupport\_jll ─ v5.4.4+0  
> Installed LuxAMDGPU ─────────────── v0.2.0  
> Installed ROCmOpenCLRuntime\_jll ─── v5.4.4+0  
> Installed GPUArrays ─────────────── v9.1.0  
> Installed AMDGPU ────────────────── v0.7.4  
> Downloaded artifact: LLVM  
> Downloaded artifact: ROCmDeviceLibs  
> Downloaded artifact: Xorg\_xorgproto  
> Updating `~/tmp/precompile/Project.toml`  
> [83120cb1] + LuxAMDGPU v0.2.0  
> Updating `~/tmp/precompile/Manifest.toml`  
> ⌅ [21141c5a] + AMDGPU v0.7.4  
> [621f4979] + AbstractFFTs v1.5.0  
> ⌅ [fa961155] ↓ CEnum v0.5.0 ⇒ v0.4.2  
> [e2ba6199] + ExprTools v0.1.10  
> [0c68f7d7] + GPUArrays v9.1.0  
> [61eb1bfa] + GPUCompiler v0.25.0  
> [83120cb1] + LuxAMDGPU v0.2.0  
> [6c6a2e73] + Scratch v1.2.1  
> [a759f4b9] + TimerOutputs v0.5.23  
> [6e34b625] + Bzip2\_jll v1.0.8+0  
> [ab5a07f8] + Elfutils\_jll v0.189.0+1  
> [2696aab5] + HIP\_jll v5.4.4+0  
> ⌅ [86de99a1] + LLVM\_jll v14.0.6+4  
> [d4300ac3] + Libgcrypt\_jll v1.8.7+0  
> [7e76a0d4] + Libglvnd\_jll v1.6.0+0  
> [7add5ba3] + Libgpg\_error\_jll v1.42.0+0  
> [94ce4f54] + Libiconv\_jll v1.17.0+0  
> [7f51dc2b] + NUMA\_jll v2.0.14+0  
> [8fbdd1d2] + ROCmCompilerSupport\_jll v5.4.4+0  
> [873c0968] + ROCmDeviceLibs\_jll v5.6.1+1  
> [10ae2a08] + ROCmOpenCLRuntime\_jll v5.4.4+0  
> [02c8fc9c] + XML2\_jll v2.12.0+0  
> [aed1982a] + XSLT\_jll v1.1.34+0  
> [ffd25f8a] + XZ\_jll v5.4.5+0  
> [4f6342f7] + Xorg\_libX11\_jll v1.8.6+0  
> [0c0b7dd1] + Xorg\_libXau\_jll v1.0.11+0  
> [a3789734] + Xorg\_libXdmcp\_jll v1.1.4+0  
> [1082639a] + Xorg\_libXext\_jll v1.3.4+4  
> [a65dc6b1] + Xorg\_libpciaccess\_jll v0.16.0+1  
> [14d82f49] + Xorg\_libpthread\_stubs\_jll v0.1.1+0  
> [c7cfdc94] + Xorg\_libxcb\_jll v1.15.0+0  
> [c4d99508] + Xorg\_xorgproto\_jll v2019.2.0+2  
> [c5fb5394] + Xorg\_xtrans\_jll v1.5.0+0  
> [c53206cc] + argp\_standalone\_jll v1.3.1+0  
> [d65627f6] + fts\_jll v1.2.8+0  
> [dd59ff1a] + hsa\_rocr\_jll v5.4.4+0  
> [1cecccd7] + hsakmt\_roct\_jll v5.5.1+0  
> [8e53e030] + libdrm\_jll v2.4.110+0  
> [c88a4935] + obstack\_jll v1.2.3+0  
> [5a766526] + rocminfo\_jll v5.4.4+0  
> [d55e3150] + LLD\_jll v14.0.6+3  
> [8f36deef] + libLLVM\_jll v14.0.6+3  
> Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`  
> Precompiling project…  
> 29 dependencies successfully precompiled in 41 seconds. 90 already precompiled.  
> 1 dependency had output during precompilation:  
> ┌ NNlibAMDGPUExt [244f68ed-b92b-5712-87ae-6c617c41e16a]  
> │ ┌ Warning: ROCm MIOpen is not available for AMDGPU.  
> │ │ NNlib has limited functionality for AMDGPU.  
> │ └ @ NNlibAMDGPUExt ~/.julia/packages/NNlib/sXmAj/ext/NNlibAMDGPUExt/NNlibAMDGPUExt.jl:59  
> └  
> Resolving package versions…  
> Installed CUDA\_Runtime\_Discovery ─ v0.2.2  
> Installed NVTX\_jll ─────────────── v3.1.0+2  
> Installed cuDNN ────────────────── v1.2.1  
> Installed NVTX ─────────────────── v0.3.3  
> Installed CUDA\_Driver\_jll ──────── v0.7.0+0  
> Installed Random123 ────────────── v1.6.1  
> Installed LuxCUDA ──────────────── v0.3.1  
> Installed LLVMLoopInfo ─────────── v1.0.0  
> Installed JuliaNVTXCallbacks\_jll ─ v0.2.1+0  
> Installed BFloat16s ────────────── v0.4.2  
> Installed CUDNN\_jll ────────────── v8.9.4+0  
> Installed CUDA\_Runtime\_jll ─────── v0.10.1+0  
> Installed RandomNumbers ────────── v1.5.3  
> Installed CUDA ─────────────────── v5.1.1  
> Updating `~/tmp/precompile/Project.toml`  
> [d0bbae9a] + LuxCUDA v0.3.1  
> Updating `~/tmp/precompile/Manifest.toml`  
> [ab4f0b2a] + BFloat16s v0.4.2  
> [052768ef] + CUDA v5.1.1  
> [1af6417a] + CUDA\_Runtime\_Discovery v0.2.2  
> [3da002f7] + ColorTypes v0.11.4  
> [5ae59095] + Colors v0.12.10  
> [a8cc5b0e] + Crayons v4.1.1  
> [9a962f9c] + DataAPI v1.15.0  
> [a93c6f00] + DataFrames v1.6.1  
> [864edb3b] + DataStructures v0.18.15  
> [e2d170a0] + DataValueInterfaces v1.0.0  
> [53c48c17] + FixedPointNumbers v0.8.4  
> [842dd82b] + InlineStrings v1.4.0  
> [41ab1584] + InvertedIndices v1.3.0  
> [82899510] + IteratorInterfaceExtensions v1.0.0  
> [8b046642] + LLVMLoopInfo v1.0.0  
> [b964fa9f] + LaTeXStrings v1.3.1  
> [d0bbae9a] + LuxCUDA v0.3.1  
> [e1d29d7a] + Missings v1.1.0  
> [5da4648a] + NVTX v0.3.3  
> [bac558e1] + OrderedCollections v1.6.3  
> [69de0a69] + Parsers v2.8.0  
> [2dfb63ee] + PooledArrays v1.4.3  
> [08abe8d2] + PrettyTables v2.3.1  
> [74087812] + Random123 v1.6.1  
> [e6cf234a] + RandomNumbers v1.5.3  
> [91c51154] + SentinelArrays v1.4.1  
> [a2af1166] + SortingAlgorithms v1.2.0  
> [892a3eda] + StringManipulation v0.3.4  
> [3783bdb8] + TableTraits v1.0.1  
> [bd369af6] + Tables v1.11.1  
> [02a925ec] + cuDNN v1.2.1  
> [4ee394cb] + CUDA\_Driver\_jll v0.7.0+0  
> [76a88914] + CUDA\_Runtime\_jll v0.10.1+0  
> [62b44479] + CUDNN\_jll v8.9.4+0  
> [9c1d0b0a] + JuliaNVTXCallbacks\_jll v0.2.1+0  
> [e98f9f5b] + NVTX\_jll v3.1.0+2  
> Precompiling project…  
> 24 dependencies successfully precompiled in 58 seconds. 141 already precompiled.  
> 1 dependency had output during precompilation:  
> ┌ Random123 [74087812-796a-5b5d-8853-05524746bad3]  
> │ ┌ Warning: AES-NI is not enabled, so AESNI and ARS are not available.  
> │ └ @ Random123 ~/.julia/packages/Random123/u5oEp/src/Random123.jl:55  
> └  
> Resolving package versions…  
> Installed OneHotArrays ─ v0.2.4  
> Updating `~/tmp/precompile/Project.toml`  
> [0b1bfda6] + OneHotArrays v0.2.4  
> Updating `~/tmp/precompile/Manifest.toml`  
> [0b1bfda6] + OneHotArrays v0.2.4  
> Precompiling project…  
> 1 dependency successfully precompiled in 1 seconds. 165 already precompiled.  
> Resolving package versions…  
> Updating `~/tmp/precompile/Project.toml`  
> [3bd65402] + Optimisers v0.3.1  
> No Changes to `~/tmp/precompile/Manifest.toml`  
> Resolving package versions…  
> Installed TriangularSolve ─────────── v0.1.20  
> Installed IntelOpenMP\_jll ─────────── v2024.0.0+0  
> Installed FunctionWrappers ────────── v1.1.3  
> Installed SLEEFPirates ────────────── v0.6.42  
> Installed Polyester ───────────────── v0.7.9  
> Installed Distances ───────────────── v0.10.11  
> Installed RecursiveArrayTools ─────── v2.38.10  
> Installed NonlinearSolve ──────────── v2.8.2  
> Installed MuladdMacro ─────────────── v0.2.4  
> Installed SimpleUnPack ────────────── v1.1.0  
> Installed SciMLNLSolve ────────────── v0.1.9  
> Installed DiffEqBase ──────────────── v6.141.0  
> Installed NLsolve ─────────────────── v4.5.1  
> Installed SciMLBase ───────────────── v2.9.1  
> Installed LinearSolve ─────────────── v2.20.0  
> Installed SimpleNonlinearSolve ────── v0.1.25  
> Installed Lazy ────────────────────── v0.15.1  
> Installed OrdinaryDiffEq ──────────── v6.59.3  
> Installed FunctionWrappersWrappers ── v0.1.3  
> Installed LayoutPointers ──────────── v0.1.15  
> Installed GenericSchur ────────────── v0.5.3  
> Installed QuasiMonteCarlo ─────────── v0.3.3  
> Installed Sobol ───────────────────── v1.5.0  
> Installed EnzymeCore ──────────────── v0.6.4  
> Installed MKL\_jll ─────────────────── v2024.0.0+0  
> Installed FastClosures ────────────── v0.3.2  
> Installed LatticeRules ────────────── v0.0.1  
> Installed FastLapackInterface ─────── v2.0.0  
> Installed SciMLOperators ──────────── v0.3.7  
> Installed LoopVectorization ───────── v0.12.166  
> Installed PreallocationTools ──────── v0.4.12  
> Installed Krylov ──────────────────── v0.9.4  
> Installed KLU ─────────────────────── v0.4.1  
> Installed CommonSolve ─────────────── v0.2.4  
> Installed ExponentialUtilities ────── v1.25.0  
> Installed StrideArraysCore ────────── v0.5.2  
> Installed RuntimeGeneratedFunctions ─ v0.5.12  
> Installed VertexSafeGraphs ────────── v0.2.0  
> Installed VectorizationBase ───────── v0.21.65  
> Installed SymbolicIndexingInterface ─ v0.2.2  
> Installed FillArrays ──────────────── v1.9.1  
> Installed RecursiveFactorization ──── v0.2.21  
> Installed FastBroadcast ───────────── v0.2.8  
> Installed SparseDiffTools ─────────── v2.13.0  
> Installed Sparspak ────────────────── v0.3.9  
> Updating `~/tmp/precompile/Project.toml`  
> [1dea7af3] + OrdinaryDiffEq v6.59.3  
> Updating `~/tmp/precompile/Manifest.toml`  
> [7d9f7c33] + Accessors v0.1.33  
> [ec485272] + ArnoldiMethod v0.2.0  
> [62783981] + BitTwiddlingConvenienceFunctions v0.1.5  
> [2a0fbf3d] + CPUSummary v0.2.4  
> [fb6a15b2] + CloseOpenIntervals v0.1.12  
> [38540f10] + CommonSolve v0.2.4  
> [a33af91c] + CompositionsBase v0.1.2  
> [adafc99b] + CpuId v0.3.1  
> [8bb1440f] + DelimitedFiles v1.9.1  
> [2b5f629d] + DiffEqBase v6.141.0  
> [b4f34e82] + Distances v0.10.11  
> [4e289a0a] + EnumX v1.0.4  
> [f151be2c] + EnzymeCore v0.6.4  
> [d4d017d3] + ExponentialUtilities v1.25.0  
> [7034ab61] + FastBroadcast v0.2.8  
> [9aa1b823] + FastClosures v0.3.2  
> [29a986be] + FastLapackInterface v2.0.0  
> [1a297f60] + FillArrays v1.9.1  
> [6a86dc24] + FiniteDiff v2.21.1  
> [069b7b12] + FunctionWrappers v1.1.3  
> [77dc65aa] + FunctionWrappersWrappers v0.1.3  
> [c145ed77] + GenericSchur v0.5.3  
> [86223c79] + Graphs v1.9.0  
> [3e5b6fbb] + HostCPUFeatures v0.1.16  
> [d25df0c9] + Inflate v0.1.4  
> [18e54dd8] + IntegerMathUtils v0.1.2  
> [3587e190] + InverseFunctions v0.1.12  
> [ef3ab10e] + KLU v0.4.1  
> [ba0b0d4f] + Krylov v0.9.4  
> [73f95e8e] + LatticeRules v0.0.1  
> [10f19ff3] + LayoutPointers v0.1.15  
> [50d2b5c4] + Lazy v0.15.1  
> [d3d80556] + LineSearches v7.2.0  
> [7ed4a6bd] + LinearSolve v2.20.0  
> [bdcacae8] + LoopVectorization v0.12.166  
> [d125e4d3] + ManualMemory v0.1.8  
> [46d2c3a1] + MuladdMacro v0.2.4  
> [d41bc354] + NLSolversBase v7.8.3  
> [2774e3e8] + NLsolve v4.5.1  
> [8913a72c] + NonlinearSolve v2.8.2  
> [6fe1bfb0] + OffsetArrays v1.12.10  
> [1dea7af3] + OrdinaryDiffEq v6.59.3  
> [d96e819e] + Parameters v0.12.3  
> [f517fe37] + Polyester v0.7.9  
> [1d0040c9] + PolyesterWeave v0.2.1  
> [d236fae5] + PreallocationTools v0.4.12  
> [27ebfcd6] + Primes v0.5.5  
> [8a4e6c94] + QuasiMonteCarlo v0.3.3  
> [3cdcf5f2] + RecipesBase v1.3.4  
> [731186ca] + RecursiveArrayTools v2.38.10  
> [f2c3362d] + RecursiveFactorization v0.2.21  
> [7e49a35a] + RuntimeGeneratedFunctions v0.5.12  
> [94e857df] + SIMDTypes v0.1.0  
> [476501e8] + SLEEFPirates v0.6.42  
> [0bca4576] + SciMLBase v2.9.1  
> [e9a6253c] + SciMLNLSolve v0.1.9  
> [c0aeaf25] + SciMLOperators v0.3.7  
> ⌅ [727e6d20] + SimpleNonlinearSolve v0.1.25  
> [699a6c99] + SimpleTraits v0.9.4  
> [ce78b400] + SimpleUnPack v1.1.0  
> [ed01d8cd] + Sobol v1.5.0  
> [47a9eef4] + SparseDiffTools v2.13.0  
> [e56a9233] + Sparspak v0.3.9  
> [82ae8749] + StatsAPI v1.7.0  
> [2913bbd2] + StatsBase v0.34.2  
> [7792a7ef] + StrideArraysCore v0.5.2  
> [2efcf032] + SymbolicIndexingInterface v0.2.2  
> [8290d209] + ThreadingUtilities v0.5.2  
> [d5829a12] + TriangularSolve v0.1.20  
> [410a4b4d] + Tricks v0.1.8  
> [3a884ed6] + UnPack v1.0.2  
> [3d5dd08c] + VectorizationBase v0.21.65  
> [19fa3120] + VertexSafeGraphs v0.2.0  
> [1d5cc7b8] + IntelOpenMP\_jll v2024.0.0+0  
> [856f044c] + MKL\_jll v2024.0.0+0  
> [8ba89e20] + Distributed  
> [a63ad114] + Mmap  
> [1a1011a3] + SharedArrays  
> Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`  
> Precompiling project…  
> 75 dependencies successfully precompiled in 152 seconds. 189 already precompiled.  
> Resolving package versions…  
> Installed ZygoteRules ───────── v0.2.4  
> Installed Enzyme\_jll ────────── v0.0.96+0  
> Installed EllipsisNotation ──── v1.8.0  
> Installed IRTools ───────────── v0.4.11  
> Installed FunctionProperties ── v0.1.0  
> Installed DiffEqNoiseProcess ── v5.19.0  
> Installed Enzyme ────────────── v0.11.11  
> Installed SciMLSensitivity ──── v7.47.0  
> Installed Tracker ───────────── v0.2.30  
> Installed LevyArea ──────────── v1.0.0  
> Installed DiffEqCallbacks ───── v2.34.0  
> Installed SparseInverseSubset ─ v0.1.1  
> Installed Zygote ────────────── v0.6.67  
> Installed JumpProcesses ─────── v9.9.0  
> Installed StochasticDiffEq ──── v6.63.2  
> Installed ChainRules ────────── v1.58.0  
> Installed ResettableStacks ──── v1.1.1  
> Installed PoissonRandom ─────── v0.4.4  
> Installed ReverseDiff ───────── v1.15.1  
> Installed Cassette ──────────── v0.3.12  
> Installed ObjectFile ────────── v0.4.1  
> Downloaded artifact: Enzyme  
> Updating `~/tmp/precompile/Project.toml`  
> [1ed8b502] + SciMLSensitivity v7.47.0  
> Updating `~/tmp/precompile/Manifest.toml`  
> [49dc2e85] + Calculus v0.5.1  
> [7057c7e9] + Cassette v0.3.12  
> [082447d4] + ChainRules v1.58.0  
> [459566f4] + DiffEqCallbacks v2.34.0  
> [77a26b50] + DiffEqNoiseProcess v5.19.0  
> [31c24e10] + Distributions v0.25.103  
> [fa6b7ba4] + DualNumbers v0.6.8  
> [da5c29d0] + EllipsisNotation v1.8.0  
> [7da242da] + Enzyme v0.11.11  
> [f62d2435] + FunctionProperties v0.1.0  
> [34004b35] + HypergeometricFunctions v0.3.23  
> [7869d1d1] + IRTools v0.4.11  
> [ccbc3e58] + JumpProcesses v9.9.0  
> [2d8b4e74] + LevyArea v1.0.0  
> [d8793406] + ObjectFile v0.4.1  
> [429524aa] + Optim v1.7.8  
> [90014a1f] + PDMats v0.11.30  
> [e409e4f3] + PoissonRandom v0.4.4  
> [85a6dd25] + PositiveFactorizations v0.2.4  
> [1fd47b50] + QuadGK v2.9.1  
> [c1ae055f] + RealDot v0.1.0  
> [ae5879a3] + ResettableStacks v1.1.1  
> [37e2e3b7] + ReverseDiff v1.15.1  
> [79098fc4] + Rmath v0.7.1  
> [1ed8b502] + SciMLSensitivity v7.47.0  
> [dc90abb0] + SparseInverseSubset v0.1.1  
> [4c63d2b9] + StatsFuns v1.3.0  
> [789caeaf] + StochasticDiffEq v6.63.2  
> [09ab397b] + StructArrays v0.6.16  
> [53d494c1] + StructIO v0.3.0  
> [9f7883ad] + Tracker v0.2.30  
> [e88e6eb3] + Zygote v0.6.67  
> [700de1a5] + ZygoteRules v0.2.4  
> [7cc45869] + Enzyme\_jll v0.0.96+0  
> [f50d1b31] + Rmath\_jll v0.4.0+0  
> Precompiling project…  
> 58 dependencies successfully precompiled in 94 seconds. 277 already precompiled.  
> Resolving package versions…  
> Updating `~/tmp/precompile/Project.toml`  
> [e88e6eb3] + Zygote v0.6.67  
> No Changes to `~/tmp/precompile/Manifest.toml`  
> Precompiling project…  
> 2 dependencies successfully precompiled in 6 seconds. 333 already precompiled.
> 
> julia\> using Lux, ComponentArrays, SciMLSensitivity, LuxAMDGPU, LuxCUDA,  
> Optimisers, OrdinaryDiffEq, Random, Statistics, Zygote, OneHotArrays, InteractiveUtils  
> [Info: Precompiling SciMLSensitivity [1ed8b502-d754-442c-8d5d-10ac956f44a1]  
> [Info: Precompiling ComponentArraysRecursiveArrayToolsExt [eb027ef3-389c-5561-b3ad-95c7d3310487]  
> [Info: Precompiling ComponentArraysSciMLBaseExt [4f110ecc-9415-5188-843d-6e96dffda943]  
> [Info: Precompiling SciMLBasePartialFunctionsExt [df51243f-21c7-592d-86fd-70f68e499efd]  
> [Info: Precompiling LuxChainRulesExt [5a706d83-0d0f-5c5b-b735-89ff4a868e6f]  
> [Info: Precompiling LuxDeviceUtilsZygoteExt [10fadeb3-2774-5b75-a590-505d88904d5f]  
> [Info: Precompiling LuxZygoteExt [df13723f-0f22-5fb0-8a8f-885eac2ce1ee]  
> [Info: Precompiling ComponentArraysZygoteExt [3acbf79e-e1c1-58d9-9a19-e1c5cc2c64d6]  
> [Info: Precompiling LuxCUDA [d0bbae9a-e099-4d5b-a835-1c6931763bda]  
> [Info: Precompiling ZygoteColorsExt [e68c091a-8ea5-5ca7-be4f-380657d4ad79]  
> [Info: Precompiling NNlibCUDAExt [8a688d86-d2bc-5ad3-8ed1-384f9f2c8cc5]  
> [Info: Precompiling WeightInitializersCUDAExt [90d8b1a4-4ff6-5c56-8cd9-0f1832f7d8af]  
> [Info: Precompiling ArrayInterfaceCUDAExt [f78586ac-ba87-5ec7-b3a5-84bc1b258ee3]  
> [Info: Precompiling LinearSolveCUDAExt [e24d4dde-ed20-5ee7-b465-f1dd73f9b6ba]  
> [Info: Precompiling NNlibCUDACUDNNExt [ab3ce674-22af-5de9-b6c7-795b17302dcb]  
> [Info: Precompiling LuxLibLuxCUDATrackerExt [31c3a634-9907-5471-94ef-38c93372822a]  
> [Info: Precompiling LuxDeviceUtilsLuxCUDAExt [5aca1038-a1e4-56a0-b289-e8eb9d694054]  
> [Info: Precompiling LuxLuxCUDAExt [fa1c364e-1226-532b-86fb-d7abd671b23b]
> 
> julia\>

---

<div class="post-metadata">

### Author: ![Tetrakai](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)
#### Post date: [December 5, 2023, 4:55pm UTC](https://discourse.julialang.org/t/precompilation-why-does-order-matter-when-using-packages-for-the-first-time/107056/24 "2023-12-05T16:55:52Z")

</div>

Did you ensure the packages weren’t already present in `~/.julia/packages`?

That was a key step that doesn’t seem to show up in the REPL logs. For my last pastebin I know the packages were downloaded fresh from the registry because I was watching them get added. However, there is no mention of “downloading” all of them in the logs.

---

<div class="post-metadata">

### Author: ![charleskawczynski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charleskawczynski/32/13783_2.png) [@charleskawczynski](https://discourse.julialang.org/u/charleskawczynski)
#### Post date: [February 7, 2025, 1:24am UTC](https://discourse.julialang.org/t/precompilation-why-does-order-matter-when-using-packages-for-the-first-time/107056/25 "2025-02-07T01:24:26Z")

</div>

I’m going to leave this for my future self:

> **[GitHub - CliMA/CodeLoadingOrders.jl: A package for exploring code loading orders](https://github.com/CliMA/CodeLoadingOrders.jl)**
>
> A package for exploring code loading orders

---

<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: [February 7, 2025, 3:25am UTC](https://discourse.julialang.org/t/precompilation-why-does-order-matter-when-using-packages-for-the-first-time/107056/26 "2025-02-07T03:25:43Z")

</div>

For the record, the proper fix here is fixing type piracy and/or invalidations. The PrecompileTools.jl docs have nice info on this. And SnoopCompile.jl has additional inspection tooling.

---

<div class="post-metadata">

### Author: ![charleskawczynski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charleskawczynski/32/13783_2.png) [@charleskawczynski](https://discourse.julialang.org/u/charleskawczynski)
#### Post date: [February 7, 2025, 2:03pm UTC](https://discourse.julialang.org/t/precompilation-why-does-order-matter-when-using-packages-for-the-first-time/107056/27 "2025-02-07T14:03:53Z")

</div>

Yes, but order can also result in less or more invalidations ([`zip` triggers lots of invalidations · Issue #175 · JuliaIO/DiskArrays.jl · GitHub](https://github.com/JuliaIO/DiskArrays.jl/issues/175#issuecomment-2641124371))

[Previous page](https://discourse.julialang.org/t/precompilation-why-does-order-matter-when-using-packages-for-the-first-time/107056.md?page=1)
