Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved memory performance of TextColorToGenerator #1254

Merged
merged 8 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ jobs:

# check vulnerabilities
- powershell: |
dotnet list $(PathToLibrarySolution) package --vulnerable --include-transitive | findstr /S /c:"has the following vulnerable packages";
dotnet list $(PathToLibrarySolution) package --include-transitive # Print all transitive packages
dotnet list $(PathToLibrarySolution) package --vulnerable --include-transitive | findstr /S /c:"has the following vulnerable packages"; # Print all transitive packages with vulnerabilities
if ($LastExitCode -ne 1)
{
dotnet list $(PathToLibrarySolution) package --vulnerable --include-transitive;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
<None Include="ReadMe.txt" pack="true" PackagePath="." />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.Contains('-tizen'))">
<PackageReference Include="SkiaSharp.Views" Version="[2.88.6,)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,24 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
throw new Exception("There's no .NET MAUI referenced in the project.");
}

var mauiAssembly = compilation.SourceModule.ReferencedAssemblySymbols.Single(q => q.Name == mauiControlsAssembly);
var mauiAssembly = default(IAssemblySymbol);
foreach (var assemblySymbol in compilation.SourceModule.ReferencedAssemblySymbols)
{
if (assemblySymbol.Name == mauiControlsAssembly)
{
if (mauiAssembly is not null)
{
throw new InvalidOperationException("There can only be one reference to the Maui Controls assembly.");
}

mauiAssembly = assemblySymbol;
}
}
if (mauiAssembly is null)
{
throw new InvalidOperationException("There is no reference to the Maui Controls assembly.");
}

var symbols = GetMauiInterfaceImplementors(mauiAssembly, iAnimatableInterfaceSymbol, iTextStyleInterfaceSymbol).Where(static x => x is not null);

return symbols;
Expand Down