May 07, 2017
I'm reworking my code to use UDAs, and I'm running into a wall of text of deprecation warnings when compiling.


import std.traits;

private:

struct SomeUDA {}

@SomeUDA
void foo() {}

@SomeUDA
void bar() {}

@SomeUDA
void etc() {}

public:

void main()
{
    mixin("static import thisModule = " ~ __MODULE__ ~ ";");

    foreach (symbol; getSymbolsByUDA!(thisModule, SomeUDA))
    {
        static if (isSomeFunction!symbol)
        {
            pragma(msg, symbol.stringof);
        }
    }
}


See https://wandbox.org/permlink/6Z01koyGGRxjsNWG for the output it gives. In the real code it's unmanageably many lines.

Is there any way to get rid of these warnings except by making everything public? Ideally I wouldn't want to copy the source of getSymbolsByUDA into each file doing this either.
May 08, 2017
Known issue:

  https://issues.dlang.org/buglist.cgi?quicksearch=getSymbolsByUDA

Ali