Merge pull request #943 from 13xforever/vnext

Maintenance
This commit is contained in:
clienthax 2023-09-26 19:08:20 +01:00 committed by GitHub
commit 07c654cd65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 73 additions and 91 deletions

View File

@ -1,6 +0,0 @@
task:
name: Dummy
container:
image: alpine:latest
script:
- echo "wtf is this shit and why should I configure this to prevent it executing Dockerfile"

View File

@ -11,6 +11,6 @@
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="StrawberryShake.Server" Version="13.4.0" />
<PackageReference Include="StrawberryShake.Server" Version="13.5.1" />
</ItemGroup>
</Project>

View File

@ -17,7 +17,7 @@
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.9" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="NLog" Version="5.2.4" />
</ItemGroup>
</Project>

View File

@ -7,7 +7,7 @@
<ItemGroup>
<PackageReference Include="Crc32.NET" Version="1.2.0" />
<PackageReference Include="DiscUtils.OpticalDisk" Version="0.16.13" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.51" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.53" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" />
</ItemGroup>
<ItemGroup>

View File

@ -109,9 +109,7 @@ internal sealed class Vision: BaseCommandModuleCustom
await using (var stream = await httpClient.GetStreamAsync(imageUrl).ConfigureAwait(false))
await stream.CopyToAsync(imageStream).ConfigureAwait(false);
imageStream.Seek(0, SeekOrigin.Begin);
#pragma warning disable VSTHRD103
using var img = Image.Load(imageStream, out var imgFormat);
#pragma warning restore VSTHRD103
using var img = await Image.LoadAsync(imageStream).ConfigureAwait(false);
imageStream.Seek(0, SeekOrigin.Begin);
//resize and shrink file size to get under azure limits
@ -123,7 +121,7 @@ internal sealed class Vision: BaseCommandModuleCustom
resized = true;
}
img.Mutate(i => i.AutoOrient());
if (resized || imgFormat.Name != JpegFormat.Instance.Name)
if (resized || img.Metadata.DecodedImageFormat?.Name != JpegFormat.Instance.Name)
{
imageStream.SetLength(0);
await img.SaveAsync(imageStream, new JpegEncoder {Quality = 90}).ConfigureAwait(false);
@ -236,7 +234,7 @@ internal sealed class Vision: BaseCommandModuleCustom
var complementaryColor = complementaryPalette[i % complementaryPalette.Count];
var textOptions = new TextOptions(font)
{
KerningMode = KerningMode.Normal,
KerningMode = KerningMode.Standard,
#if LABELS_INSIDE
WrapTextWidth = r.W - 10,
#endif
@ -244,7 +242,7 @@ internal sealed class Vision: BaseCommandModuleCustom
var textDrawingOptions = new DrawingOptions {GraphicsOptions = fgGop/*, TextOptions = textOptions*/};
//var brush = Brushes.Solid(Color.Black);
//var pen = Pens.Solid(color, 2);
var textBox = TextMeasurer.Measure(label, textOptions);
var textBox = TextMeasurer.MeasureBounds(label, textOptions);
#if LABELS_INSIDE
var textHeightScale = (int)Math.Ceiling(textBox.Width / Math.Min(img.Width - r.X - 10 - 4 * scale, r.W - 4 * scale));
#endif

View File

@ -43,31 +43,31 @@
<PackageReference Include="DSharpPlus.CommandsNext" Version="4.4.2" />
<PackageReference Include="DSharpPlus.Interactivity" Version="4.4.2" />
<PackageReference Include="DSharpPlus.SlashCommands" Version="4.4.2" />
<PackageReference Include="Google.Apis.Drive.v3" Version="1.61.0.3120" />
<PackageReference Include="Google.Apis.Drive.v3" Version="1.62.0.3155" />
<PackageReference Include="ksemenenko.ColorThief" Version="1.1.1.4" />
<PackageReference Include="MathParser.org-mXparser" Version="5.2.1" />
<PackageReference Include="MegaApiClient" Version="1.10.3" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.21.0" />
<PackageReference Include="Microsoft.ApplicationInsights.PerfCounterCollector" Version="2.21.0" />
<PackageReference Include="Microsoft.Azure.CognitiveServices.Vision.ComputerVision" Version="7.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.9">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.11">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.11" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" />
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.205.1" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
<PackageReference Include="Nerdbank.Streams" Version="2.10.69" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.2" />
<PackageReference Include="NLog" Version="5.2.4" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.4" />
<PackageReference Include="NReco.Text.AhoCorasickDoubleArrayTrie" Version="1.1.1" />
<PackageReference Include="SharpCompress" Version="0.33.0" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta15" />
<PackageReference Include="SharpCompress" Version="0.34.0" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.0.0" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
</ItemGroup>
<ItemGroup>

View File

@ -76,6 +76,7 @@ internal partial class LogParser
["Accurate xfloat:"] = new(@"Accurate xfloat: (?<accurate_xfloat>.*?)\r?$", DefaultOptions),
["Approximate xfloat:"] = new(@"Approximate xfloat: (?<approximate_xfloat>.*?)\r?$", DefaultOptions),
["Relaxed xfloat:"] = new(@"Relaxed xfloat: (?<relaxed_xfloat>.*?)\r?$", DefaultOptions),
["XFloat Accuracy:"] = new(@"XFloat Accuracy: (?<xfloat_mode>.*?)\r?$", DefaultOptions),
["Accurate GETLLAR:"] = new(@"Accurate GETLLAR: (?<accurate_getllar>.*?)\r?$", DefaultOptions),
["Accurate PUTLLUC:"] = new(@"Accurate PUTLLUC: (?<accurate_putlluc>.*?)\r?$", DefaultOptions),
["Accurate RSX reservation access:"] = new(@"Accurate RSX reservation access: (?<accurate_rsx_reservation>.*?)\r?$", DefaultOptions),

View File

@ -37,9 +37,7 @@ internal static partial class LogParserResult
var serial = items["serial"] ?? "";
BuildFatalErrorSection(builder, items, multiItems, notes);
Version? buildVersion = null;
if (items["build_branch"] is "HEAD" or "master")
Version.TryParse(items["build_full_version"], out buildVersion);
TryGetRpcs3Version(items, out var buildVersion);
var supportedGpu = string.IsNullOrEmpty(items["rsx_unsupported_gpu"]) && items["supported_gpu"] != DisabledMark;
var unsupportedGpuDriver = false;
if (Config.Colors.CompatStatusNothing.Equals(builder.Color.Value) || Config.Colors.CompatStatusLoadable.Equals(builder.Color.Value))
@ -313,7 +311,7 @@ internal static partial class LogParserResult
else if (driverVersionString.Contains("older than", StringComparison.InvariantCultureIgnoreCase))
{
if (IsAmd(gpuInfo))
notes.Add($"❗ Please update your AMD GPU driver to version {AmdLastGoodOpenGLWindowsVersion} or newer");
notes.Add($"❗ Please update your AMD GPU driver to version {AmdRecommendedOldWindowsVersion} or newer");
}
}
}
@ -541,8 +539,7 @@ internal static partial class LogParserResult
}
else if (fatalError.Contains("RSX Decompiler Thread"))
{
if (items["build_branch"] is "HEAD" or "master"
&& Version.TryParse(items["build_full_version"], out var v)
if (TryGetRpcs3Version(items, out var v)
&& v >= DecompilerIssueStartVersion
&& v < DecompilerIssueEndVersion)
{

View File

@ -29,9 +29,7 @@ internal static partial class LogParserResult
var hasTsxFa = items["cpu_extensions"]?.Contains("TSX-FA") ?? false;
items["has_tsx"] = hasTsx ? EnabledMark : DisabledMark;
items["has_tsx_fa"] = hasTsxFa ? EnabledMark : DisabledMark;
Version? buildVersion = null;
if (items["build_branch"] is "HEAD" or "master"
&& Version.TryParse(items["build_full_version"], out buildVersion)
if (TryGetRpcs3Version(items, out var buildVersion)
&& buildVersion < TsxFaFixedVersion)
{
if (items["enable_tsx"] == "Disabled" && hasTsx && !hasTsxFa)
@ -271,33 +269,14 @@ internal static partial class LogParserResult
if (items["accurate_rsx_reservation"] == EnabledMark)
notes.Add(" `Accurate RSX Reservation Access` is enabled");
if (items["accurate_xfloat"] is string accurateXfloat)
{
if (accurateXfloat == EnabledMark)
{
if (!KnownGamesThatRequireAccurateXfloat.Contains(serial))
notes.Add("⚠️ `Accurate xfloat` is not required, and significantly impacts performance");
}
else
{
if (KnownGamesThatRequireAccurateXfloat.Contains(serial))
notes.Add("⚠️ `Accurate xfloat` is required for this game, but it will significantly impact performance");
}
}
if (items["relaxed_xfloat"] is DisabledMark)
{
if (KnownNoRelaxedXFloatIds.Contains(serial))
notes.Add(" `Relaxed xfloat` is disabled");
else
notes.Add("⚠️ `Relaxed xfloat` is disabled, please enable");
}
if (items["approximate_xfloat"] is DisabledMark)
{
if (KnownNoApproximateXFloatIds.Contains(serial))
notes.Add(" `Approximate xfloat` is disabled");
else
notes.Add("⚠️ `Approximate xfloat` is disabled, please enable");
}
if (KnownGamesThatRequireAccurateXfloat.Contains(serial) && items["xfloat_mode"] is not "Accurate")
notes.Add("⚠️ `Accurate xfloat` is required for this game");
else if (items["xfloat_mode"] is "Accurate" && !KnownGamesThatRequireAccurateXfloat.Contains(serial))
notes.Add("⚠️ `Accurate xfloat` is not required, and significantly impacts performance");
else if (items["xfloat_mode"] is "Relaxed" or "Inaccurate" && !KnownNoApproximateXFloatIds.Contains(serial))
notes.Add("⚠️ `Approximate xfloat` is disabled, please enable");
else if (items["xfloat_mode"] is "Inaccurate" && !KnownNoRelaxedXFloatIds.Contains(serial))
notes.Add("⚠️ `Relaxed xfloat` is disabled, please enable");
if (items["resolution_scale"] is string resScale
&& int.TryParse(resScale, out var resScaleFactor))
{
@ -403,7 +382,7 @@ internal static partial class LogParserResult
CheckP5Settings(serial, items, notes, generalNotes, ppuHashes, ppuPatches, patchNames);
CheckAsurasWrathSettings(serial, items, notes);
CheckJojoSettings(serial, state, notes, ppuPatches, ppuHashes, generalNotes);
CheckSimpsonsSettings(serial, generalNotes);
CheckSimpsonsSettings(serial, items, generalNotes, ppuPatches, patchNames);
CheckNierSettings(serial, items, notes, ppuPatches, ppuHashes, generalNotes);
CheckDod3Settings(serial, items, notes, ppuPatches, ppuHashes, generalNotes);
CheckScottPilgrimSettings(serial, items, notes, generalNotes);
@ -700,9 +679,14 @@ internal static partial class LogParserResult
}
}
private static void CheckSimpsonsSettings(string serial, List<string> generalNotes)
private static void CheckSimpsonsSettings(string serial, NameValueCollection items, List<string> generalNotes, Dictionary<string, int> ppuPatches, UniqueList<string> patchNames)
{
if (serial is "BLES00142" or "BLUS30065")
if (serial is not ("BLES00142" or "BLUS30065"))
return;
var hasPatch = ppuPatches.Any() && patchNames.Any(n => n.Contains("Fix pad initialization", StringComparison.OrdinalIgnoreCase));
if ((!TryGetRpcs3Version(items, out var v) || v < FixedSimpsonsBuild)
&& !hasPatch)
generalNotes.Add(" This game has a controller initialization bug. Please use [the patch](https://wiki.rpcs3.net/index.php?title=The_Simpsons_Game#Patches).");
}
@ -944,8 +928,7 @@ internal static partial class LogParserResult
notes.Add("⚠️ Please enable `Read Color Buffers`");
var depthBufferPatchesAreApplied = ppuPatches.Any() && patchNames.Count(n => n.Contains("depth buffer", StringComparison.OrdinalIgnoreCase)) > 1;
if (items["build_branch"] is "HEAD" or "master"
&& Version.TryParse(items["build_full_version"], out var buildVersion)
if (TryGetRpcs3Version(items, out var buildVersion)
&& buildVersion < FixedTlouRcbBuild)
{
if (items["read_depth_buffer"] == EnabledMark)

View File

@ -65,8 +65,7 @@ internal static partial class LogParserResult
private static readonly Version NvidiaRecommendedWindowsVersion = new(512, 16);
private static readonly Version NvidiaRecommendedLinuxVersion = new(515, 57);
private static readonly Version AmdRecommendedOldWindowsVersion = new(22, 5, 2);
private static readonly Version AmdLastGoodOpenGLWindowsVersion = new(22, 5, 2);
private static readonly Version AmdRecommendedOldWindowsVersion = new(23, 2, 1);
private static readonly Version NvidiaFullscreenBugFixed = new(0, 0, 6, 8204);
private static readonly Version TsxFaFixedVersion = new(0, 0, 12, 10995);
@ -74,9 +73,8 @@ internal static partial class LogParserResult
private static readonly Version IntelThreadSchedulerBuildVersion = new(0, 0, 15, 12008);
private static readonly Version PsnDiscFixBuildVersion = new(0, 0, 18, 12783);
private static readonly Version CubebBuildVersion = new(0, 0, 19, 13050);
private static readonly Version FixedTlouRcbBuild = new Version(0, 0, 21, 13432); // the best I got was "it was fixed more than a year ago", so it's just a random build from a year ago
private static readonly Version FixedTlouRcbBuild = new(0, 0, 21, 13432); // the best I got was "it was fixed more than a year ago", so it's just a random build from a year ago
private static readonly Version FixedSimpsonsBuild = new(0, 0, 29, 15470);
private static readonly Dictionary<string, string> RsxPresentModeMap = new()
{
@ -433,7 +431,7 @@ internal static partial class LogParserResult
}
else
{
builder = new DiscordEmbedBuilder
builder = new()
{
Description = "Log analysis failed. Please try again.",
Color = Config.Colors.LogResultFailed,
@ -606,26 +604,30 @@ internal static partial class LogParserResult
if (items["cpu_preempt_count"] is "0")
items["cpu_preempt_count"] = "Disabled";
if (items["relaxed_xfloat"] is null)
if (items["xfloat_mode"] is null) // accurate, approximate, relaxed, inaccurate
{
items["xfloat_mode"] = (items["accurate_xfloat"], items["approximate_xfloat"]) switch
if (items["relaxed_xfloat"] is null)
{
( "true", _) => "Accurate",
( _, "true") => "Approximate",
( _, _) v => $"[{(v.Item1 == "true"? "a" : "-")}{(v.Item2 == "true"? "x" : "-")}]",
};
}
else
{
items["xfloat_mode"] = (items["accurate_xfloat"], items["approximate_xfloat"], items["relaxed_xfloat"]) switch
items["xfloat_mode"] = (items["accurate_xfloat"], items["approximate_xfloat"]) switch
{
("true", _) => "Accurate",
(_, "true") => "Approximate",
(_, _) v => $"[{(v.Item1 == "true" ? "a" : "-")}{(v.Item2 == "true" ? "x" : "-")}]",
};
}
else
{
( "true", "false", "true") => "Accurate",
("false", "true", "true") => "Approximate",
("false", "false", "true") => "Relaxed",
( _, _, _) v => $"[{(v.Item1 == "true"? "a" : "-")}{(v.Item2 == "true"? "x" : "-")}{(v.Item3 == "true"? "r" : "-")}]",
};
items["xfloat_mode"] = (items["accurate_xfloat"], items["approximate_xfloat"], items["relaxed_xfloat"]) switch
{
("true", "false", "true") => "Accurate",
("false", "true", "true") => "Approximate",
("false", "false", "true") => "Relaxed",
("false", "false", "false") => "Inaccurate",
(_, _, _) v => $"[{(v.Item1 == "true" ? "a" : "-")}{(v.Item2 == "true" ? "x" : "-")}{(v.Item3 == "true" ? "r" : "-")}]",
};
}
}
static string? reformatDecoder(string? dec)
{
if (string.IsNullOrEmpty(dec))
@ -959,6 +961,7 @@ internal static partial class LogParserResult
22000 => "11 21H2",
< 22621 => "11 22H2 Insider Build " + windowsVersion.Build,
22621 => "11 22H2",
22631 => "11 23H2",
< 23000 => "11 Beta Build " + windowsVersion.Build, // 22k series
< 24000 => "11 Dev Build " + windowsVersion.Build, // 23k series
< 25000 => "11 ??? Build " + windowsVersion.Build,
@ -1032,6 +1035,7 @@ internal static partial class LogParserResult
11 => "macOS Big Sur",
12 => "macOS Monterey",
13 => "macOS Ventura",
14 => "macOS Sonoma",
_ => null,
};
@ -1189,4 +1193,10 @@ internal static partial class LogParserResult
}
return result;
}
private static bool TryGetRpcs3Version(NameValueCollection items, out Version? version)
{
version = null;
return items["build_branch"] is "HEAD" or "master" && Version.TryParse(items["build_full_version"], out version);
}
}

View File

@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" PrivateAssets="all" />
</ItemGroup>

View File

@ -6,13 +6,13 @@
<ItemGroup>
<PackageReference Include="DuoVia.FuzzyStrings" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit.Analyzers" Version="3.6.1">
<PackageReference Include="NUnit.Analyzers" Version="3.7.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

View File

@ -21,7 +21,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GithubClient", "Clients\Git
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{AD87F38F-BFCE-4EA6-A430-20C497552FD7}"
ProjectSection(SolutionItems) = preProject
.cirrus.yml = .cirrus.yml
.github\workflows\codeql-analysis.yml = .github\workflows\codeql-analysis.yml
CONTRIBUTING.md = CONTRIBUTING.md
docker-compose.example.yml = docker-compose.example.yml