-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #209 from akkadotnet/dev
v1.3.3 Release
- Loading branch information
Showing
11 changed files
with
209 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
#### 1.3.2 January 24 2020 #### | ||
#### 1.3.3 January 27 2020 #### | ||
**Bugfix release for HOCON v1.3.0** | ||
|
||
Key changes include: | ||
|
||
* [Critical bugfix: Fallbacks are mutable during traversal](https://github.com/akkadotnet/HOCON/issues/193) | ||
* [Added HOCON Debugger tools](https://github.com/akkadotnet/HOCON/pull/192) | ||
* [Performance: Lookups on configs with fallback are performing merge and allocations each time](https://github.com/akkadotnet/HOCON/issues/195) | ||
* [Make `Config` implement `ISerializable`](https://github.com/akkadotnet/HOCON/pull/207) | ||
* [Implement Akka.NET backwards compatibility fixes](https://github.com/akkadotnet/HOCON/pull/204) | ||
|
||
You can [see the full set of changes in the HOCON v1.3.2 milestone](https://github.com/akkadotnet/HOCON/milestone/5). | ||
You can [see the full set of changes in the HOCON v1.3.3 milestone](https://github.com/akkadotnet/HOCON/milestone/6). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="SerializationSpec.cs" company="Akka.NET Project"> | ||
// Copyright (C) 2013 - 2020 .NET Foundation <https://github.com/akkadotnet/hocon> | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
using System.Collections.Generic; | ||
using FluentAssertions; | ||
using Newtonsoft.Json; | ||
using Xunit; | ||
|
||
namespace Hocon.Configuration.Tests | ||
{ | ||
public class SerializationSpecs | ||
{ | ||
public static IEnumerable<object[]> HoconGenerator() | ||
{ | ||
yield return new object[] | ||
{ | ||
@" | ||
foo{ | ||
bar.biz = 12 | ||
baz = ""quoted"" | ||
} | ||
", string.Empty, string.Empty | ||
}; | ||
} | ||
|
||
[Theory(Skip = "Doesn't work right now")] | ||
[MemberData(nameof(HoconGenerator))] | ||
public void ShouldSerializeHocon(string hocon, string fallback1, string fallback2) | ||
{ | ||
var hocon1 = ConfigurationFactory.ParseString(hocon); | ||
var fb1 = string.IsNullOrEmpty(fallback1) ? Config.Empty : ConfigurationFactory.ParseString(fallback1); | ||
var fb2 = string.IsNullOrEmpty(fallback1) ? Config.Empty : ConfigurationFactory.ParseString(fallback2); | ||
|
||
var final = hocon1.WithFallback(fb1).WithFallback(fb2); | ||
|
||
VerifySerialization(final); | ||
} | ||
|
||
private void VerifySerialization(Config config) | ||
{ | ||
var serialized = JsonConvert.SerializeObject(config); | ||
var deserialized = (Config)JsonConvert.DeserializeObject(serialized); | ||
config.DumpConfig().Should().Be(deserialized.DumpConfig()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using FluentAssertions; | ||
using Hocon; | ||
using Newtonsoft.Json; | ||
|
||
namespace SerializationDebug | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
var hocon1 = @" | ||
foo{ | ||
bar.biz = 12 | ||
baz = ""quoted"" | ||
}"; | ||
|
||
ShouldSerializeHocon(hocon1, string.Empty, string.Empty); | ||
} | ||
|
||
public static void ShouldSerializeHocon(string hocon, string fallback1, string fallback2) | ||
{ | ||
var hocon1 = ConfigurationFactory.ParseString(hocon); | ||
var fb1 = string.IsNullOrEmpty(fallback1) ? Config.Empty : ConfigurationFactory.ParseString(fallback1); | ||
var fb2 = string.IsNullOrEmpty(fallback1) ? Config.Empty : ConfigurationFactory.ParseString(fallback2); | ||
|
||
var final = hocon1.WithFallback(fb1).WithFallback(fb2); | ||
|
||
VerifySerialization(final); | ||
} | ||
|
||
public static void VerifySerialization(Config config) | ||
{ | ||
var serialized = JsonConvert.SerializeObject(config); | ||
var deserialized = (Config)JsonConvert.DeserializeObject(serialized); | ||
config.DumpConfig().Should().Be(deserialized.DumpConfig()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Import Project="..\..\common.props" /> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>$(NetCoreVersion)</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="FluentAssertions" Version="5.10.0" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\Hocon.Configuration\Hocon.Configuration.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |