Skip to content

Commit 06f309e

Browse files
authored
Merge pull request #10 from nzdev/feature/polly-v8-build
Fix cake build errors for V8
2 parents b9b58d5 + 3347fc9 commit 06f309e

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
os: Visual Studio 2019
1+
os: Visual Studio 2022
22

33
# Build script
44
build_script:

build.cake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ var configuration = Argument<string>("configuration", "Release");
1616
// EXTERNAL NUGET LIBRARIES
1717
//////////////////////////////////////////////////////////////////////
1818

19-
#addin "Cake.FileHelpers"
20-
#addin nuget:?package=Cake.Yaml
19+
#addin nuget:?package=Cake.FileHelpers&version=3.1.0
20+
#addin nuget:?package=Cake.Yaml&version=3.0.0
2121
#addin nuget:?package=YamlDotNet&version=6.0.0
2222

2323
///////////////////////////////////////////////////////////////////////////////

src/Polly.Contrib.DuplicateRequestCollapser/CacheStampedeResilienceStrategy.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,17 @@ protected override async ValueTask<Outcome<TResult>> ExecuteCore<TResult, TState
7676
// As soon as the lazy has returned a result to one thread, the concurrent request set is over, so we evict the lazy from the ConcurrentDictionary.
7777
// We need to evict within a lock, to be sure we are not, due to potential race with new threads populating, evicting a different lazy created by a different thread.
7878
// To reduce lock contention, first check outside the lock whether we still need to remove it (we will double-check inside the lock).
79-
if (_collapser.TryGetValue(key, out Lazy<ValueTask<object>> currentValue))
79+
Lazy<ValueTask<object>>? currentValue = null;
80+
if (_collapser.TryGetValue(key, out currentValue))
8081
{
8182
if (currentValue == lazy)
8283
{
8384
await using (_lockProvider.AcquireLockAsync(key, context, context.CancellationToken, context.ContinueOnCapturedContext)
8485
.ConfigureAwait(context.ContinueOnCapturedContext))
8586
{
87+
Lazy<ValueTask<object>>? valueWithinLock = null;
8688
// Double-check that there has not been a race which updated the dictionary with a new value.
87-
if (_collapser.TryGetValue(key, out Lazy<ValueTask<object>> valueWithinLock))
89+
if (_collapser.TryGetValue(key, out valueWithinLock))
8890
{
8991
if (valueWithinLock == lazy)
9092
{

src/Polly.Contrib.DuplicateRequestCollapser/Polly.Contrib.DuplicateRequestCollapser.csproj

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<LangVersion>latest</LangVersion>
66
<AssemblyName>Polly.Contrib.DuplicateRequestCollapser</AssemblyName>
77
<RootNamespace>Polly.Contrib.DuplicateRequestCollapser</RootNamespace>
8-
<Version>0.3.0-v030-0001</Version>
9-
<AssemblyVersion>0.3.0.0</AssemblyVersion>
10-
<PackageVersion>0.3.0-v030-0001</PackageVersion>
11-
<FileVersion>0.3.0.0</FileVersion>
12-
<InformationalVersion>0.3.0.0</InformationalVersion>
8+
<Version>0.4.0-v040-0001</Version>
9+
<AssemblyVersion>0.4.0.0</AssemblyVersion>
10+
<PackageVersion>0.3.0-v040-0001</PackageVersion>
11+
<FileVersion>0.4.0.0</FileVersion>
12+
<InformationalVersion>0.4.0.0</InformationalVersion>
1313
<Company>App vNext</Company>
1414
<Copyright>Copyright (c) 2020, App vNext and contributors</Copyright>
1515
<Description>Polly.Contrib.DuplicateRequestCollapser is a Polly policy to collapse concurrent duplicate requests to a single execution, integrating with the Polly resilience project for .NET</Description>
@@ -50,12 +50,16 @@
5050
<NeutralLanguage>en-US</NeutralLanguage>
5151
<AssemblyTitle>Polly.Contrib.DuplicateRequestCollapser</AssemblyTitle>
5252
<PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression>
53-
<PackageIconUrl>https://raw.github.com/App-vNext/Polly/master/Polly.png</PackageIconUrl>
53+
<PackageIcon>package-icon.png</PackageIcon>
5454
<PackageProjectUrl>https://github.com/Polly-Contrib/Polly.Contrib.DuplicateRequestCollapser</PackageProjectUrl>
5555
<PackageTags>Exception Handling Resilience Transient Fault Policy Polly</PackageTags>
5656
<PackageReleaseNotes>Custom build because the other nuget isn't getting a response from the owner</PackageReleaseNotes>
5757
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
5858
<Title>Polly.Contrib.DuplicateRequestCollapser </Title>
5959
<PackageId>DigitalRuby.$(AssemblyName)</PackageId>
60+
<Authors>App vNext</Authors>
6061
</PropertyGroup>
62+
<ItemGroup>
63+
<None Include="$(MsBuildThisFileDirectory)..\$(PackageIcon)" Pack="true" PackagePath="" />
64+
</ItemGroup>
6165
</Project>

src/package-icon.png

8.72 KB
Loading

0 commit comments

Comments
 (0)