You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since source generators are not ordered but compilation is (wrt dependencies), it could be worked around through separate projects each generating code which can be accessed through the metadata provider in the next generator, hosted as a separate project.
To do this each attributed type should be noted for efficient retrieval in the downstream project.
[GeneratorAttirbute]classA;// returned by ForAttributeWithMetadataName[GeneratorAttirbute]classB;// returned by ForAttributeWithMetadataName// generated[assembly: Export(typeof(A)][assembly: Export(typeof(B)]
then the generator can combine symbols from both source and the metadata for processing.
If roslyn could add some sort of helper similar to ForAttributeWithMetadataName that does this, generators can choose to use it to support operating on generated code.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
(This relates to #57239, dotnet/runtime#108317).
Since source generators are not ordered but compilation is (wrt dependencies), it could be worked around through separate projects each generating code which can be accessed through the metadata provider in the next generator, hosted as a separate project.
To do this each attributed type should be noted for efficient retrieval in the downstream project.
then the generator can combine symbols from both source and the metadata for processing.
If roslyn could add some sort of helper similar to
ForAttributeWithMetadataNamethat does this, generators can choose to use it to support operating on generated code.All reactions