Skip to content

Commit bfae07c

Browse files
fingolfinKristofferC
authored andcommitted
Add basic docs for (Lazy)Artifacts stdlibs (#39073)
(cherry picked from commit debf26e)
1 parent a5d3675 commit bfae07c

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

stdlib/Artifacts/docs/src/index.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Artifacts
2+
3+
```@meta
4+
DocTestSetup = :(using Artifacts)
5+
```
6+
7+
Starting with Julia 1.6, the artifacts support has moved from `Pkg.jl` to Julia itself.
8+
Until proper documentation can be added here, you can learn more about artifacts in the
9+
`Pkg.jl` manual at <https://julialang.github.io/Pkg.jl/v1/artifacts/>.
10+
11+
!!! compat "Julia 1.6"
12+
Julia's artifacts API requires at least Julia 1.6. In Julia
13+
versions 1.3 to 1.5, you can use `Pkg.Artifacts` instead.
14+
15+
16+
```@docs
17+
Artifacts.artifact_meta
18+
Artifacts.artifact_hash
19+
Artifacts.find_artifacts_toml
20+
Artifacts.@artifact_str
21+
```

stdlib/Artifacts/src/Artifacts.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,15 +551,15 @@ function _artifact_str(__module__, artifacts_toml, name, path_tail, artifact_dic
551551
error("Artifact $(repr(name)) was not installed correctly. Try `using Pkg; Pkg.instantiate()` to re-install all missing resources.")
552552
end
553553

554-
"""
554+
raw"""
555555
split_artifact_slash(name::String)
556556
557557
Splits an artifact indexing string by path deliminters, isolates the first path element,
558558
returning that and the `joinpath()` of the remaining arguments. This normalizes all path
559559
separators to the native path separator for the current platform. Examples:
560560
561561
# Examples
562-
```jldoctest
562+
```jldoctest; setup = :(using Artifacts: split_artifact_slash)
563563
julia> split_artifact_slash("Foo")
564564
("Foo", "")
565565
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Lazy Artifacts
2+
3+
```@meta
4+
DocTestSetup = :(using LazyArtifacts)
5+
```
6+
7+
In order for a package to download artifacts lazily, `LazyArtifacts` must be
8+
explicitly listed as a dependency of that package.
9+
10+
For further information on artifacts, see [Artifacts](@ref).

0 commit comments

Comments
 (0)