Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't download artifact when overwritten via Overrides.toml #2664

Open
carstenbauer opened this issue Jul 6, 2021 · 1 comment · May be fixed by #3076
Open

Don't download artifact when overwritten via Overrides.toml #2664

carstenbauer opened this issue Jul 6, 2021 · 1 comment · May be fixed by #3076

Comments

@carstenbauer
Copy link
Member

carstenbauer commented Jul 6, 2021

Came up over at MKL.jl here.

Currently, if you use Overrides.toml to point Julia to a custom artifact Pkg will still eagerly download the original artifact and then just not use it afterwards.

Example: IntelOpenMP_jll:

Overrides.toml

[1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0]
IntelOpenMP = "/path/to/my/custom/artifact/" # contains lib/libiomp5.so and  lib/libiompstubs5.so

Pkg still downloads the original artifact:

(@v1.8) pkg> add IntelOpenMP_jll
   Resolving package versions...
  Downloaded artifact: IntelOpenMP
    Updating `~/.julia/environments/v1.8/Project.toml`
  [1d5cc7b8] + IntelOpenMP_jll v2018.0.3+2
    Updating `~/.julia/environments/v1.8/Manifest.toml`
  [1d5cc7b8] + IntelOpenMP_jll v2018.0.3+2
Precompiling project...
  1 dependency successfully precompiled in 1 seconds (9 already precompiled)
➜  bauerc@ln-0001 .julia/artifacts  ls
947793e42b663bacd09f00d96aa96a47095f3b1c  Overrides.toml
➜  bauerc@ln-0001 .julia/artifacts  cd 947793e42b663bacd09f00d96aa96a47095f3b1c/lib/; ls
libiomp5.so  libiompstubs5.so

But doesn't use it (that's desired of course 😄):

julia> IntelOpenMP_jll.libiomp_path
"/path/to/my/custom/artifact/lib/libiomp5.so"

Doesn't happen for lazy artifacts

If an artifact is marked as lazy = true the unnecessary download of the original artifact doesn't happen, as desired. For example, MKL_jll.jl is lazy.

Desired behaviour:
IMO, if an artifact is overwritten in an Overrides.toml, the original artifact should not be downloaded. Is there something we can do about this?

@mkitti
Copy link
Contributor

mkitti commented Jan 4, 2022

I have encountered interest in this feature downstream. This would make the option to use conda-forge dependencies easier, for example, which may be necessary in cases where cross-compilation is not available or when interop is paramount.

I thought Artifacts was moving from to Julia proper and out of Pkg.jl. Is this is the right place to have this issue?

KristofferC pushed a commit that referenced this issue May 3, 2022
@KristofferC KristofferC linked a pull request May 3, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants