Skip to content

Releases: ByronMayne/SourceGenerator.Foundations

2.0.6

28 Jul 23:41
59502fa
Compare
Choose a tag to compare

What's Changed

  • Publishing Source.Generator.Foundations.Contracts project by @ByronMayne in #25

Full Changelog: 2.0.5...2.0.6

2.0.5

27 Jul 22:46
e7f4be9
Compare
Choose a tag to compare

What's Changed

  • Fixed a bunch of nullable warnings by @ByronMayne in #19
  • Added support for unit testing the SGF Source Generators by @ByronMayne in #20
  • Fixed the CI/CD being unable to publish build due to locked dlls by @ByronMayne in #22
  • Fixed the compiler error for using min version of the LangVersion when you you use latest by @ByronMayne in #23

Full Changelog: 2.0.4...2.0.5

2.0.4

21 Jun 00:47
Compare
Choose a tag to compare

Bug Fixes

  • Fixed a generator crash that could happen when trying to load a reference only assembly

2.0.3

13 May 23:06
ec7283d
Compare
Choose a tag to compare
  • Removed the auto reference to Microsoft.CodeAnalysis.CSharp version 4.3.1 that was being auto added to all projects.
  • Added a new icon for the nuget package (thank you flaticon.com)

2.0.2

10 Mar 16:59
34f4553
Compare
Choose a tag to compare

#15 Added Code Analyzers for common mistakes
This release only contains new static code analyses for checking for common mistakes when using Source Generator Foundations. This include checking the following

  1. GeneratorAttribute is not applied to IncrementalGenerator types.
  2. SgfGeneratorAttribute is applied to all IncrementalGenerator types.
  3. All IncrementalGenerators must have a default constructor

What's Changed

Full Changelog: 2.0.1...2.0.2

2.0.1

21 Feb 15:13
Compare
Choose a tag to compare
Merge branch 'feature/hoist-pattern'

2.0.0

17 Feb 02:29
627f33c
Compare
Choose a tag to compare

With new release I have changed the implementation of the source generator. You now need to apply the [SgsGenerator] attribute to your class and add a constructor.

namespace Example
{
    // IncrementalGenerator, is a generated type from `SourceGenerator.Foundations'
    [SgfGenerator]
    public class ExampleSourceGenerator : IncrementalGenerator 
    {
        // Constructor can only take two arguments in this order 
        public ExampleSourceGenerator(
            IGeneratorEnvironment generatorEnvironment, 
            ILogger logger) : base("ExampleSourceGenerator", 
            generatorPlatform, logger)
        {
            
        }

        // SgfInitializationContext is a wrapper around IncrementalGeneratorInitializationContext
       protected override void OnInitialize(SgfInitializationContext context)
       {
            // Attaches Visual Studio debugger without prompt 
            AttachDebugger();

            // Writes output to Visual Studios output window
            WriteLine("Hello World");
       }
    }
}

1.5.3

13 Feb 03:28
Compare
Choose a tag to compare
  • Added warning disables around 'do not use apis'

1.5.2

31 Jan 15:43
Compare
Choose a tag to compare

This release includes Optional Polyfills for some missing features. This version will allow you to use Nullable attributes and init properties out of the box.

1.5.1

22 Jan 03:37
Compare
Choose a tag to compare

Created the 1.5.1 release. This one finally has fixed ci