Thread overview
[Issue 18617] need __traits(deprecated, expr) to check whether an expression would trigger deprecation
Mar 15, 2018
Timothee Cour
Mar 15, 2018
Timothee Cour
Sep 08, 2019
Dlang Bot
Sep 10, 2019
Dlang Bot
Jan 03, 2021
Dlang Bot
March 15, 2018
https://issues.dlang.org/show_bug.cgi?id=18617

Timothee Cour <timothee.cour2@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timothee.cour2@gmail.com

--- Comment #1 from Timothee Cour <timothee.cour2@gmail.com> ---
NOTE: IMO std.traits.isDeprecated is not applicable for this use case

--
March 15, 2018
https://issues.dlang.org/show_bug.cgi?id=18617

Timothee Cour <timothee.cour2@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|Mac OS X                    |All

--
September 08, 2019
https://issues.dlang.org/show_bug.cgi?id=18617

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@Geod24 created dlang/dmd pull request #10398 "Issue 18617 - Need ability to check if a symbol would trigger a deprecation" mentioning this issue:

- Issue 18617 - Need ability to check if a symbol would trigger a deprecation

  ... without triggering it !
  __traits(isDeprecated, Symbol) currently triggers a deprecation message,
  which makes it pretty useless for library writers.
  Note that a pitfall is that a library would fail to get a deprecation
message,
  leading to a failure to remove the access to a symbol if the symbol is
hard-coded.
  However, the prime usage of __traits(isDeprecated) is for meta-programming,
  hence it shouldn't be a problem in practice.

https://github.com/dlang/dmd/pull/10398

--
September 10, 2019
https://issues.dlang.org/show_bug.cgi?id=18617

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #10398 "Fix Issue 18617 - Need ability to check if a symbol would trigger a deprecation" was merged into master:

- 54574166b70cb0fd03cf5305833c4088923b7976 by Geod24:
  Fix Issue 18617 - Need ability to check if a symbol would trigger a
deprecation

  ... without triggering it !
  __traits(isDeprecated, Symbol) currently triggers a deprecation message,
  which makes it pretty useless for library writers.
  Note that a pitfall is that a library would fail to get a deprecation
message,
  leading to a failure to remove the access to a symbol if the symbol is
hard-coded.
  However, the prime usage of __traits(isDeprecated) is for meta-programming,
  hence it shouldn't be a problem in practice.

https://github.com/dlang/dmd/pull/10398

--
January 03, 2021
https://issues.dlang.org/show_bug.cgi?id=18617

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #12093 "[dmd-cxx] Backport more recent traits to the C++ port" was merged into dmd-cxx:

- 596401fa8d815314f1d34540c52075df4de7a713 by Geod24:
  [dmd-cxx] Fix Issue 18617 - Need ability to check if a symbol would trigger a
deprecation without triggering it

https://github.com/dlang/dmd/pull/12093

--