Skip to content

Releases: ByronMayne/SourceGenerator.Foundations

2.0.16

Choose a tag to compare

@ByronMayne ByronMayne released this 06 Jul 03:24
14adbb4

What's Changed

  • Fix typo in README for wrapper class name by @pjanck in #65
  • Fixed the issue where abstract generators would trigger SGF1003 by @ByronMayne in #68
  • Refactored the logic for excluding assemblies by @ByronMayne in #66
  • Changed the ci to create pre-release versions by @ByronMayne in #69

Full Changelog: 2.0.15...2.0.16

2.0.15

Choose a tag to compare

@ByronMayne ByronMayne released this 23 Jun 13:00
e741c4b

What's Changed

  • Exclude Microsoft.CodeAnalysis.* from SGF dependency embedding by default by @ByronMayne with @Copilot in #59
  • Fixed the unit test project failing to build in visual studio by @ByronMayne in #61
  • Add first-class assembly exclusion support for SGF dependency embedding by @ByronMayne with @Copilot in #60
  • Updated the documentation on source generator foundations by @ByronMayne in #62
  • Refactored Nuget publishing to use Trusted Publishers rather then api keys by @ByronMayne in #64

New Contributors

Full Changelog: 2.0.14...2.0.15

2.0.14

Choose a tag to compare

@ByronMayne ByronMayne released this 12 Dec 03:32

What's Changed

New Contributors

Full Changelog: 2.0.13...2.0.14

2.0.13

Choose a tag to compare

@ByronMayne ByronMayne released this 05 Jan 01:30
3de134b

What's Changed

  • Removed the built in telemetry and opted to use NugetInsights by @ByronMayne in #46
  • Fixed a few typos across the project by @ByronMayne in #47

Full Changelog: 2.0.12...2.0.13

2.0.12

Choose a tag to compare

@ByronMayne ByronMayne released this 03 Jan 04:06
949a27e

What's Changed

  • Added a telemetry event for when a NuGet package is installed by @ByronMayne in #43
  • Updated the telemetry script to post events instead of traces by @ByronMayne in #44
  • Fixed SourceGenerator.Foundations.Contracts not having an icon by @ByronMayne in #45

Full Changelog: 2.0.11...2.0.12

2.0.11

Choose a tag to compare

@ByronMayne ByronMayne released this 31 Dec 02:39
3150e23

Mostly just small internal changes

What's Changed

  • Updated the NuGet packages to use central versions by @ByronMayne in #41
  • Adjusted so all exception handling happens in the base generator class by @ByronMayne in #42

Full Changelog: 2.0.10...2.0.11

2.0.10

Choose a tag to compare

@ByronMayne ByronMayne released this 30 Dec 03:16
c908dd7

Replaced SgfGeneratorAttribute with IncrementalGeneratorAttribute

Both attributes will work and be backwards compatible but previous version will now show a warning. This was down just to clear up the ambiguous nature of the old attribute

using Sgf

// From 
[SgfGenerator]
public class MyGenerator : IncrementalGenerator
{}

// To:
[IncrementalGenerator]
public class MyGenerator : IncrementalGenerator
{}

Exposed ExceptionHandler in IncrementalGenerator

Exposed new event in the base generator task for handling exceptions. This was done to support better unit testing by allowing for handling of any exception.

public void Processs(IncrementalGenerator  generator)
{
    generator.ExceptionHandler += OnException;
}

public void OnException(Exception exception)
{}

New Context Interfaces

I created ISgfInitializationContext which is implemented by SgfInitializationContext and ISgfSourceProductionContext which is implemented by SgfSourceProductionContext. This was done to allow for writing more unit tests and was a request from the community. In addition for advanced uses cases you can cast the structs as their respective interface and get access to their backing fields. This should only need to be done in advanced use cases.

using SGF;

[IncrementalGenerator]
public class MyGenerator : IncrementalGenerator 
{
    public override void OnInitialize(SgfInitializationContext context)
    {
          // Get access to the original context that the SGF wraps. 
          ISgfInitializationContext sgfContext = (ISgfInitializationContext)context;
          IncrementalGeneratorInitializationContext originalContext = sgfContext.OriginalContext;
    }
}

What's Changed

  • Exposed new interfaces for the Context types and exposed access to the wrapped types by @ByronMayne in #38
  • Changed the class attribute for marking generators by @ByronMayne in #39
  • Exposed 'ExceptionHandler' event in IncrementalGenerator to write simpler unit tests by @ByronMayne in #40

Full Changelog: 2.0.9...2.1.0

2.0.9

Choose a tag to compare

@ByronMayne ByronMayne released this 23 Dec 19:37
3ee3678

What's Changed

  • Created new unit tests to validate banned api analyzer by @ByronMayne in #36
  • Fixed the compiler error due to using the console api by @ByronMayne in #37

Full Changelog: 2.0.8...2.0.9

2.0.8

Choose a tag to compare

@ByronMayne ByronMayne released this 09 Dec 03:31
795f6df

What's Changed

  • Fixed the compiler error due to using the environment by @ByronMayne in #33

Full Changelog: 2.0.7...2.0.8

2.0.7

Choose a tag to compare

@ByronMayne ByronMayne released this 09 Dec 01:25
34708c0

What's Changed

  • Feature to turn off emitting ModuleInitializerAttribute when bringing your own polyfills by @scooter12 in #26
  • Typo fixes from your friendly Grammatik-Enthusiast by @scooter12 in #28
  • Added method for launching a debugger during type initialization by @ByronMayne in #31

New Contributors

Full Changelog: 2.0.6...2.0.7