Skip to content

Commit

Permalink
Add basic docs for (Lazy)Artifacts stdlibs (#39073)
Browse files Browse the repository at this point in the history
(cherry picked from commit debf26e)
  • Loading branch information
fingolfin authored and KristofferC committed Jan 26, 2021
1 parent a5d3675 commit bfae07c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
21 changes: 21 additions & 0 deletions stdlib/Artifacts/docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Artifacts

```@meta
DocTestSetup = :(using Artifacts)
```

Starting with Julia 1.6, the artifacts support has moved from `Pkg.jl` to Julia itself.
Until proper documentation can be added here, you can learn more about artifacts in the
`Pkg.jl` manual at <https://julialang.github.io/Pkg.jl/v1/artifacts/>.

!!! compat "Julia 1.6"
Julia's artifacts API requires at least Julia 1.6. In Julia
versions 1.3 to 1.5, you can use `Pkg.Artifacts` instead.


```@docs
Artifacts.artifact_meta
Artifacts.artifact_hash
Artifacts.find_artifacts_toml
Artifacts.@artifact_str
```
4 changes: 2 additions & 2 deletions stdlib/Artifacts/src/Artifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -551,15 +551,15 @@ function _artifact_str(__module__, artifacts_toml, name, path_tail, artifact_dic
error("Artifact $(repr(name)) was not installed correctly. Try `using Pkg; Pkg.instantiate()` to re-install all missing resources.")
end

"""
raw"""
split_artifact_slash(name::String)
Splits an artifact indexing string by path deliminters, isolates the first path element,
returning that and the `joinpath()` of the remaining arguments. This normalizes all path
separators to the native path separator for the current platform. Examples:
# Examples
```jldoctest
```jldoctest; setup = :(using Artifacts: split_artifact_slash)
julia> split_artifact_slash("Foo")
("Foo", "")
Expand Down
10 changes: 10 additions & 0 deletions stdlib/LazyArtifacts/docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Lazy Artifacts

```@meta
DocTestSetup = :(using LazyArtifacts)
```

In order for a package to download artifacts lazily, `LazyArtifacts` must be
explicitly listed as a dependency of that package.

For further information on artifacts, see [Artifacts](@ref).

0 comments on commit bfae07c

Please sign in to comment.