diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml
index e3beaf1..492fe8c 100644
--- a/.github/workflows/ci-build.yml
+++ b/.github/workflows/ci-build.yml
@@ -21,6 +21,7 @@ jobs:
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
+ lfs: true
- name: Install .NET Core
uses: actions/setup-dotnet@v1.8.0
diff --git a/images/logo.png b/images/logo.png
new file mode 100644
index 0000000..e2fde10
Binary files /dev/null and b/images/logo.png differ
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 22da365..87da130 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -10,6 +10,7 @@
MIT
https://github.com/reactivemarbles/SourceGenerator.TestNuGetHelper
Helpers for dealing with NuGet packages.
+ logo.png
glennawatson
https://github.com/reactivemarbles/SourceGenerator.TestNuGetHelper/releases
https://github.com/reactivemarbles/SourceGenerator.TestNuGetHelper
@@ -32,6 +33,7 @@
+
diff --git a/src/ReactiveMarbles.SourceGenerator.TestNuGetHelper/Compilation/SourceGeneratorUtility.cs b/src/ReactiveMarbles.SourceGenerator.TestNuGetHelper/Compilation/SourceGeneratorUtility.cs
index 57340ae..dd46c35 100644
--- a/src/ReactiveMarbles.SourceGenerator.TestNuGetHelper/Compilation/SourceGeneratorUtility.cs
+++ b/src/ReactiveMarbles.SourceGenerator.TestNuGetHelper/Compilation/SourceGeneratorUtility.cs
@@ -7,6 +7,7 @@
using System.Collections.Immutable;
using System.IO;
using System.Linq;
+
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
@@ -64,18 +65,33 @@ static SourceGeneratorUtility()
/// The source code files.
/// The source generator instance.
public T RunGenerator(EventBuilderCompiler compiler, out ImmutableArray compilationDiagnostics, out ImmutableArray generatorDiagnostics, out GeneratorDriver generatorDriver, params string[] sources)
+ where T : ISourceGenerator, new() => RunGenerator(compiler, out compilationDiagnostics, out generatorDiagnostics, out generatorDriver, out _, out _, sources);
+
+ ///
+ /// Runs the generator.
+ ///
+ /// The type of generator.
+ /// The compiler.
+ /// The diagnostics which are produced from the compiler.
+ /// The diagnostics which are produced from the generator.
+ /// Output value for the driver.
+ /// The compilation before the generator has run.
+ /// The compilation after the generator has run.
+ /// The source code files.
+ /// The source generator instance.
+ public T RunGenerator(EventBuilderCompiler compiler, out ImmutableArray compilationDiagnostics, out ImmutableArray generatorDiagnostics, out GeneratorDriver generatorDriver, out Microsoft.CodeAnalysis.Compilation beforeCompilation, out Microsoft.CodeAnalysis.Compilation afterGeneratorCompilation, params string[] sources)
where T : ISourceGenerator, new()
{
- var compilation = CreateCompilation(compiler, sources);
+ beforeCompilation = CreateCompilation(compiler, sources);
var generator = new T();
- var newCompilation = RunGenerators(compilation, out generatorDiagnostics, out generatorDriver, generator);
+ afterGeneratorCompilation = RunGenerators(beforeCompilation, out generatorDiagnostics, out generatorDriver, generator);
- compilationDiagnostics = newCompilation.GetDiagnostics();
+ compilationDiagnostics = afterGeneratorCompilation.GetDiagnostics();
- ShouldHaveNoCompilerDiagnosticsWarningOrAbove(_writeOutput, newCompilation, compilationDiagnostics);
- ShouldHaveNoCompilerDiagnosticsWarningOrAbove(_writeOutput, compilation, generatorDiagnostics);
+ ShouldHaveNoCompilerDiagnosticsWarningOrAbove(_writeOutput, afterGeneratorCompilation, compilationDiagnostics);
+ ShouldHaveNoCompilerDiagnosticsWarningOrAbove(_writeOutput, beforeCompilation, generatorDiagnostics);
return generator;
}
diff --git a/version.json b/version.json
index ffd1721..c585f2b 100644
--- a/version.json
+++ b/version.json
@@ -1,5 +1,5 @@
{
- "version": "1.0",
+ "version": "1.1",
"publicReleaseRefSpec": [
"^refs/heads/master$",
"^refs/heads/main$"