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

improve error message when artifact not found #46264

Merged
merged 1 commit into from
Aug 9, 2022

Conversation

simeonschaub
Copy link
Member

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

`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
@simeonschaub simeonschaub added artifacts error messages Better, more actionable error messages labels Aug 5, 2022
@staticfloat
Copy link
Member

This is fine by me, but I will note that it's not a very user-friendly function, and it's quite rare for people to be using artifacts that don't belong to a package. What is the usecase for that?

@simeonschaub
Copy link
Member Author

Where this comes up is interactive usage of ArtifactUtils, where you might want to test the artifact in the same session. On previous Julia versions, just doing Pkg.instantiate() as mentioned was indeed enough, but that's not enough anymore.

@staticfloat
Copy link
Member

Yeah, I think Pkg.instantiate() used to fall back to searching the current directory if it couldn't find any other Artifacts.toml file. Alright, we can merge this, but if it ends up confusing too many users, we may remove it in the future. :)

@staticfloat staticfloat merged commit 686afd3 into master Aug 9, 2022
@staticfloat staticfloat deleted the sds/ensure_artifact_installed branch August 9, 2022 15:51
ffucci pushed a commit to ffucci/julia that referenced this pull request 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 pull request 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
artifacts error messages Better, more actionable error messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants