Great examples.
Is source generation becoming "trendy"? Microsoft have recently added more of it to C#, in order to support their AOT efforts. It's a bit infrastructure-heavy as it seems to be intended for point support for specific things, rather than a general purpose "write code to generate code" tool. But I wonder if there would be a market for such a thing. The architecture currently does not allow you to edit user source code, just add more code. I.e. it's not a preprocessor, it just has readonly access to the AST.
e.g. the regex generator https://learn.microsoft.com/en-us/dotnet/standard/base-types...
(Reference blog post https://andrewlock.net/creating-a-source-generator-part-1-cr... )