fix: Make sure generators use `global::`

This commit is contained in:
Youssef Victor 2024-07-12 09:59:56 +03:00
Родитель 9f2c6d97c3
Коммит 968d8c48c6
7 изменённых файлов: 8 добавлений и 12 удалений

Просмотреть файл

@ -20,7 +20,7 @@
<PackageVersion Include="SkiaSharp.Views" Version="2.88.7" />
<PackageVersion Include="SkiaSharp.Views.Uno.WinUI" Version="2.88.7" />
<PackageVersion Include="SkiaSharp.Skottie" Version="2.88.7" />
<PackageVersion Include="System.Text.Json" Version="8.0.1" />
<PackageVersion Include="System.Text.Json" Version="8.0.4" />
<PackageVersion Include="Uno.Core" Version="4.1.1" />
<PackageVersion Include="Uno.Core.Extensions.Logging.Singleton" Version="4.1.1" />
<PackageVersion Include="Uno.Extensions.Logging.OSLog " Version="1.7.0" />

Просмотреть файл

@ -48,7 +48,7 @@
<PackageVersion Include="System.Collections.Immutable" Version="1.3.1" /> <!--Lower version breaks build of reactive.<UI|WinUI>-->
<PackageVersion Include="System.Linq.Async" Version="4.0.0" />
<PackageVersion Include="System.Net.Http.WinHttpHandler" Version="6.0.1" />
<PackageVersion Include="System.Text.Json" Version="8.0.1" />
<PackageVersion Include="System.Text.Json" Version="8.0.4" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="Uno.Core" Version="4.1.1" />
<PackageVersion Include="Uno.Extensions.Logging.OSLog" Version="1.7.0" />

Просмотреть файл

@ -37,10 +37,6 @@ internal static class CodeGenToolExtensions
return $@"{tool.GetFileHeader(3)}
using global::System;
using global::System.Linq;
using global::System.Threading.Tasks;
namespace {type.ContainingNamespace}
{{
{types.Select((def, i) => $"{def.Indent(i + (i == 0 ? 0 : 4))}\r\n{"{".Indent(i + 4)}").JoinBy("\r\n")}

Просмотреть файл

@ -347,9 +347,9 @@ internal class KeyEqualityGenerationTool : ICodeGenTool
{{
{types
.Select(type =>
$@"if (type == typeof({type}))
$@"if (type == typeof({type.ToFullString()}))
{{
return new {NS.Equality}.KeyEqualityComparer<{type}>();
return new {NS.Equality}.KeyEqualityComparer<{type.ToFullString()}>();
}}")
.Align(6)}

Просмотреть файл

@ -54,7 +54,7 @@ internal class ForceBindingsUpdateGenTool_1 : ICodeGenTool
{
var className = model.Name;
var updateInterface = _ctx.ForceBindingsUpdateInterface.ToDisplayString();
var updateInterface = _ctx.ForceBindingsUpdateInterface.ToFullString();
var fileCode = this.AsPartialOf(
model,
attributes: default,

Просмотреть файл

@ -84,8 +84,8 @@ internal record ForceBindingsUpdateGenerationContext(
_XBindFiles ??= Context
.AdditionalFiles
.Select(ExtractXBindClassName)
.Where(className=> className is not null)
.Select(x=>x!) // Is there a better way to force not null here?
.Where(className => className is not null)
.Select(x => x!) // Is there a better way to force not null here?
.ToImmutableHashSet();
return _XBindFiles;
}

Просмотреть файл

@ -33,7 +33,7 @@
<PackageVersion Include="SkiaSharp.Views.WPF" Version="2.88.7" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.1" />
<PackageVersion Include="System.Text.Json" Version="8.0.4" />
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI" Version="7.1.100" />
<PackageVersion Include="Uno.Core.Extensions.Logging.Singleton" Version="4.1.1" />
<PackageVersion Include="Uno.Extensions.Logging.OSLog " Version="1.7.0" />