On Sunday, 7 July 2019 at 10:09:50 UTC, Johannes Pfau wrote:
Am Sun, 07 Jul 2019 08:06:57 +0000 schrieb uranuz:
After updating compiler to 2.087 I got a lot of deprecation
warnings
linked to std.json module. I have found all of the usages of
deprecated
symbols in my project and changed them to the new ones. All
these
warnings are about changing JSON_TYPE to JSONType
JSON_TYPE.STRING to
JSONType.string and etc...
But after eleminating deprecated symbols from my project I
still have
deprecation warnings. Seems that these symbols being accessed
from
Phobos, because I am pretty sure that I don't have other
external
dependencies that use std.json. The problem it that because of
this
`spamming` messages I can miss `real` deprecation warnings. Is
there
some way to `fix` it? The is some part of compiler output (all
of it is
too long): /usr/include/dmd/phobos/std/conv.d(987,34):
Deprecation: enum
member `std.json.JSONType.INTEGER` is deprecated - Use .integer
/usr/include/dmd/phobos/std/conv.d(987,34): Deprecation: enum
member
I think phobos does not explicitly use these deprecated
symbols, but the reflection code in format triggers the
deprecation messages:
import std.json, std.stdio;
void main()
{
JSONType c;
writefln("%s", c);
}
I'm not sure if this can be solved, maybe deprecated members
can be explicitly ignored in format, but maybe the reflection
code itself is triggering the deprecation (which would then
probably be a DMD bug).
Yes. It looks like it, because seems that `format` and `conv` use
the same approach to convert data to string and in process of
iterating reflection code `touches` deprecated symbols and it
`starts to smell`... Maybe some special `compilation context`
should exists where these deprecation warnings are ignored or
ignore them when we access or iterate symbols using __trait(...)
Should I file a bugreport?