Skip to content

Commit 595ffee

Browse files
committed
tags -> metadata
1 parent 52943f8 commit 595ffee

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

docs/src/registries.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,32 +101,32 @@ The formats of these files are described below.
101101

102102
### Registry Package.toml
103103

104-
The `Package.toml` file contains basic metadata about the package, such as its name, UUID, repository URL, and optional tags.
104+
The `Package.toml` file contains basic metadata about the package, such as its name, UUID, repository URL, and optional metadata.
105105

106-
#### Package tags
106+
#### Package metadata
107107

108-
The `[tags]` table in `Package.toml` provides a location for metadata about the package that doesn't fit into the other registry files. This is an extensible framework for adding package-level metadata.
108+
The `[metadata]` table in `Package.toml` provides a location for metadata about the package that doesn't fit into the other registry files. This is an extensible framework for adding package-level metadata.
109109

110110
#### Deprecated packages
111111

112-
One use of the `[tags]` table is to mark packages as deprecated using `[tags.deprecated]`. Deprecated packages will:
112+
One use of the `[metadata]` table is to mark packages as deprecated using `[metadata.deprecated]`. Deprecated packages will:
113113
- Show as `[deprecated]` in package status output
114114
- Be excluded from tab-completion suggestions
115115
- Still be installable and usable
116116

117-
The `[tags.deprecated]` table can contain arbitrary metadata fields. Common fields include:
117+
The `[metadata.deprecated]` table can contain arbitrary metadata fields. Common fields include:
118118

119119
```toml
120120
name = "MyPackage"
121121
uuid = "..."
122122
repo = "..."
123123

124-
[tags.deprecated]
124+
[metadata.deprecated]
125125
reason = "This package is no longer maintained"
126126
alternative = "ReplacementPackage"
127127
```
128128

129-
The specific fields within `[tags.deprecated]` are not currently used by Pkg itself, but are stored to allow other tools and registries to utilize this metadata.
129+
The specific fields within `[metadata.deprecated]` are not currently used by Pkg itself, but are stored to allow other tools and registries to utilize this metadata.
130130

131131
### Registry Compat.toml
132132

src/Registry/registry_instance.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct PkgInfo
4848
repo::Union{String, Nothing}
4949
subdir::Union{String, Nothing}
5050

51-
# Package.toml [tags.deprecated]:
51+
# Package.toml [metadata.deprecated]:
5252
deprecated::Union{Dict{String, Any}, Nothing}
5353

5454
# Versions.toml:
@@ -205,10 +205,10 @@ function init_package_info!(pkg::PkgEntry)
205205
repo = get(d_p, "repo", nothing)::Union{Nothing, String}
206206
subdir = get(d_p, "subdir", nothing)::Union{Nothing, String}
207207

208-
# The presence of a [tags.deprecated] table indicates the package is deprecated
208+
# The presence of a [metadata.deprecated] table indicates the package is deprecated
209209
# We store the raw table to allow other tools to use the metadata
210-
tags = get(d_p, "tags", nothing)::Union{Nothing, Dict{String, Any}}
211-
deprecated = tags !== nothing ? get(tags, "deprecated", nothing)::Union{Nothing, Dict{String, Any}} : nothing
210+
metadata = get(d_p, "metadata", nothing)::Union{Nothing, Dict{String, Any}}
211+
deprecated = metadata !== nothing ? get(metadata, "deprecated", nothing)::Union{Nothing, Dict{String, Any}} : nothing
212212

213213
# Versions.toml
214214
d_v = custom_isfile(pkg.in_memory_registry, pkg.registry_path, joinpath(pkg.path, "Versions.toml")) ?

test/registry.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,14 +360,14 @@ end
360360
)
361361
write(joinpath(regpath, "Registry.toml"), registry_toml)
362362

363-
# Create deprecated package with [tags.deprecated] table
363+
# Create deprecated package with [metadata.deprecated] table
364364
write(
365365
joinpath(regpath, "DeprecatedExample", "Package.toml"), """
366366
name = "DeprecatedExample"
367367
uuid = "11111111-1111-1111-1111-111111111111"
368368
repo = "https://github.com/test/DeprecatedExample.jl.git"
369369
370-
[tags.deprecated]
370+
[metadata.deprecated]
371371
reason = "This package is no longer maintained"
372372
alternative = "Example"
373373
"""

0 commit comments

Comments
 (0)