You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/registries.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,39 @@ are the following files: `Compat.toml`, `Deps.toml`, `Package.toml`,
99
99
and `Versions.toml`.
100
100
The formats of these files are described below.
101
101
102
+
### Registry Package.toml
103
+
104
+
The `Package.toml` file contains basic metadata about the package, such as its name, UUID, repository URL, and optional metadata.
105
+
106
+
#### Package metadata
107
+
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.
109
+
110
+
#### Deprecated packages
111
+
112
+
One use of the `[metadata]` table is to mark packages as deprecated using `[metadata.deprecated]`. Deprecated packages will:
113
+
- Show as `[deprecated]` in package status output
114
+
- Be excluded from tab-completion suggestions
115
+
- Still be installable and usable
116
+
117
+
The `[metadata.deprecated]` table can contain arbitrary metadata fields. Two special fields are recognized by Pkg and displayed when using `pkg> status --deprecated`:
118
+
-`reason`: A string explaining why the package is deprecated
119
+
-`alternative`: A string suggesting a replacement package
120
+
121
+
Example:
122
+
123
+
```toml
124
+
name = "MyPackage"
125
+
uuid = "..."
126
+
repo = "..."
127
+
128
+
[metadata.deprecated]
129
+
reason = "This package is no longer maintained"
130
+
alternative = "ReplacementPackage"
131
+
```
132
+
133
+
Other fields can be added to `[metadata.deprecated]` for use by registries or other tools.
134
+
102
135
### Registry Compat.toml
103
136
104
137
The `Compat.toml` file has a series of blocks specifying version
0 commit comments