I don’t understand why an artifact specified in the Artifacts.toml
file doesn’t become available after instantiating an environment:
shell> ls
Artifacts.toml Manifest.toml Project.toml
shell> cat Artifacts.toml
# a simple Artifacts.toml file
[socrates]
git-tree-sha1 = "43563e7631a7eafae1f9f8d9d332e3de44ad7239"
[[socrates.download]]
url = "https://github.com/staticfloat/small_bin/raw/master/socrates.tar.gz"
sha256 = "e65d2f13f2085f2c279830e863292312a72930fee5ba3c792b14c33ce5c5cc58"
(name) pkg> instantiate # here I thought the artifact would get "installed"
julia> using Artifacts
julia> artifact"socrates"
ERROR: Artifact "socrates" was not installed correctly. Try `using Pkg; Pkg.instantiate()` to re-install all missing resources.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] _artifact_str(__module__::Module, artifacts_toml::String, name::SubString{String}, path_tail::String, artifact_dict::Dict{String, Any}, hash::Base.SHA1, platform::Base.BinaryPlatforms.Platform, lazyartifacts::Any)
@ Artifacts ~/julia/usr/share/julia/stdlib/v1.7/Artifacts/src/Artifacts.jl:551
[3] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base ./essentials.jl:716
[4] invokelatest(::Any, ::Any, ::Vararg{Any})
@ Base ./essentials.jl:714
[5] top-level scope
@ ~/julia/usr/share/julia/stdlib/v1.7/Artifacts/src/Artifacts.jl:680
Note, this is not used in a package, but in a project that is not a package.