JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
44.97k stars 5.42k forks source link

Overrides.toml broken on master #54930

Open barche opened 1 week ago

barche commented 1 week ago

It seems that somehow (and in no way obvious to me how) commit https://github.com/JuliaLang/julia/commit/a1a2ac63cffd11f0edc3fe730797023867d82527 (#54739) broke the use of the Overrides.toml file. Details of the testing I did:

/home/bjanssens/.julia/artifacts/Overrides.toml:

[3eaa8342-bff7-56a5-9981-c04077f7cee7]
libcxxwrap_julia = "/home/bjanssens/src/build/libcxxwrap_julia"

Normal Overrides.toml behavior (tested on Julia 1.10 here):

julia> using libcxxwrap_julia_jll, Libdl

julia> println.(filter(x -> contains(x, "cxx"), dllist()));
/home/bjanssens/.julia/compiled/v1.10/libcxxwrap_julia_jll/9VnAb_YexWl.so
/home/bjanssens/src/build/libcxxwrap_julia/lib/libcxxwrap_julia.so
/home/bjanssens/src/build/libcxxwrap_julia/lib/libcxxwrap_julia_stl.so

Behavior on Julia master at or after commit a1a2ac6:

julia> using libcxxwrap_julia_jll, Libdl
[ Info: Precompiling libcxxwrap_julia_jll [3eaa8342-bff7-56a5-9981-c04077f7cee7] (cache misses: invalid header (4))

julia> println.(filter(x -> contains(x, "cxx"), dllist()));
/home/bjanssens/.julia/compiled/v1.12/libcxxwrap_julia_jll/9VnAb_MRJjp.so
/home/bjanssens/.julia/artifacts/9a7be4f65e83c37ef55fd1b9e2e6b3361fd0a483/lib/libcxxwrap_julia.so
/home/bjanssens/.julia/artifacts/9a7be4f65e83c37ef55fd1b9e2e6b3361fd0a483/lib/libcxxwrap_julia_stl.so

I have tested this with an Overrides.toml both in ~/.julia/artifacts and in usr/local/share/julia/artifacts/ in the Julia build dir.

staticfloat commented 2 days ago

This feature works as expected for me with latest master (f2558c461c). In particular, I:

  1. Built latest julia from a clean checkout
  2. Created an Overrides.toml file:
    $ cat ~/.julia/artifacts/Overrides.toml 
    [3eaa8342-bff7-56a5-9981-c04077f7cee7]
    libcxxwrap_julia = "/home/bjanssens/src/build/libcxxwrap_julia"
  3. Created a new project in /tmp, and added libcxxwrap_julia_jll, which failed precompilation with the following error:
    ERROR: LoadError: Artifact "libcxxwrap_julia" was not found by looking in the path "/home/bjanssens/src/build/libcxxwrap_julia". Check that your `Overrides.toml` file is correct (https://pkgdocs.julialang.org/v1/artifacts/#Overriding-artifact-locations).