Cyclic Dependencies in Julia Packages - How to solve?

Using Julia 1.10.10 on Windows 11. Running the following Julia script for a JULIA_DEPOT_PATH location that is still empty:

import Pkg
Pkg.add("DelimitedFiles")
Pkg.add("CairoMakie")
Pkg.add("LaTeXStrings")
Pkg.add("Statistics")
Pkg.add("DifferentialEquations")
Pkg.add("Distributions")
Pkg.add("YAML")
Pkg.add("Dates")
Pkg.add("DataFrames")
Pkg.add("ArgParse")
Pkg.add("CSV")
Pkg.precompile()

gives the following Warning on Cyclic Dependencies since a couple of days (this was still working on 4 November 2025):

Warning: Circular dependency detected.
β”‚ Precompilation will be skipped for dependencies in this cycle:
β”‚  β”Œ IntervalSets β†’ IntervalSetsRandomExt
β”‚  └─ IntervalSets β†’ IntervalSetsPrintfExt
β”‚ Precompilation will also be skipped for the following, which depend on the above cycle:
β”‚   ImageIO
β”‚   ImageAxes
β”‚   CairoMakie
β”‚   ConstructionBase β†’ ConstructionBaseIntervalSetsExt
β”‚   IntervalArithmetic β†’ IntervalArithmeticIntervalSetsExt
β”‚   Makie
β”‚   AxisArrays
β”‚   Netpbm
β”‚   IntervalSets β†’ IntervalSetsStatisticsExt
β”‚   ImageMetadata

I don’t manage to get the packages compiled anymore…

Any suggestions?

I would start by double checking with the maintainers of IntervalSets.jl why they are creating extensions for standard libraries. Random and Printf are available in any Julia installation, so they should be direct dependencies of IntervalSets.jl instead.

both Julia 1.11 and 1.12 fix this issue

See "Warning: Circular dependency detected." with IntervalSets 0.7.12 in Julia 1.10.10 Β· Issue #206 Β· JuliaMath/IntervalSets.jl Β· GitHub.

2 Likes

Ok. Thanks for the link. Apparently, others have identified this as well. That post also states: β€œThe latest LTS Julia 1.10.10 shows this at start-up with IntervalSets 0.7.12. IntervalSets 0.7.11 seems to be fine.”

Is there a way to force installation of IntervalSets 0.7.11 instead of 0.7.12? i.e., is there a way to force installation of a specific version of a package?

] add IntervalSets@0.7.11

Found a workaround :slightly_smiling_face:

import Pkg
Pkg.add(Pkg.PackageSpec(;name="IntervalSets", version="0.7.11"))
Pkg.add("DelimitedFiles")
Pkg.add("CairoMakie")
Pkg.add("LaTeXStrings")
Pkg.add("Statistics")
Pkg.add("DifferentialEquations")
Pkg.add("Distributions")
Pkg.add("YAML")
Pkg.add("Dates")
Pkg.add("DataFrames")
Pkg.add("ArgParse")
Pkg.add("CSV")
Pkg.precompile()

Notice you don’t need the PackageSpec:

Pkg.add(name="IntervalSets", version="0.7.11")
2 Likes