Issue 23776 - getSymbolsByUDA fails to fetch symbols from module
Summary: getSymbolsByUDA fails to fetch symbols from module
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2023-03-13 03:06 UTC by hsteoh
Modified: 2023-03-16 08:07 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description hsteoh 2023-03-13 03:06:06 UTC
Code:
-------mod.d--------
struct Tag {}
@Tag struct MyStructA {}
@Tag struct MyStructB {}
@Tag struct MyStructC {}
--------------------

-------test.d-------
import std.traits : getSymbolsByUDA;
import mod;
alias components = getSymbolsByUDA!(mod, Tag);
static assert(components.length > 0);
--------------------

Compile command: dmd -main -i test.d

Expected behaviour: assert shouldn't trigger, getSymbolsByUDA should return a list with MyStructA, MyStructB, and MyStructC.

Git bisect shows that the offending commit is: e305dc9f79cc98579257f588308bb2322fd843df


Searching bugzilla reveals a similar issue #20054, but apparently the fix applied there does not cover the above case, as both dmd git master (9d2d21f48762) and LDC 1.32.0 exhibit this problem.
Comment 1 Dlang Bot 2023-03-13 13:04:40 UTC
@RazvanN7 created dlang/phobos pull request #8716 "Fix Issue 23776 - getSymbolsByUDA fails to fetch symbols from module" fixing this issue:

- Fix Issue 23776 - getSymbolsByUDA fails to fetch symbols from module

https://github.com/dlang/phobos/pull/8716
Comment 2 Dlang Bot 2023-03-15 01:48:16 UTC
dlang/phobos pull request #8716 "Fix Issue 23776 - getSymbolsByUDA fails to fetch symbols from module" was merged into stable:

- e47d32edc95b2fade9659f4dd366cba449791114 by RazvanN7:
  Fix Issue 23776 - getSymbolsByUDA fails to fetch symbols from module

https://github.com/dlang/phobos/pull/8716
Comment 3 Dlang Bot 2023-03-16 08:07:47 UTC
dlang/phobos pull request #8720 "merge stable" was merged into master:

- 67a47cf39d52b3cb3ae4117c0237415e03737f8a by RazvanN7:
  Fix Issue 23776 - getSymbolsByUDA fails to fetch symbols from module

https://github.com/dlang/phobos/pull/8720