Regression in getSymbolsByUDA :-(

H. S. Teoh hsteoh at qfbox.info
Mon Mar 13 03:15:42 UTC 2023


So, I upgraded to LDC 1.32.0 / DMD git master (9d2d21f48) today, and
discovered to my chagrin that a fairly complex project of mine no longer
compiles.  Tracked the problem down to a change in behaviour in
std.traits.getSymbolsByUDA: it no longer fetches the list of symbols in
an imported module as it used to, returning instead an empty alias list.

	 https://issues.dlang.org/show_bug.cgi?id=23776

This is a pretty major breakage as the returned list is used to
construct fundamental building blocks extensively used throughout the
program; this regression basically makes the entire project unusable.
Git bisect reveals the offending change to be Phobos commit e305dc9f7:

	commit e305dc9f79cc98579257f588308bb2322fd843df (HEAD)
	Author: RazvanN7 <razvan.nitu1305 at gmail.com>
	Date:   Fri Nov 25 11:56:38 2022 +0200

	    Fix getSymbolsByUDA by replacing broad __traits(compiles) with a more focused condition

apparently stemming from a recent effort to improve the implementation
of getSymbolsByUDA.  Unfortunately, the fix failed to account for
introspecting modules (which the docs explicitly say should work).

:-(


T

-- 
Recently, our IT department hired a bug-fix engineer. He used to work for Volkswagen.


More information about the Digitalmars-d mailing list