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

Readme example is not working #13

Closed
mroavi opened this issue Aug 5, 2022 · 2 comments
Closed

Readme example is not working #13

mroavi opened this issue Aug 5, 2022 · 2 comments

Comments

@mroavi
Copy link

mroavi commented Aug 5, 2022

Hello. I haven't been able to get the first example presented in the README to work. I'm using Julia Version 1.7.2 (2022-02-06).

I created and instantiated a project, added ]add ArtifactUtils, and ran the following code:

using ArtifactUtils, Artifacts # Artifacts provides the artifact string macro

add_artifact!(
              "Artifacts.toml",
              "JuliaMono",
              "https://github.com/cormullion/juliamono/releases/download/v0.030/JuliaMono.tar.gz",
              force=true,
             )

import Pkg; Pkg.instantiate() # to install the artifact

artifact"JuliaMono"

which outputs the following error (triggered by the last line):

ERROR: LoadError: Artifact "JuliaMono" was not installed correctly. Try `using Pkg; Pkg.instantiate()` to re-install all missing resources.

Running using Pkg; Pkg.instantiate() does not give an error but the artifact is not installed (I verified that 6c460cf2eccecd24499618112adbbe7e403fa1ee is not in ~/.julia/artifacts).

@simeonschaub
Copy link
Member

simeonschaub commented Aug 5, 2022

Ah, this now needs to call Pkg.ensure_artifact_installed instead of Pkg.instantiate. I have updated the README accordingly, could you let me know if that works for you?

@mroavi
Copy link
Author

mroavi commented Aug 5, 2022

It works now! Thanks a lot!

@mroavi mroavi closed this as completed Aug 5, 2022
simeonschaub added a commit to JuliaLang/julia that referenced this issue Aug 5, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
`Pkg.instantiate()` does not fix the issue anymore if the artifact is
not part of a package, so this points users to
`Pkg.ensure_artifact_installed`.

Ref JuliaPackaging/ArtifactUtils.jl#13
staticfloat pushed a commit to JuliaLang/julia that referenced this issue Aug 9, 2022
`Pkg.instantiate()` does not fix the issue anymore if the artifact is
not part of a package, so this points users to
`Pkg.ensure_artifact_installed`.

Ref JuliaPackaging/ArtifactUtils.jl#13
ffucci pushed a commit to ffucci/julia that referenced this issue Aug 11, 2022
`Pkg.instantiate()` does not fix the issue anymore if the artifact is
not part of a package, so this points users to
`Pkg.ensure_artifact_installed`.

Ref JuliaPackaging/ArtifactUtils.jl#13
pcjentsch pushed a commit to pcjentsch/julia that referenced this issue Aug 18, 2022
`Pkg.instantiate()` does not fix the issue anymore if the artifact is
not part of a package, so this points users to
`Pkg.ensure_artifact_installed`.

Ref JuliaPackaging/ArtifactUtils.jl#13
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

No branches or pull requests

2 participants