-
-
Couldn't load subscription status.
- Fork 283
allow for a metadata table in a Package.toml in a registry and have a deprecated sub-table indicate the package is deprecated
#4433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
these packages will not tab complete to and will show up as deprecated in pkg status Fixes #2194
|
I like this. One thought: is it worth having the optional ability to suggest a different package as a successor? I'm thinking this could be useful in cases like |
So yes, there is a possibility to add something like a successor or a reason for deprecation or whatever. But for the initial PR I didn't want to spend too much time thinking about exactly what metadata should be included or how it should be presented. But I guess |
Entirely reasonable. Attaching some sort of brief message is the only thing I can think of beyond just having a list of packages. Whether it be now or some point in the future, I think just having one free-form field might suffice (predicated on the main way the message is used being shoving it in package developers' faces, I don't think automated tooling would need to know anything more than "package X is deprecated"). |
|
I personally would prefer a more general solution for metadata (or "tags", as Eric has suggested) in the registry (cc: @ericphanson @mbauman), instead of just having syntax specific for package deprecation only. |
|
How is this not "general"? It is just a key in the TOML file. Other metadata would have other keys. Or am I missing something? |
|
Yeah, but it's a good motivating example, because it's quite clear that the additional metadata beyond the deprecated "tag" would be quite valuable. I kinda like aggregating all these sorts of "informational" metadata into single top-level key, but this means that it's something more complicated than the simple |
|
This is also per package, whereas some metadata should probably be per-version |
I am a bit confused but do I understand it right that if I call this table Metadata for versions would presumably go into the |
|
I’m not necessarily against it, just trying to think through the relative benefits of this vs something different. It just feels like commingling (potentially) arbitrary tag names alongside semantically meaningful key names will cause us headaches in the future. |
|
I'm fine putting it within a |
|
Yeah, I think it'd seem prudent to add an extra level of nesting here. Then there's a choice — this could either be an array of tables or a table of tables. That is, either: [[metadata]]
name = "deprecated"
reason = "This package is no longer maintained"
alternative = "Example"
[[metadata]]
name = "special"Or: [metadata.deprecated]
reason = "This package is no longer maintained"
alternative = "Example"
[metadata.special]I think I slightly favor the table of tables. And I think I may slightly prefer the name |
Me too, 100% |
|
Last commit makes that change |
|
added docs as well |
deprecated table in a Package.toml in a registrytags table in a Package.toml in a registry and have a deprecated sub-table indicate the package is deprecated
I'm a little worried that "tags" might make people think of Git tags, but that might not be enough of a problem to justify using the longer "metadata". |
|
FWIW I also think metadata is more apt. |
|
I think metadata seems reasonable, that also leaves room if we want metadata.tags to be something more specific later |
tags table in a Package.toml in a registry and have a deprecated sub-table indicate the package is deprecatedmetadata table in a Package.toml in a registry and have a deprecated sub-table indicate the package is deprecated
c1efc3f to
4567ab5
Compare
|
I like the way it suggests a different package to use. Idea: Instead of just suggesting As a real-world example:
Because in this example, we wouldn't want users to inadvertently install an older version of JSON.jl. This might be too much added complexity, though. |
|
Another idea: If |
4567ab5 to
adb19f3
Compare
A prompt has the risk to become annoying, and we already print the |
| write( | ||
| joinpath(regpath, "Example", "Deps.toml"), """ | ||
| ["0.5"] | ||
| julia = "0.6-1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just a completely bogus entry, the Deps.toml file don't have compat info like that. It has name -> uuid entries, e.g.:
https://github.com/JuliaRegistries/General/blob/master/A/AAindex/Deps.toml
I guess nothing read that file before.
adb19f3 to
d7327f2
Compare

These packages will not tab complete to and will show up as deprecated in pkg status. The
[deprecation] table can have arbitrary keys but Pkg itself does not use any of them right now.Fixes #2194
cc @oxinabox