Thread overview
[Issue 20915] __traits(allMembers) results include custom version identifiers, which is unusable
Jun 09, 2020
Stanislav Blinov
Jun 09, 2020
Basile-z
Jun 10, 2020
Basile-z
Jun 10, 2020
Dlang Bot
Jun 10, 2020
Walter Bright
Jun 10, 2020
Basile-z
Jun 10, 2020
Dlang Bot
Jun 11, 2020
Dlang Bot
Apr 09, 2021
Dlang Bot
June 09, 2020
https://issues.dlang.org/show_bug.cgi?id=20915

Stanislav Blinov <stanislav.blinov@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stanislav.blinov@gmail.com

--- Comment #1 from Stanislav Blinov <stanislav.blinov@gmail.com> ---
Instead of

static if (!is(mixin(member) == module) && !(is(mixin(member))))

use

static if (is(typeof(mixin(member))))

--
June 09, 2020
https://issues.dlang.org/show_bug.cgi?id=20915

--- Comment #2 from Basile-z <b2.temp@gmx.com> ---
thanks Stanislav, that fixes the problem I encountered in particular.

Generally speaking the issue is still valid. There's no way to detect that a member is a version identifier so using it this way:

   mixin("version(", member, ")");

is not possible.

--
June 10, 2020
https://issues.dlang.org/show_bug.cgi?id=20915

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--
June 10, 2020
https://issues.dlang.org/show_bug.cgi?id=20915

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@NilsLankila created dlang/dmd pull request #11255 "fix issue 20915 - add support for `is(identifier == version)`" fixing this issue:

- fix issue 20915 - add support for `is(identifier == version)`

  This fills the small gap that existed because `__traits(allMembers)` could
return the identifiers of the `VersionSymbol`s defined in the source but there
was no way to identify them as such.

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

--
June 10, 2020
https://issues.dlang.org/show_bug.cgi?id=20915

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #4 from Walter Bright <bugzilla@digitalmars.com> ---
__traits(allMembers) shouldn't be picking up version identifiers.

--
June 10, 2020
https://issues.dlang.org/show_bug.cgi?id=20915

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|pull                        |
           Severity|enhancement                 |major

--
June 10, 2020
https://issues.dlang.org/show_bug.cgi?id=20915

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
@NilsLankila created dlang/dmd pull request #11260 "fix issue 20915 - exclude version and debug identifier from `__traits(allMembers)` results" fixing this issue:

- fix issue 20915 - exclude version and debug identifier from
`__traits(allMembers)` results

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

--
June 11, 2020
https://issues.dlang.org/show_bug.cgi?id=20915

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

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

--- Comment #6 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #11260 "fix issue 20915 - exclude version and debug identifier from `__traits(allMembers)` results" was merged into master:

- fba63812c40ba01ff0c1fd09a238233a9eff9a90 by Nils Lankila:
  fix issue 20915 - exclude version and debug identifier from
`__traits(allMembers)` results

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

--
April 09, 2021
https://issues.dlang.org/show_bug.cgi?id=20915

--- Comment #7 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #12411 "[dmd-cxx] fix Issue 21813 - [REG-master] Bootstrap broken from dmd-cxx baseline" was merged into dmd-cxx:

- 6dc21d3fcbee214b8aa73b707ad0e16236425c2c by Nils Lankila:
  [dmd-cxx] fix issue 20915 - exclude version and debug identifier from
results

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

--