Metalama Status Update (April 2022)

by Gael Fraiteur on 27 Apr 2022

It has been two months since our announcement of Metalama and we wanted to give some update since we have been publishing new builds at a sustained pace in the meantime.

First, we are grateful for the attention Metalama got from the community. A few folks started to try the new framework and reported some very relevant feedback. We have solved all reported bugs – a couple dozen in total. It’s very interesting for us to see how you guys are trying to use the framework and what obstacles or difficulties you encounter.

Our special thanks go to Dom Sinclair for his review and edits of the documentation from a native speaker’s perspective. We have changed our all advices to the rightly spelled advice as a result :-).

New features

While addressing community feedback, we have also been busy building new features:

  • Support for Visual Studio 17.1 and Roslyn 4.1.0. We can now support many versions of Roslyn in the same set of packages.
  • Exclusion of aspects. To prevent a declaration from being targeted by a fabric, use the ExcludeAspectAttribute custom attribute.
  • Initializers. You can add initializers to introduced fields, properties and events. You can also inject initialization logic into object and type constructors. See Adding Initializers for details.
  • Require aspect. The RequireAspect method allows a parent aspect to add a child aspect, but only if the aspect has not been added by a different path.
  • Properties and indexers split. The IProperty interface no longer represents indexers and the Properties collection no longer expose them. We now have IIndexer and Indexers.
  • Incremental source generators. We have migrated our implementation of source generators to the new incremental API.
  • Code fix: change member accessibility. You can now change the visibility of a member from a custom code fix with the CodeFixFactory.ChangeAccessibility method.
  • Documentation. We have completed chapters about fabrics, validation and custom code fixes.

What’s next

Metalama 1.0 is now almost feature-complete and you should no longer see large API additions.

In the next weeks, we will be focusing on the following:

  • Testing and bug fixing
  • Documentation:
  • Adding a proper API to implement parameter/field/property validation
  • Telemetry
  • Licensing

At the current pace, we expect to be code complete in June, which means that we can hope for general release after in September, after the summer break.

In the mean time, your feedback is greatly appreciated and, most likely, can have large impact on the final product.

Happy meta-programming with Metalama!

-gael