Skip to content

Commit 0f97e34

Browse files
committed
Update to latest CG.R
1 parent d09ca91 commit 0f97e34

File tree

10 files changed

+14
-6
lines changed

10 files changed

+14
-6
lines changed

src/Directory.Build.targets

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<Project>
22
<PropertyGroup>
3-
<CodeGenerationRoslynVersion>0.4.88</CodeGenerationRoslynVersion>
3+
<CodeGenerationRoslynVersion>0.6.1</CodeGenerationRoslynVersion>
44
</PropertyGroup>
55
<ItemGroup>
66
<PackageReference Update="CodeGeneration.Roslyn.Attributes" Version="$(CodeGenerationRoslynVersion)" />
77
<PackageReference Update="CodeGeneration.Roslyn.BuildTime" Version="$(CodeGenerationRoslynVersion)" />
88
<PackageReference Update="CodeGeneration.Roslyn" Version="$(CodeGenerationRoslynVersion)" />
9+
<PackageReference Update="CodeGeneration.Roslyn.Engine" Version="$(CodeGenerationRoslynVersion)" />
910
<PackageReference Update="Microsoft.Build" Version="14.3.0" />
10-
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.9.0" />
11+
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.1.0" />
1112
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.2.0" />
1213
<PackageReference Update="System.Collections.Immutable" Version="1.5.0" />
1314
<PackageReference Update="System.Diagnostics.Contracts" Version="4.3.0" />

src/ImmutableObjectGraph.Generation.Attributes/GenerateImmutableAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
[AttributeUsage(AttributeTargets.Class)]
88
[Conditional("CodeGeneration")]
9-
[CodeGenerationAttribute("ImmutableObjectGraph.Generation.CodeGenerator, ImmutableObjectGraph.Generation, Version=" + ThisAssembly.AssemblyVersion + ", Culture=neutral, PublicKeyToken=bfd91f1bd601e0d7")]
9+
[CodeGenerationAttribute("ImmutableObjectGraph.Generation.CodeGenerator, ImmutableObjectGraph.Generation, Version=" + ThisAssembly.AssemblyVersion + ", Culture=neutral, PublicKeyToken=" + ThisAssembly.PublicKeyToken)]
1010
public class GenerateImmutableAttribute : Attribute
1111
{
1212
public GenerateImmutableAttribute()

src/ImmutableObjectGraph.Generation.Tests/CodeGenTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
using System.Text;
1010
using System.Threading;
1111
using System.Threading.Tasks;
12+
using CodeGeneration.Roslyn.Engine;
1213
using global::CodeGeneration.Roslyn;
14+
using ImmutableObjectGraph.Generation.Roslyn;
1315
using Microsoft.CodeAnalysis;
1416
using Microsoft.CodeAnalysis.CSharp;
1517
using Microsoft.CodeAnalysis.Diagnostics;

src/ImmutableObjectGraph.Generation.Tests/ImmutableObjectGraph.Generation.Tests.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,13 @@
7979
</ItemGroup>
8080
<ItemGroup>
8181
<PackageReference Include="Microsoft.Build" />
82+
<PackageReference Include="Validation" />
8283
<PackageReference Include="xunit" />
8384
<PackageReference Include="xunit.runner.visualstudio" />
8485
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" PrivateAssets="all" />
8586
<PackageReference Include="Microsoft.NET.Test.Sdk" />
8687
<PackageReference Include="CodeGeneration.Roslyn" PrivateAssets="all" />
88+
<PackageReference Include="CodeGeneration.Roslyn.Engine" PrivateAssets="all" />
8789
</ItemGroup>
8890
<ItemGroup>
8991
<DotNetCliToolReference Include="dotnet-codegen" />

src/ImmutableObjectGraph.Generation/CodeGen.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using System.Threading;
1313
using System.Threading.Tasks;
1414
using global::CodeGeneration.Roslyn;
15+
using ImmutableObjectGraph.Generation.Roslyn;
1516
using Microsoft.CodeAnalysis;
1617
using Microsoft.CodeAnalysis.CSharp;
1718
using Microsoft.CodeAnalysis.CSharp.Syntax;

src/ImmutableObjectGraph.Generation/ImmutableObjectGraph.Generation.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<PackageReference Include="CodeGeneration.Roslyn" PrivateAssets="all" />
3737
<PackageReference Include="CodeGeneration.Roslyn.BuildTime" PrivateAssets="none" />
3838
<PackageReference Include="System.Diagnostics.Contracts" PrivateAssets="all" />
39+
<PackageReference Include="Validation" PrivateAssets="all" />
3940
</ItemGroup>
4041
<ItemGroup>
4142
<DotNetCliToolReference Include="dotnet-codegen" />

src/ImmutableObjectGraph.Generation/Roslyn/CSharpDeclarationComputer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace ImmutableObjectGraph.Generation.Roslyn
1515
{
16-
internal class CSharpDeclarationComputer : DeclarationComputer
16+
public class CSharpDeclarationComputer : DeclarationComputer
1717
{
1818
public static ImmutableArray<DeclarationInfo> GetDeclarationsInSpan(SemanticModel model, TextSpan span, bool getSymbol, CancellationToken cancellationToken)
1919
{

src/ImmutableObjectGraph.Generation/Roslyn/DeclarationComputer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace ImmutableObjectGraph.Generation.Roslyn
1010
using System.Threading;
1111
using Microsoft.CodeAnalysis;
1212

13-
internal class DeclarationComputer
13+
public class DeclarationComputer
1414
{
1515
internal static DeclarationInfo GetDeclarationInfo(SemanticModel model, SyntaxNode node, bool getSymbol, IEnumerable<SyntaxNode> executableCodeBlocks, CancellationToken cancellationToken)
1616
{

src/ImmutableObjectGraph.Generation/Roslyn/DeclarationInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace ImmutableObjectGraph.Generation.Roslyn
1212
/// <summary>
1313
/// Struct containing information about a source declaration.
1414
/// </summary>
15-
internal struct DeclarationInfo
15+
public struct DeclarationInfo
1616
{
1717
private readonly SyntaxNode _declaredNode;
1818
private readonly ImmutableArray<SyntaxNode> _executableCodeBlocks;

src/ImmutableObjectGraph.Generation/Syntax.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using System.Text;
99
using System.Threading;
1010
using System.Threading.Tasks;
11+
using ImmutableObjectGraph.Generation.Roslyn;
1112
using Microsoft.CodeAnalysis;
1213
using Microsoft.CodeAnalysis.CSharp;
1314
using Microsoft.CodeAnalysis.CSharp.Syntax;

0 commit comments

Comments
 (0)