-
-
Notifications
You must be signed in to change notification settings - Fork 387
Add a DEPRECATED macro for a consistent style of deprecation messages #2308
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
base: master
Are you sure you want to change the base?
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. |
f984a67 to
88d8a3a
Compare
|
Do we really need something so loud? What's wrong with the red text that we've been using for ages now? It's already arguably pretty obnoxious, and this is far worse. |
|
Red background is too much. Maybe red border + text? |
|
I suppose a related question that maybe should affect the DIP on deprecations is which release should be listed in the documentation. The way that I've normally handled it is to say that the symbol would be removed in the release that it's removed from the documentation, which makes it easy to figure out when it should be removed from the documentation but has sometimes had the downside of confusing folks about how long the deprecation cycle is. So, maybe we should just be listing when it will be removed from Phobos and then remove it from the documentation the appropriate number of releases ahead of that release. If we have a standard number of releases for the deprecation cycle as proposed in the DIP, then counting back should then be easy enough. |
88d8a3a to
b6fc3a3
Compare
|
FWIW I was inspired by this from the NodeJs documentation: https://nodejs.org/api/assert.html#assert_legacy_mode
Like this?
Hard to read (it's completely in red) + easier to grep + plus consistent "experience".
That's an excellent question (!) and should definitely be defined by the DIP. |
|
Yes, that looks much better. Could you post a larger screenshot with how it looks in the context of the surrounding definitions? |
|
I think a good way to quantify this is that the warning should catch your eye when you're reading the symbol's definition, but not be loud enough that it distracts you while you're scrolling through the symbol list. With that in mind I think it's still too loud, what do you think? |



Motivation:
https://dlang.org/phobos-prerelease/std_functional.html#.binaryReverseArgs
https://dlang.org/phobos/std_traits.html#.isConvertibleToString
https://dlang.org/phobos/std_c_stdlib.html
https://dlang.org/phobos/std_datetime.html#.AutoStart
https://dlang.org/phobos/std_datetime_stopwatch.html
https://dlang.org/phobos/std_exception.html#.enforceEx
Preview:
Mobile:
In Ddoc:
CC @JackStouffer @jmdavis
See also: dlang/DIPs#108