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

Release 0.9.9.47 #804

Merged
merged 4 commits into from
Aug 20, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Daybreak.GWCA/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()
set(VERSION_MAJOR 0)
set(VERSION_MINOR 9)
set(VERSION_PATCH 9)
set(VERSION_TWEAK 46)
set(VERSION_TWEAK 47)

set(VERSION_RC "${CMAKE_CURRENT_BINARY_DIR}/version.rc")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/version.rc.in" "${VERSION_RC}" @ONLY)
Expand Down
9 changes: 5 additions & 4 deletions Daybreak/Daybreak.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<LangVersion>preview</LangVersion>
<ApplicationIcon>Daybreak.ico</ApplicationIcon>
<IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation>
<Version>0.9.9.46</Version>
<Version>0.9.9.47</Version>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<UserSecretsId>cfb2a489-db80-448d-a969-80270f314c46</UserSecretsId>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
Expand Down Expand Up @@ -94,7 +94,7 @@
<PackageReference Include="AvalonEdit" Version="6.3.0.90" />
<PackageReference Include="DiffPlex" Version="1.7.2" />
<PackageReference Include="DotNetZip" Version="1.16.0" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.61" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.64" />
<PackageReference Include="ini-parser-netstandard" Version="2.5.2" />
<PackageReference Include="LiteDB" Version="5.0.20" />
<PackageReference Include="LiveChartsCore.SkiaSharpView.WPF" Version="2.0.0-rc2" />
Expand All @@ -103,7 +103,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2592.51" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2651.64" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.122" />
<PackageReference Include="NAudio" Version="2.2.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
Expand All @@ -113,13 +113,14 @@
<PackageReference Include="SharpNav" Version="0.9.2" />
<PackageReference Include="Slim" Version="1.9.2" />
<PackageReference Include="Svg" Version="3.4.7" />
<PackageReference Include="System.Formats.Asn1" Version="8.0.1" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Reflection.Metadata" Version="8.0.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="SystemExtensions.NetCore" Version="1.0.1" />
<PackageReference Include="SystemExtensions.NetStandard" Version="1.6.3" />
<PackageReference Include="SystemExtensions.NetStandard" Version="1.6.4" />
<PackageReference Include="SystemExtensions.NetStandard.DependencyInjection" Version="1.4.0" />
<PackageReference Include="WpfExtended" Version="0.7.7" />
<PackageReference Include="WpfExtended.SourceGeneration" Version="0.3.0" />
Expand Down
2 changes: 0 additions & 2 deletions Daybreak/Services/BuildTemplates/BuildTemplateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public SingleBuildEntry CreateSingleBuild(string name)

public TeamBuildEntry CreateTeamBuild()
{
var emptyBuild = new Build();
var name = Guid.NewGuid().ToString();
var entry = new TeamBuildEntry
{
Expand All @@ -85,7 +84,6 @@ public TeamBuildEntry CreateTeamBuild()

public TeamBuildEntry CreateTeamBuild(string name)
{
var emptyBuild = new Build();
var entry = new TeamBuildEntry
{
Name = name,
Expand Down
2 changes: 1 addition & 1 deletion Daybreak/Services/Images/ImageCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public ImageCache(

try
{
var imageSource = await this.GetImageInternal(uri, scopedLogger);
var imageSource = await new TaskFactory().StartNew(() => this.GetImageInternal(uri, scopedLogger), TaskCreationOptions.LongRunning).Unwrap();
return imageSource;
}
catch(Exception ex)
Expand Down
3 changes: 1 addition & 2 deletions Daybreak/Services/Metrics/MetricsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ public IEnumerable<MetricSet> GetMetrics()
private void MeasurementRecorded<T>(Instrument instrument, T measurement, ReadOnlySpan<KeyValuePair<string, object?>> tags, object? state)
{
MetricSet? newMetricSet = default;
RecordedMetric? newRecordedMetric = default;
MetricsSemaphore.Wait();

if (measurement is null)
Expand All @@ -139,7 +138,7 @@ private void MeasurementRecorded<T>(Instrument instrument, T measurement, ReadOn
metrics.RemoveFirst();
}

newRecordedMetric = new RecordedMetric { Instrument = instrument, Metric = metric };
var newRecordedMetric = new RecordedMetric { Instrument = instrument, Metric = metric };
MetricsSemaphore.Release();

if (newMetricSet is not null)
Expand Down
4 changes: 2 additions & 2 deletions Daybreak/Services/Pathfinding/SharpNavPathfinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public SharpNavPathfinder(

public async Task<Result<PathfindingResponse, PathfindingFailure>> CalculatePath(PathingData map, Point startPoint, Point endPoint, CancellationToken cancellationToken)
{
return await new TaskFactory().StartNew(() => this.CalculatePathInternal(map, startPoint, endPoint, cancellationToken), cancellationToken, TaskCreationOptions.LongRunning, TaskScheduler.Current);
return await new TaskFactory().StartNew(() => this.CalculatePathInternal(map, startPoint, endPoint), cancellationToken, TaskCreationOptions.LongRunning, TaskScheduler.Current);
}

public Task<NavMesh?> GenerateNavMesh(List<Trapezoid> trapezoids, CancellationToken cancellationToken)
Expand All @@ -66,7 +66,7 @@ public async Task<Result<PathfindingResponse, PathfindingFailure>> CalculatePath
return new TaskFactory().StartNew(() => this.GenerateNavMesh(ConvertTrapezoidsToTriangles(trapezoids), settings), cancellationToken, TaskCreationOptions.LongRunning, TaskScheduler.Current);
}

private Result<PathfindingResponse, PathfindingFailure> CalculatePathInternal(PathingData pathingData, Point startPoint, Point endPoint, CancellationToken cancellationToken)
private Result<PathfindingResponse, PathfindingFailure> CalculatePathInternal(PathingData pathingData, Point startPoint, Point endPoint)
{
var scopedLogger = this.logger.CreateScopedLogger(nameof(this.CalculatePath), string.Empty);
if (pathingData is null ||
Expand Down
2 changes: 1 addition & 1 deletion Daybreak/Services/Screenshots/BackgroundProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public async Task<BackgroundResponse> GetBackground()
Random.Shared.Next(this.liveOptions.Value.LocalScreenshotsEnabled ? 0 : 50, 101) >= 50) ||
maybeImage is null)
{
(var maybeRemoteImage, var credit) = await this.bloogumClient.GetImage(true).ConfigureAwait(true);
(var maybeRemoteImage, var credit) = await new TaskFactory().StartNew(() => this.bloogumClient.GetImage(true), TaskCreationOptions.LongRunning).Unwrap().ConfigureAwait(true);
maybeImage = maybeRemoteImage;
creditText = credit;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Newtonsoft.Json.Linq;
using System;
using System.Core.Extensions;
using System.Extensions;
using System.Reflection;

namespace Daybreak.Services.Startup.Actions;
Expand All @@ -25,12 +26,20 @@ public CredentialsOptionsMigrator(

public override void ExecuteOnStartup()
{
var newOptionsKey = GetNewOptionsKey();
var scopedLogger = this.logger.CreateScopedLogger(nameof(this.ExecuteOnStartup), string.Empty);
if (this.optionsProvider.TryGetKeyedOptions(newOptionsKey) is JObject)
{
scopedLogger.LogDebug($"Found [{newOptionsKey}]. No migration needed");
return;
}

if (this.optionsProvider.TryGetKeyedOptions(OldOptionsKey) is not JObject options)
{
scopedLogger.LogDebug($"Could not find [{OldOptionsKey}]. No migration possible");
return;
}

var newOptionsKey = GetNewOptionsKey();
this.logger.LogInformation($"Found [{OldOptionsKey}]. Migrating options to [{newOptionsKey}]");
this.optionsProvider.SaveRegisteredOptions(newOptionsKey, options);
}
Expand Down
6 changes: 3 additions & 3 deletions Daybreak/Services/TradeChat/TradeAlertingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ private async void StartAlertingService(CancellationToken cancellationToken)
}

await Task.WhenAll(
this.CheckTraderQuotes(cancellationToken),
this.CheckLiveTrades(this.kamadanTradeChatService, TraderSource.Kamadan, cancellationToken),
this.CheckLiveTrades(this.ascalonTradeChatService, TraderSource.Ascalon, cancellationToken));
new TaskFactory().StartNew(() => this.CheckTraderQuotes(cancellationToken), cancellationToken, TaskCreationOptions.LongRunning, TaskScheduler.Current).Unwrap(),
new TaskFactory().StartNew(() => this.CheckLiveTrades(this.kamadanTradeChatService, TraderSource.Kamadan, cancellationToken), cancellationToken, TaskCreationOptions.LongRunning, TaskScheduler.Current).Unwrap(),
new TaskFactory().StartNew(() => this.CheckLiveTrades(this.ascalonTradeChatService, TraderSource.Ascalon, cancellationToken), cancellationToken, TaskCreationOptions.LongRunning, TaskScheduler.Current).Unwrap());
}

private async Task CheckLiveTrades<T>(ITradeChatService<T> tradeChatService, TraderSource traderSource, CancellationToken cancellationToken)
Expand Down
2 changes: 1 addition & 1 deletion GWCA
Submodule GWCA updated from f424ed to 2e2bf3
Loading