Thread overview
[Issue 19058] __traits(getUnitTests) stops working with separate compilation in dmd 2.081.0
Jul 06, 2018
Atila Neves
Jul 06, 2018
Atila Neves
Aug 22, 2018
Martin Nowak
Aug 22, 2018
Mike Franklin
July 05, 2018
https://issues.dlang.org/show_bug.cgi?id=19058

johanengelen@weka.io changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |johanengelen@weka.io

--- Comment #1 from johanengelen@weka.io ---
Do you have a testcase ?

--
July 06, 2018
https://issues.dlang.org/show_bug.cgi?id=19058

--- Comment #2 from Atila Neves <atila.neves@gmail.com> ---
Just compile two files separately with a unittest on the same line and column and have a third import the two and use __traits(getUnitTests). My failing test case is adding another imported module to the existing test at test/runnable/issue16995.d.

Also see discussion here at the forum:

https://forum.dlang.org/post/krkinfxikztqvudjopao@forum.dlang.org

--
July 06, 2018
https://issues.dlang.org/show_bug.cgi?id=19058

--- Comment #3 from Atila Neves <atila.neves@gmail.com> ---
I've taken a look at the code (I was trying to fix this). As mentioned before, counters can never work. The solution will have to go through using the absolute path of the location since the module doesn't "exist" until semantic.

This of course is redundant with respect to symbols colliding, because they won't - they'll get mangled according to their modules.

I'd rather only see adding the absolute file path if there are any collisions _and_ the identifiers are in the same module/filepath.

--
August 22, 2018
https://issues.dlang.org/show_bug.cgi?id=19058

Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code@dawg.eu

--- Comment #4 from Martin Nowak <code@dawg.eu> ---
Related to issue 14894

--
August 22, 2018
https://issues.dlang.org/show_bug.cgi?id=19058

Mike Franklin <slavo5150@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |slavo5150@yahoo.com
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=14894

--
August 27, 2018
https://issues.dlang.org/show_bug.cgi?id=19058

--- Comment #5 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/3a686c04cd777d89cf9343ab39dacd600934ffcb Fix issue 19058 - __traits(getUnitTests) works again with separate compilation

https://github.com/dlang/dmd/commit/758c5ac13c1687ff5c8722eeb7bce86eb7f1c3b5 Merge pull request #8542 from atilaneves/fix-traits-get-unittest

Fix issue 19058 - __traits(getUnitTests) works again with separate co…

--
August 27, 2018
https://issues.dlang.org/show_bug.cgi?id=19058

github-bugzilla@puremagic.com changed:

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

--