Skip to content

Precompiling indirect dependencies causes LoadError: Unknown package #60077

@omus

Description

@omus

In Julia 1.12.1 I noticed that using Pkg.precompile on a indirect package dependency results in the exception LoadError: Unknown package: <pkg-name>.

❯ JULIA_DEPOT_PATH=/tmp/depot JULIA_PKG_PRECOMPILE_AUTO=0 julia +1.12.1 --project=/tmp/project -e 'using Pkg; Pkg.add("ODBC")'
Precompiling Pkg finished.
  1 dependency successfully precompiled in 69 seconds
  Installing known registries into `/tmp/depot`
       Added `General` registry to /tmp/depot/registries
    Updating registry at `/tmp/depot/registries/General.toml`
   Resolving package versions...
   Installed IteratorInterfaceExtensions ─ v1.0.0
   Installed Readline_jll ──────────────── v8.2.13+0
   Installed DecFP ─────────────────────── v1.4.1
   Installed DataValueInterfaces ───────── v1.0.0
   Installed OrderedCollections ────────── v1.8.1
   Installed LogExpFunctions ───────────── v0.3.29
   Installed Scratch ───────────────────── v1.3.0
   Installed SpecialFunctions ──────────── v2.6.1
   Installed iODBC_jll ─────────────────── v3.52.16+0
   Installed unixODBC_jll ──────────────── v2.3.12+0
   Installed DecFP_jll ─────────────────── v2.0.300+0
   Installed OpenSpecFun_jll ───────────── v0.5.6+0
   Installed Ncurses_jll ───────────────── v6.5.1+0
   Installed IrrationalConstants ───────── v0.2.6
   Installed DataAPI ───────────────────── v1.16.0
   Installed Tables ────────────────────── v1.12.1
   Installed JLLWrappers ───────────────── v1.7.1
   Installed Libiconv_jll ──────────────── v1.18.0+0
   Installed TableTraits ───────────────── v1.0.1
   Installed ODBC ──────────────────────── v1.1.2
   Installed DBInterface ───────────────── v2.6.1
   Installed Preferences ───────────────── v1.5.0
   Installed DocStringExtensions ───────── v0.9.5
  Installing artifacts ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7/7
    Updating `/private/tmp/project/Project.toml`
  [be6f12e9] + ODBC v1.1.2
    Updating `/private/tmp/project/Manifest.toml`
  [a10d1c49] + DBInterface v2.6.1
  [9a962f9c] + DataAPI v1.16.0
  [e2d170a0] + DataValueInterfaces v1.0.0
  [55939f99] + DecFP v1.4.1
  [ffbed154] + DocStringExtensions v0.9.5
  [92d709cd] + IrrationalConstants v0.2.6
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [692b3bcd] + JLLWrappers v1.7.1
  [2ab3a3ac] + LogExpFunctions v0.3.29
  [be6f12e9] + ODBC v1.1.2
  [bac558e1] + OrderedCollections v1.8.1
  [21216c6a] + Preferences v1.5.0
  [6c6a2e73] + Scratch v1.3.0
  [276daf66] + SpecialFunctions v2.6.1
  [3783bdb8] + TableTraits v1.0.1
  [bd369af6] + Tables v1.12.1
  [47200ebd] + DecFP_jll v2.0.300+0
  [94ce4f54] + Libiconv_jll v1.18.0+0
  [68e3532b] + Ncurses_jll v6.5.1+0
  [efe28fd5] + OpenSpecFun_jll v0.5.6+0
  [05236dd9] + Readline_jll v8.2.13+0
  [80337aba] + iODBC_jll v3.52.16+0
  [1841a5aa] + unixODBC_jll v2.3.12+0
  [56f22d72] + Artifacts v1.11.0
  [ade2ca70] + Dates v1.11.0
  [8f399da3] + Libdl v1.11.0
  [37e2e46d] + LinearAlgebra v1.12.0
  [de0858da] + Printf v1.11.0
  [9a3f8284] + Random v1.11.0
  [ea8e919c] + SHA v0.7.0
  [fa267f1f] + TOML v1.0.3
  [cf7118a7] + UUIDs v1.11.0
  [4ec0a83e] + Unicode v1.11.0
  [e66e0078] + CompilerSupportLibraries_jll v1.3.0+1
  [4536629a] + OpenBLAS_jll v0.3.29+0
  [05823500] + OpenLibm_jll v0.8.7+0
  [8e850b90] + libblastrampoline_jll v5.15.0+0
    Building ODBC → `/tmp/depot/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/7fe19bed38551e3169edaec8bb8673354d355681/build.log`

❯ JULIA_DEPOT_PATH=/tmp/depot JULIA_PKG_PRECOMPILE_AUTO=0 julia +1.12.1 --project=/tmp/project -e 'using Pkg; Pkg.precompile("DecFP")'
ERROR: Unknown package: DecFP

The issue did not appear in Julia 1.12.0. I believe this issue was introduced as a side effect from the changes introduced in #59212.

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