Metalama 2023.3 is Generally Available

by Gael Fraiteur on 17 Oct 2023

We are excited to introduce Metalama 2023.3, the most significant feature leap since our inaugural 2023.0 release. This update includes auxiliary templates, which make it possible for T# templates to call upon other T# templates and seamless integration with the Roslyn object model. Users will also benefit from a marked performance enhancement and a refined development experience. We’ve added support for the Visual Studio Code C# Dev Kit and simplified our licensing structure. We highly recommend you to update both the NuGet packages and Metalama Tools for Visual Studio.

Enhanced Nested Calls in T# Templates

We’ve addressed a prior constraint in T# templates by enabling them to invoke auxiliary template methods.

The advantages of utilizing auxiliary templates include:

  • Code reuse across templates.
  • The opportunity for abstraction and specialization through virtual and override templates.

For an in-depth understanding, our documentation offers a comprehensive guide.

Roslyn Access Through Metalama.Framework.Sdk

You can now tap into the Roslyn API for granular code model analysis via the Metalama.Framework.Sdk package. Previously, this package was available but not directly accessible from an aspect project — a limitation we’ve successfully eliminated.

Roslyn proves invaluable for:

  1. Analyzing method bodies within your aspect, for example, to examine the dependency graph of INotifyPropertyChanged.
  2. Executing arbitrary code transformations using low-level aspect weavers.
  3. Crafting metrics suitable for use in fabrics.

Streamlined Licensing

With Metalama 2023.3, we’ve simplified our licensing model, replacing the cumbersome concept license credits with simply counting the number of distinct aspect classes utilized per project.

We’ve also enhanced Metalama Free with unlimited contract aspects and the capability to debug transformed code over source code.

We now provide a complimentary namespace-specific license key for open-source projects, granting full access to Metalama’s entire feature set within the project.

For a detailed exploration, our blog post goes deeper.

Preview of Caching and Contracts

We’ve been diligently developing Metalama.Patterns.Contracts and Metalama.Patterns.Caching, two aspect libraries derived from PostSharp.

Currently, in v2023.3, their status remains in preview.

For those intrigued by these libraries, we recommend version 2023.4, set to reach RC shortly, in which both Metalama.Patterns.Contracts and Metalama.Patterns.Caching are set to become generally available.

Further Enhancements

Metalama 2023.3 includes a further dozen improvements in the following areas:

  • Developer experience: debugging, error reporting.
  • Performance: design-time code validation, LINQPad driver.
  • Supportability: ability to profile Metalama processes.
  • Object model: several new APIs.
  • 62 bug fixes

For details, see the release notes.

In Conclusion

Metalama 2023.3 marks significant progress in the framework’s development. The enhanced T# templates can now call other templates, enabling code reuse and abstraction in T#. Integration with the Roslyn object model has been streamlined, allowing aspect authors easier access to detailed code model analysis. Licensing has been simplified and clarified. Additionally, this release comes packed with numerous other refinements and bug fixes, optimizing the development experience and platform stability.