Skip to content

Precompilation warning for UnitfulLatexify #813

@tomaklutfu

Description

@tomaklutfu

I got this warning

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.7 (2025-09-08)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.11) pkg> up
    Updating registry at `~/.julia/registries/General.toml`
   Installed OrdinaryDiffEqRosenbrock ── v1.18.0
   Installed FFTW ────────────────────── v1.10.0
   Installed NonlinearSolveBase ──────── v1.16.0
   Installed Unitful ─────────────────── v1.25.0
   Installed DiffEqBase ──────────────── v6.190.2
   Installed SciMLOperators ──────────── v1.7.2
   Installed SciMLBase ───────────────── v2.119.0
   Installed Plots ───────────────────── v1.40.20
   Installed SymbolicIndexingInterface ─ v0.3.44
   Installed Optimization ────────────── v4.7.0
Precompiling CUDA_Driver_jll...
  3 dependencies successfully precompiled in 3 seconds. 23 already precompiled.
    Updating `~/.julia/environments/v1.11/Project.toml`
  [7f7a1694] ↑ Optimization v4.6.0 ⇒ v4.7.0
  [91a5bcdd] ↑ Plots v1.40.19 ⇒ v1.40.20
    Updating `~/.julia/environments/v1.11/Manifest.toml`
  [2b5f629d] ↑ DiffEqBase v6.189.1 ⇒ v6.190.2
  [7a1cc6ca] ↑ FFTW v1.9.0 ⇒ v1.10.0
⌃ [f6369f11] ↓ ForwardDiff v1.2.1 ⇒ v0.10.39
  [be0214bd] ↑ NonlinearSolveBase v1.15.0 ⇒ v1.16.0
  [7f7a1694] ↑ Optimization v4.6.0 ⇒ v4.7.0
  [43230ef6] ↑ OrdinaryDiffEqRosenbrock v1.17.0 ⇒ v1.18.0
  [91a5bcdd] ↑ Plots v1.40.19 ⇒ v1.40.20
  [0bca4576] ↑ SciMLBase v2.118.1 ⇒ v2.119.0
  [c0aeaf25] ↑ SciMLOperators v1.7.1 ⇒ v1.7.2
  [2efcf032] ↑ SymbolicIndexingInterface v0.3.43 ⇒ v0.3.44
  [1986cc42] ↑ Unitful v1.24.0 ⇒ v1.25.0
        Info Packages marked with ⌃ have new versions available and may be upgradable.
Precompiling project...
  ? UnitfulLatexify
  ? Plots → UnitfulExt
  571 dependencies successfully precompiled in 209 seconds. 40 already precompiled.
  2 dependencies failed but may be precompilable after restarting julia
  2 dependencies had output during precompilation:
┌ UnitfulLatexify
│  WARNING: Method definition apply_recipe(Unitful.Unit{U, D} where D where U) in module LatexifyExt at /home/programs/.julia/packages/Latexify/IJYMW/src/recipes.jl:168 overwritten in module UnitfulLatexify on the same line (check for duplicate calls to `include`).
│  ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.

┌ Plots → UnitfulExt
│  WARNING: Method definition apply_recipe(Unitful.Unit{U, D} where D where U) in module LatexifyExt at /home/programs/.julia/packages/Latexify/IJYMW/src/recipes.jl:168 overwritten in module UnitfulLatexify on the same line (check for duplicate calls to `include`).
│  ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.

Later, while using Plots.jl

julia> using Unitful, Latexify

julia> using Plots
Precompiling UnitfulExt...
Info Given UnitfulExt was explicitly requested, output will be shown live 
WARNING: Method definition apply_recipe(Unitful.Unit{U, D} where D where U) in module LatexifyExt at /home/programs/.julia/packages/Latexify/IJYMW/src/recipes.jl:168 overwritten in module UnitfulLatexify on the same line (check for duplicate calls to `include`).
ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.
  ? UnitfulLatexify
  ? Plots  UnitfulExt
[ Info: Precompiling UnitfulExt [0e51ec96-f580-5f12-a625-1297083d7970] (cache misses: incompatible header (8))
WARNING: Method definition apply_recipe(Unitful.Unit{U, D} where D where U) in module LatexifyExt at /home/programs/.julia/packages/Latexify/IJYMW/src/recipes.jl:168 overwritten in module UnitfulLatexify on the same line (check for duplicate calls to `include`).
ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.
┌ Info: Skipping precompilation due to precompilable error. Importing UnitfulExt [0e51ec96-f580-5f12-a625-1297083d7970].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
Precompiling UnitfulLatexify...
Info Given UnitfulLatexify was explicitly requested, output will be shown live 
WARNING: Method definition apply_recipe(Unitful.Unit{U, D} where D where U) in module LatexifyExt at /home/programs/.julia/packages/Latexify/IJYMW/src/recipes.jl:168 overwritten in module UnitfulLatexify on the same line (check for duplicate calls to `include`).
ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.
  ? UnitfulLatexify
[ Info: Precompiling UnitfulLatexify [45397f5d-5981-4c77-b2b3-fc36d6e9b728] (cache misses: incompatible header (8))
WARNING: Method definition apply_recipe(Unitful.Unit{U, D} where D where U) in module LatexifyExt at /home/programs/.julia/packages/Latexify/IJYMW/src/recipes.jl:168 overwritten in module UnitfulLatexify on the same line (check for duplicate calls to `include`).
ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.
┌ Info: Skipping precompilation due to precompilable error. Importing UnitfulLatexify [45397f5d-5981-4c77-b2b3-fc36d6e9b728].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.

I don't know that Unitful.jl is to blame here but it make sense because UnitfulLatexify.jl is a recent addition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions