Skip to content

Commit

Permalink
Change MS.EXT and System package versioning to ranged (#7029)
Browse files Browse the repository at this point in the history
* Change MS.EXT and System package versioning to ranged

* Cleanup versioning

* Fix exception type mismatch on unit tests

* Fix mismatched exception in unit tests
  • Loading branch information
Arkatufus authored Dec 29, 2023
1 parent dbac721 commit 2633f91
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 27 deletions.
12 changes: 6 additions & 6 deletions src/Akka.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AROUND_MULTIPLICATIVE_OP/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue">//-----------------------------------------------------------------------&#xD;
// &lt;copyright file="${File.FileName}" company="Akka.NET Project"&gt;&#xD;
// Copyright (C) 2009-${CurrentDate.Year} Lightbend Inc. &lt;http://www.lightbend.com&gt;&#xD;
// Copyright (C) 2013-${CurrentDate.Year} .NET Foundation &lt;https://github.com/akkadotnet/akka.net&gt;&#xD;
// &lt;/copyright&gt;&#xD;
//-----------------------------------------------------------------------</s:String>
<s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue">-----------------------------------------------------------------------&#xD;
&lt;copyright file="${File.FileName}" company="Akka.NET Project"&gt;&#xD;
Copyright (C) 2009-${CurrentDate.Year} Lightbend Inc. &lt;http://www.lightbend.com&gt;&#xD;
Copyright (C) 2013-${CurrentDate.Year} .NET Foundation &lt;https://github.com/akkadotnet/akka.net&gt;&#xD;
&lt;/copyright&gt;&#xD;
-----------------------------------------------------------------------</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=FSM/@EntryIndexedValue">FSM</s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECodeCleanup_002EFileHeader_002EFileHeaderSettingsMigrate/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
Expand Down
3 changes: 2 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
<HoconVersion>2.0.3</HoconVersion>
<ConfigurationManagerVersion>6.0.1</ConfigurationManagerVersion>
<MultiNodeAdapterVersion>1.5.13</MultiNodeAdapterVersion>
<MicrosoftLibVersion>5.0.0</MicrosoftLibVersion>
<MicrosoftLibVersion>[6.0.*,)</MicrosoftLibVersion>
<MsExtVersion>[6.0.*,)</MsExtVersion>
<AkkaPackageTags>akka;actors;actor model;Akka;concurrency</AkkaPackageTags>
</PropertyGroup>
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="$(MsExtVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="xunit" Version="$(XunitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[3.1.0,)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MsExtVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/core/Akka.Streams.TestKit.Tests/StreamTestKitSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ await Source.From(Enumerable.Range(1, 3).Select(i =>
.ToStrictAsync(TimeSpan.FromMilliseconds(300))
.ToListAsync();
})
.Should().ThrowAsync<FailException>();
.Should().ThrowAsync<ArgumentException>();

var error = err.Subject.First();
var aggregateException = error.InnerException;
Expand Down Expand Up @@ -106,7 +106,7 @@ await Source.From(Enumerable.Range(1, 4)).RunWith(this.SinkProbe<int>(), Materia
.Request(4)
.ExpectNextOrError(100, Ex())
.ExecuteAsync();
}).Should().ThrowAsync<FailException>().WithMessage("*OnNext(100)*");
}).Should().ThrowAsync<TrueException>().WithMessage("*OnNext(100)*");
}

[Fact]
Expand Down Expand Up @@ -197,7 +197,7 @@ await Source.Single(1).RunWith(this.SinkProbe<int>(), Materializer)
.AsyncBuilder()
.Request(1)
.ExpectNextAsync<int>(i => i == 2);
}).Should().ThrowAsync<FailException>().WithMessage("Got a message of the expected type*");
}).Should().ThrowAsync<TrueException>().WithMessage("Got a message of the expected type*");
}

[Fact]
Expand Down Expand Up @@ -231,7 +231,7 @@ await Source.Single(1).RunWith(this.SinkProbe<int>(), Materializer)
.Request(1)
.MatchNext<int>(i => i == 2)
.ExecuteAsync();
}).Should().ThrowAsync<FailException>().WithMessage("Got a message of the expected type*");
}).Should().ThrowAsync<TrueException>().WithMessage("Got a message of the expected type*");
}

[Fact]
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka.Streams/Akka.Streams.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == '$(NetStandardLibVersion)' ">
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="$(MicrosoftLibVersion)" />
</ItemGroup>
<ItemGroup>
<None Update="CodeGen\Dsl\GraphApply.tt">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public async Task FishForMessageAsync_should_dilate_timeout()
{
var stopwatch = Stopwatch.StartNew();
await Awaiting(async () => await FishForMessageAsync(_=>false, TimeSpan.FromMilliseconds(Timeout)))
.Should().ThrowAsync<FailException>();
.Should().ThrowAsync<TrueException>();
stopwatch.Stop();
AssertDilated(stopwatch.ElapsedMilliseconds, $"Expected the timeout to be {ExpectedTimeout} but in fact it was {stopwatch.ElapsedMilliseconds}.");
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/Akka.TestKit/Akka.TestKit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="$(MicrosoftLibVersion)" />
<PackageReference Include="Nito.AsyncEx.Coordination" Version="5.1.2" />
<PackageReference Include="Nito.AsyncEx.Context" Version="5.1.2" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="System.Linq.Async" Version="$(MicrosoftLibVersion)" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka.Tests/Akka.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<AssemblyTitle>Akka.Tests</AssemblyTitle>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(NetFrameworkTestVersion);$(NetTestVersion)</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">$(NetTestVersion)</TargetFrameworks>
<TargetFramework Condition=" '$(OS)' != 'Windows_NT' ">$(NetTestVersion)</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 3 additions & 5 deletions src/core/Akka/Akka.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@

<ItemGroup>
<PackageReference Include="Polyfill" Version="1.28.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="7.0.10" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="$(MsExtVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
<PackageReference Include="System.Collections.Immutable" Version="$(MicrosoftLibVersion)" />
<PackageReference Include="System.Threading.Channels" Version="$(MicrosoftLibVersion)" />
<PackageReference Include="System.Configuration.ConfigurationManager">
<Version>$(ConfigurationManagerVersion)</Version>
</PackageReference>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(ConfigurationManagerVersion)"/>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="$(MsExtVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="$(MsExtVersion)" />
<PackageReference Include="Microsoft.Extensions.Http" Version="$(MsExtVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 2633f91

Please sign in to comment.