Add compatibility index for modules#1778
Conversation
|
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
|
IMHO we don't need the stable markers or the compatibility index. The deprecated/experimental warnings, as they appear in your compatibility index screenshot, look great though - how about using those as is on the modules themselves? |
|
We must have a "Stability: Obsolete" which predates deprecation. It means the code works and does not issue deprecated warnings but a superior solution (EXISTING!!!) is preferred for new code. |
Sure that should be easy enough: (also added it to the PR)
Well, just because I add the macros here, doesn't mean that we need to apply all of them for Phobos.
I guess some people want to know what e.g. "Obsolete" means precisely, but there's no point in always showing the long text. Is this page hurting us? |
No, but it seems redundant. I don't think the boilerplate is an issue. Also, the box itself would be a good place to mention the recommended replacements. |
d8877fc to
e5952f2
Compare
I'm thinking, modules which may seem well designed today may not appear so 10 years from now :) |
|
One other thing: for each artifact we should be able to automatically get the version that introduced it and (for removed ones) the version that made it unavailable. Perhaps a topic for a different PR. |
That shouldn't be too difficult. What to do with the result, show it on dlang.org for all symbols somehow? |
|
Yes, it should be easy as people browse some library artifact to get extra info about it including this version stuff. |
e5952f2 to
345e707
Compare
|
On Wed, Jun 28, 2017 at 10:57:50AM -0700, Andrei Alexandrescu wrote:
One other thing: for each artifact we should be able to automatically get the version that introduced it and (for removed ones) the version that made it unavailable. Perhaps a topic for a different PR.
I think we should also use the `History:` section in ddoc to document changes so like "argument foo introduced in June 2017"... generating it automatically would be good for many things but going forward we could just add it in after merging PRs.
|
Good point. I also removed the "Stability X" everywhere and replaced them with their respective name as the numeric scale is confusing and we can easier extend / modify this scheme without numbering.
We probably want to write 2.075?
Yep, I think this "naive" approach will be a lot easier and can be done once on every release by simply going over the changelog. We just need to remind people to add their changes to the changelog (or respective Bugzilla issue), but hopefully the Dlang-Bot is now loud enough ;-) |
|
So @CyberShadow are we all happy with DEPRECATED, OBSOLETE, EXPERIMENTAL and STABLE to be stability categories? Of course, we can always extend them, but I would like to continue with my goal and document the old & ugly modules in Phobos. Most likely, during this process, we might rework this category schema anyways ;-) |
|
Arghhh, GitHub ate my comment again. Generally speaking this change has a larger scope so it's more up to the BDFLs than me to set the direction, but since you asked for my feedback:
These seem fine to me. I don't think we need stable.
Can we really say that about anything? :) We change / deprecate things even in relatively new modules.
Seems like there are some conflicting goals here - nothing in Phobos is gated behind a compiler flag. Is the intent to use these macros in the spec as well? Still not sure about the compatibility index page - it contains rather little information, and said information could be directly presented in the notice itself..
I suggest to only keep what you need right now to do the above task, i.e. drop the compatibility index and stable macro, and just leave the macros for the notices to be used in Phobos. Notice texts could be:
|
|
BTW, intuitively "obsolete" seems like a stronger term than "deprecated", without prior knowledge I would guess that a module would go stable -> deprecated -> obsolete. I can't think of a better term though. |
|
In C++ "deprecated" (e.g. exception specifications) is stronger than "obsolete" (e.g.strstream). Interestingly http://m-w.com does not list the computer engineering meaning of "deprecated". However, it does suggest that "deprecated" is stronger than "obsolete": https://www.merriam-webster.com/dictionary/deprecated The thesaurus may provide insight into possible alternative terms: https://www.merriam-webster.com/thesaurus/deprecated |
|
The obsolescence text should be: Warning: This module is obsolete and may be superseded in the future. $0 |
|
In fact the way I see it something is obsolete if and only if it already has a better alternative. |
345e707 to
cbb4265
Compare
|
Hmm, maybe before we proceed, let's better have a look on how we would apply and use these messages on Phobos.
or observe etc.
Other ugly modules:
|
|
I think we'd be hasty.
We do NOT mark stuff as obsolete because there are alternatives outside the standard library. |
Is that project still alive? I sent a PR last year and it's still open. Last commit was also last year. |
|
I now realize how my previous comment might have been misunderstood - I assumed "within the standard library" is implied. |
IIRC EMSI uses the library internally, so it's probably not "dead". |
|
Hmm, I guess it's not really relevant here any more but I guess a library may still be used whereas its open source project might be dead, due to dwindling interest of reviewing outside contributions or conflicts of interest. |
That's a strong requirement, hardly anyone want's to introduce a replacement for std.signal.
If there was a much better alternative and everyone in the community knew to use The way you said it makes it sound like a strict rule, while a bit of leeway might be more appropriate. |
|
This discussion suggests that there is not much difference between obsolete and deprecated. |
|
I definitely agree with some flexibility. If std.signal is rendered essentially useless by simple use of language features and idioms, yes let's mark it as obsolete/deprecate/yank. Faster/better alternatives to standard artifacts exist in probably most languages, and for most artifacts. But it's uncommon to throw away the standard implementation on account of that - even for the most egregious cases such as C++ iostreams, which must count as the worst I/O library in the history of humankind. |
|
Love |
9b9b431 to
b7aa893
Compare
|
Alrighty - I rebased this PR to a general concept of a I added a few predefined ones, but we could also remove all of them, and just add |
|
Merging, as it's now just a few macro definitions and CSS rules. |

After my intent to move outdated modules to undeaD failed, here's the suggested way of documenting old modules.
tl;dr: This generalizes the deprecation warnings (and makes them look nicer than for std.xml).
As suggested this is heavily inspired by the way NodeJS marks their modules, but why not learn from successful ideas?
The overview page:
In practice:
Deprecated
Experimental
Stable
And all in one:
CC @MartinNowak @CyberShadow @andralex @JackStouffer