Skip to content

Commit

Permalink
Downgrade the source generator to netstandard2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
halgari committed Jun 3, 2024
1 parent ceb3379 commit b92898d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/NexusMods.MnemonicDB.SourceGenerator/ModelAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ private void AnalyzeAttributes()
var analyzedAttribute = new AnalyzedBackReferenceAttribute
{
Name = fieldSymbol.Name,
OtherModel = otherModel,
OtherAttribute = otherAttribute,
OtherModel = otherModel!,
OtherAttribute = otherAttribute!,
Comments = comments
};
BackReferences.Add(analyzedAttribute);
Expand All @@ -139,8 +139,8 @@ private void AnalyzeAttributes()
FieldName = fieldSymbol.ToDisplayString(),
Flags = flags,
AttributeType = (fieldSymbol.Type as INamedTypeSymbol)!,
HighLevelType = highLevel,
LowLevelType = lowLevel,
HighLevelType = highLevel!,
LowLevelType = lowLevel!,
Markers = markers,
Comments = comments
};
Expand All @@ -160,7 +160,7 @@ private void AnalyzeAttributes()
}
}

private bool TryGetBackReference(IFieldSymbol fieldSymbol, [NotNullWhen(true)] out INamedTypeSymbol? otherModel, [NotNullWhen(true)] out IFieldSymbol? otherAttribute)
private bool TryGetBackReference(IFieldSymbol fieldSymbol, out INamedTypeSymbol? otherModel, out IFieldSymbol? otherAttribute)
{
otherModel = null;
otherAttribute = null;
Expand Down Expand Up @@ -243,8 +243,8 @@ private HashSet<string> GetInitializerData(IFieldSymbol fieldSymbol)
}

private bool TryGetAttributeTypes(IFieldSymbol fieldSymbol,
[NotNullWhen(true)] out INamedTypeSymbol? highLevel,
[NotNullWhen(true)] out INamedTypeSymbol? lowLevel,
out INamedTypeSymbol? highLevel,
out INamedTypeSymbol? lowLevel,
out AttributeFlags flags)
{
var type = fieldSymbol.Type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<RootNamespace>NexusMods.MnemonicDB.SourceGenerator</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
</PropertyGroup>
<ItemGroup>
Expand Down

0 comments on commit b92898d

Please sign in to comment.