# Circular dependency

**URL:** <https://discourse.julialang.org/t/circular-dependency/125794>\
**Category:** General Usage\
**Tags:** question, package, linearsolve\
**Created:** [February 11, 2025, 3:26pm UTC](https://discourse.julialang.org/t/circular-dependency/125794 "2025-02-11T15:26:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [February 11, 2025, 3:26pm UTC](https://discourse.julialang.org/t/circular-dependency/125794/1 "2025-02-11T15:26:32Z")

</div>

After updating my package KiteModels.jl I get the following warning:

```julia
┌ Warning: Circular dependency detected.
│ Precompilation will be skipped for dependencies in this cycle:
│ ┌ LinearSolve → LinearSolveSparseArraysExt
│ └─ LinearSolve → LinearSolveRecursiveArrayToolsExt
│ Precompilation will also be skipped for the following, which depend on the above cycle:
│ NonlinearSolveFirstOrder
│ NonlinearSolve
│ NonlinearSolveQuasiNewton → NonlinearSolveQuasiNewtonForwardDiffExt
│ NonlinearSolveQuasiNewton
│ NonlinearSolve → NonlinearSolveNLsolveExt
│ ModelingToolkit
│ LinearSolve → LinearSolveEnzymeExt
│ OrdinaryDiffEqDifferentiation
│ OrdinaryDiffEqNonlinearSolve
│ OrdinaryDiffEqSDIRK
│ OrdinaryDiffEqBDF
│ NonlinearSolve → NonlinearSolveSundialsExt
│ NonlinearSolveBase → NonlinearSolveBaseLinearSolveExt
│ KiteModels
│ ModelingToolkit → MTKChainRulesCoreExt
└ @ Pkg.API.Precompilation ~/.julia/juliaup/julia-1.10.8+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/precompilation.jl:584

```

Any idea?

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [February 11, 2025, 3:57pm UTC](https://discourse.julialang.org/t/circular-dependency/125794/2 "2025-02-11T15:57:33Z")

</div>

There’s an issue  
[Circular dependency on 1.10 · Issue #573 · SciML/LinearSolve.jl](https://github.com/SciML/LinearSolve.jl/issues/573)

I don’t know how to read that cycle warning, not sure if it’s even legit. Maybe someone can help explain. I did check that there’s a [RecursiveArrayToolsSparseArraysExt.jl](https://github.com/SciML/RecursiveArrayTools.jl/blob/master/ext/RecursiveArrayToolsSparseArraysExt.jl), and SparseArrays is weirdly a full dependency of LinearSolve, not among `[weakdeps]`.

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [February 11, 2025, 4:20pm UTC](https://discourse.julialang.org/t/circular-dependency/125794/3 "2025-02-11T16:20:28Z")

</div>

I added

```julia
LinearSolve = "=2.39.0"

```

to my `Project.toml` file, now pre-compilation works again. But it is annoying that these errors pop up out of nothing.

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [February 11, 2025, 4:36pm UTC](https://discourse.julialang.org/t/circular-dependency/125794/4 "2025-02-11T16:36:51Z")

</div>

The 3.0.0 release added a few extensions, including `LinearSolveSparseArraysExt`. What I’m wondering is why the circular dependency didn’t stop the release, does it not trigger on 1.11?

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [February 11, 2025, 5:42pm UTC](https://discourse.julialang.org/t/circular-dependency/125794/5 "2025-02-11T17:42:10Z")

</div>

It’s Krylov.jl being an issue with [Make SparseArrays an extension package by ChrisRackauckas · Pull Request #955 · JuliaSmoothOptimizers/Krylov.jl · GitHub](https://github.com/JuliaSmoothOptimizers/Krylov.jl/pull/955) . We also might need to do something with LazyArrays.jl. I can put a hack in to make this not trigger and remove it when the dependencies are cleaned.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [February 11, 2025, 5:42pm UTC](https://discourse.julialang.org/t/circular-dependency/125794/6 "2025-02-11T17:42:53Z")

</div>

Wait the hack is already there…
