Skip to content

Commit

Permalink
0.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
2A5F committed Feb 25, 2025
1 parent 44cfe92 commit bcf2756
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## 0.10.0
## 0.11.0
- Fix Bug

## 0.10.0
- Breaking Changes
- Tags are now no longer in explicit assignment order, and are no longer 1 if the first item is void

Expand Down
2 changes: 1 addition & 1 deletion Coplt.Union.Analyzers/Coplt.Union.Analyzers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Coplt.RoslynUtilities" Version="0.4.0">
<PackageReference Include="Coplt.RoslynUtilities" Version="0.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static UnionAttr FromData(AttributeData data, List<Diagnostic> diagnostic
or "ulong"))
{
a.TagsUnderlying = null;
var desc = Utils.MakeError(Strings.Get("Generator.Union.Error.Underlying"));
var desc = Utils.MakeError(UnionGenerator.Id, Strings.Get("Generator.Union.Error.Underlying"));
var syntax = (AttributeSyntax)data.ApplicationSyntaxReference!.GetSyntax();
try
{
Expand Down
8 changes: 5 additions & 3 deletions Coplt.Union.Analyzers/Generators/UnionGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ namespace Coplt.Union.Analyzers.Generators;
[Generator]
public class UnionGenerator : IIncrementalGenerator
{
public const string Id = "Union";
public void Initialize(IncrementalGeneratorInitializationContext context)
{
var sources = context.SyntaxProvider.ForAttributeWithMetadataName(
Expand Down Expand Up @@ -77,7 +78,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
.ToArray();
if (templates.Length > 1)
{
var desc = Utils.MakeWarning(Strings.Get("Generator.Union.Error.MultiTemplate"));
var desc = Utils.MakeWarning(Id, Strings.Get("Generator.Union.Error.MultiTemplate"));
foreach (var t in templates)
{
diagnostics.Value.Add(Diagnostic.Create(desc, t.t.Identifier.GetLocation()));
Expand Down Expand Up @@ -149,7 +150,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
ret_type_symbol.OriginalDefinition.ContainingAssembly,
compilation.Assembly))
{
var desc = Utils.MakeInfo(
var desc = Utils.MakeInfo(Id,
Strings.Get("Generator.Union.Info.PossiblyInvalidSymbol"));
diagnostics.Value.Add(Diagnostic.Create(desc, member.GetLocation()));
}
Expand All @@ -158,7 +159,8 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
}
else
{
var desc = Utils.MakeWarning(Strings.Get("Generator.Union.Error.IllegalTemplateMember"));
var desc = Utils.MakeWarning(Id,
Strings.Get("Generator.Union.Error.IllegalTemplateMember"));
if (member is BaseTypeDeclarationSyntax bts)
{
diagnostics.Value.Add(Diagnostic.Create(desc, bts.Identifier.GetLocation()));
Expand Down
2 changes: 1 addition & 1 deletion Coplt.Union.Source/Coplt.Union.Source.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<PackageId>Coplt.Union</PackageId>
<Version>0.10.0</Version>
<Version>0.11.0</Version>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>
Expand Down

0 comments on commit bcf2756

Please sign in to comment.