Skip to content

Commit

Permalink
Merge pull request #216 from akkadotnet/dev
Browse files Browse the repository at this point in the history
Hyperion v0.10.1 Release
  • Loading branch information
Aaronontheweb authored Apr 19, 2021
2 parents 7b6f992 + fbe7ece commit 615d9d1
Show file tree
Hide file tree
Showing 11 changed files with 946 additions and 30 deletions.
18 changes: 15 additions & 3 deletions Hyperion.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2005
# Visual Studio Version 16
VisualStudioVersion = 16.0.31112.23
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperion", "src\Hyperion\Hyperion.csproj", "{7AF8D2B6-9F1F-4A1C-8673-48E533108385}"
EndProject
Expand All @@ -19,7 +19,11 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Hyperion.Tests.FSharpData",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperion.Benchmarks", "src\Hyperion.Benchmarks\Hyperion.Benchmarks.csproj", "{CAE2DB69-0BE7-4B11-96DB-D5B61D35607F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hyperion.Tests", "src\Hyperion.Tests\Hyperion.Tests.csproj", "{EA096BA2-3B4C-4878-B9AD-5A88D164EBF0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperion.Tests", "src\Hyperion.Tests\Hyperion.Tests.csproj", "{EA096BA2-3B4C-4878-B9AD-5A88D164EBF0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hyperion.Akka.Integration.Tests", "src\Hyperion.Akka.Integration.Tests\Hyperion.Akka.Integration.Tests.csproj", "{3DA946AF-0CCD-49A9-AA77-67FA515A83EE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hyperion.API.Tests", "src\Hyperion.API.Tests\Hyperion.API.Tests.csproj", "{767FBBD2-869C-4AAD-ABF4-F23EC0D381AA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -43,6 +47,14 @@ Global
{EA096BA2-3B4C-4878-B9AD-5A88D164EBF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA096BA2-3B4C-4878-B9AD-5A88D164EBF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EA096BA2-3B4C-4878-B9AD-5A88D164EBF0}.Release|Any CPU.Build.0 = Release|Any CPU
{3DA946AF-0CCD-49A9-AA77-67FA515A83EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3DA946AF-0CCD-49A9-AA77-67FA515A83EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3DA946AF-0CCD-49A9-AA77-67FA515A83EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3DA946AF-0CCD-49A9-AA77-67FA515A83EE}.Release|Any CPU.Build.0 = Release|Any CPU
{767FBBD2-869C-4AAD-ABF4-F23EC0D381AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{767FBBD2-869C-4AAD-ABF4-F23EC0D381AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{767FBBD2-869C-4AAD-ABF4-F23EC0D381AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{767FBBD2-869C-4AAD-ABF4-F23EC0D381AA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
24 changes: 2 additions & 22 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,2 @@
### 0.10.0 April 13 2021 ####
* [Add a generic cross platform serialization support](https://github.com/akkadotnet/Hyperion/pull/208)

# Cross platform serialization

You can now address any cross platform package serialization differences by providing a list of package name transformation lambda function into the `SerializerOptions` constructor. The package name will be passed into the lambda function before it is deserialized, and the result of the string transformation is used for deserialization instead of the original package name.

This short example shows how to address the change from `System.Drawing` in .NET Framework to `System.Drawing.Primitives` in .NET Core:

```
Serializer serializer;
#if NETFX
serializer = new Serializer(new SerializerOptions(
packageNameOverrides: new List<Func<string, string>> {
str => str.Contains("System.Drawing.Primitives") ? str.Replace(".Primitives", "") : str
}));
#elif NETCOREAPP
serializer = new Serializer();
#endif
```

Note that only one package name transformation is allowed, any transform lambda function after the first applied transformation is ignored.
### 0.10.1 April 20 2021 ####
* [Fix SerializerOptions constructor backward compatibility issue with Akka.NET](https://github.com/akkadotnet/Hyperion/pull/214)
40 changes: 40 additions & 0 deletions src/Hyperion.API.Tests/CoreAPISpec.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using System;
using System.Linq;
using System.Runtime.CompilerServices;
using ApprovalTests;
using ApprovalTests.Reporters;
using PublicApiGenerator;
using Xunit;

namespace Hyperion.API.Tests
{
#if(DEBUG)
[UseReporter(typeof(DiffReporter), typeof(AllFailingTestsClipboardReporter))]
#else
[UseReporter(typeof(DiffReporter))]
#endif
public class CoreApiSpec
{
[Fact]
[MethodImpl(MethodImplOptions.NoInlining)]
public void ApproveApi()
{
var publicApi = Filter(typeof(Serializer).Assembly.GeneratePublicApi());
Approvals.Verify(publicApi);
}

static string Filter(string text)
{
return string.Join(Environment.NewLine, text.Split(new[]
{
Environment.NewLine
}, StringSplitOptions.RemoveEmptyEntries)
.Where(l =>
!l.StartsWith("[assembly: ReleaseDateAttribute(")
&& !l.StartsWith("[assembly: System.Security")
&& !l.StartsWith("[assembly: System.Runtime.Versioning.TargetFramework("))
.Where(l => !string.IsNullOrWhiteSpace(l))
);
}
}
}
Loading

0 comments on commit 615d9d1

Please sign in to comment.