Skip to content

Commit e3ec238

Browse files
committed
store deprecated table under a tags table
1 parent a0c774c commit e3ec238

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Registry/registry_instance.jl

Lines changed: 4 additions & 3 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 [deprecated]:
51+
# Package.toml [tags.deprecated]:
5252
deprecated::Union{Dict{String, Any}, Nothing}
5353

5454
# Versions.toml:
@@ -205,9 +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 [deprecated] table indicates the package is deprecated
208+
# The presence of a [tags.deprecated] table indicates the package is deprecated
209209
# We store the raw table to allow other tools to use the metadata
210-
deprecated = get(d_p, "deprecated", nothing)::Union{Nothing, Dict{String, Any}}
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
211212

212213
# Versions.toml
213214
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 [deprecated] table
363+
# Create deprecated package with [tags.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-
[deprecated]
370+
[tags.deprecated]
371371
reason = "This package is no longer maintained"
372372
alternative = "Example"
373373
"""

0 commit comments

Comments
 (0)