Thread overview
[Issue 11595] __traits(allMembers, packageName) behaves oddly.
Jun 22, 2014
sigod
Nov 28, 2015
blm768@gmail.com
Sep 29, 2022
Dennis
June 22, 2014
https://issues.dlang.org/show_bug.cgi?id=11595

sigod <sigod.mail@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sigod.mail@gmail.com

--- Comment #1 from sigod <sigod.mail@gmail.com> ---
I also encountered this issue: http://forum.dlang.org/thread/ryqyjyinhjkdgnwfluar@forum.dlang.org

--
November 28, 2015
https://issues.dlang.org/show_bug.cgi?id=11595

blm768@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |blm768@gmail.com

--- Comment #2 from blm768@gmail.com ---
A more minimal test case:

---
module main;

import core.thread;

//Broken:
pragma(msg, __traits(allMembers, core));
//Seems to work:
pragma(msg, __traits(allMembers, core.thread));

void main() {}
---

The interesting thing is that the issue only seems to surface for root packages. In the backend source, when working with __traits (see traits.d), most package symbols have been resolved to Package objects, but root package names haven't been fully resolved; they're still Import objects. That's probably related to this issue.

--
September 29, 2022
https://issues.dlang.org/show_bug.cgi?id=11595

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dkorpel@live.nl
         Resolution|---                         |DUPLICATE

--- Comment #3 from Dennis <dkorpel@live.nl> ---
Output has changed:
```
           2.088.1: Success with output:
-----
tuple("object", "core", "rt_tlsgc_init", "rt_tlsgc_destroy", "ScanDg",
"rt_tlsgc_scan", "rt_tlsgc_processGCMarks", "StackGrowsDown", "getpid",
"ThreadException", "ThreadError", "rt_moduleTlsCtor", "rt_moduleTlsDtor",
"_d_eh_swapContext", "_d_eh_swapContextDwarf", "swapContext",
"thread_entryPoint", "suspendCount", "thread_suspendHandler",
"thread_resumeHandler", "Thread", "thread_setGCSignals", "suspendSignalNumber",
"resumeSignalNumber", "thread_init", "_mainThreadStore",
"_d_monitordelete_nogc", "thread_term", "thread_isMainThread",
"thread_attachThis", "attachThread", "thread_detachThis",
"thread_detachByAddr", "thread_detachInstance", "thread_findByAddr",
"thread_setThis", "thread_joinAll", "_sharedStaticDtor_L2427_C1",
"multiThreadedFlag", "callWithStackShell", "suspendDepth", "suspend",
"thread_suspendAll", "resume", "thread_resumeAll", "ScanType",
"ScanAllThreadsFn", "ScanAllThreadsTypeFn", "thread_scanAllType",
"scanAllTypeImpl", "thread_scanAll", "thread_enterCriticalRegion",
"thread_exitCriticalRegion", "thread_inCriticalRegion", "onThreadError",
"IsMarked", "IsMarkedDg", "thread_processGCMarks", "pthread_getattr_np",
"getStackTop", "getStackBottom", "thread_stackTop", "thread_stackBottom",
"ThreadGroup", "AsmX86_64_Posix", "AlignFiberStackTo16Byte", "PAGESIZE",
"PTHREAD_STACK_MIN", "_sharedStaticCtor_L3695_C1", "fiber_entryPoint",
"fiber_switchContext", "Fiber", "ThreadID", "ll_ThreadData", "ll_nThreads",
"ll_pThreads", "ll_lock", "lowlevelLock", "initLowlevelThreads",
"termLowlevelThreads", "ll_removeThread", "createLowLevelThread",
"joinLowLevelThread", "findLowLevelThread")
tuple("object", "core", "rt_tlsgc_init", "rt_tlsgc_destroy", "ScanDg",
"rt_tlsgc_scan", "rt_tlsgc_processGCMarks", "StackGrowsDown", "getpid",
"ThreadException", "ThreadError", "rt_moduleTlsCtor", "rt_moduleTlsDtor",
"_d_eh_swapContext", "_d_eh_swapContextDwarf", "swapContext",
"thread_entryPoint", "suspendCount", "thread_suspendHandler",
"thread_resumeHandler", "Thread", "thread_setGCSignals", "suspendSignalNumber",
"resumeSignalNumber", "thread_init", "_mainThreadStore",
"_d_monitordelete_nogc", "thread_term", "thread_isMainThread",
"thread_attachThis", "attachThread", "thread_detachThis",
"thread_detachByAddr", "thread_detachInstance", "thread_findByAddr",
"thread_setThis", "thread_joinAll", "_sharedStaticDtor_L2427_C1",
"multiThreadedFlag", "callWithStackShell", "suspendDepth", "suspend",
"thread_suspendAll", "resume", "thread_resumeAll", "ScanType",
"ScanAllThreadsFn", "ScanAllThreadsTypeFn", "thread_scanAllType",
"scanAllTypeImpl", "thread_scanAll", "thread_enterCriticalRegion",
"thread_exitCriticalRegion", "thread_inCriticalRegion", "onThreadError",
"IsMarked", "IsMarkedDg", "thread_processGCMarks", "pthread_getattr_np",
"getStackTop", "getStackBottom", "thread_stackTop", "thread_stackBottom",
"ThreadGroup", "AsmX86_64_Posix", "AlignFiberStackTo16Byte", "PAGESIZE",
"PTHREAD_STACK_MIN", "_sharedStaticCtor_L3695_C1", "fiber_entryPoint",
"fiber_switchContext", "Fiber", "ThreadID", "ll_ThreadData", "ll_nThreads",
"ll_pThreads", "ll_lock", "lowlevelLock", "initLowlevelThreads",
"termLowlevelThreads", "ll_removeThread", "createLowLevelThread",
"joinLowLevelThread", "findLowLevelThread")
-----

2.089.1 to 2.093.1: Success with output:
-----
tuple("object", "core")
tuple()
-----

Since      2.094.2: Success with output:
-----
tuple("object", "core")
tuple("object", "core")
-----
```

But it's still not great, see issue 20008.

*** This issue has been marked as a duplicate of issue 20008 ***

--