Permalink
Browse files

Get Jil working on dotnetcore. Everything "works," all tests pass, bu…

…t there are a few performance regressions. Inspecting members for better ordering isn't possible, nor is detecting constant properties. Minor, but non-trivial. Hopefully netstandard 2.0 will restore the necessary reflection APIs.
  • Loading branch information...
1 parent 94e6453 commit f90ea49f3df3a6dc6222a772e95c5117680e4e69 @kevin-montrose committed Nov 28, 2016
Showing with 1,028 additions and 184 deletions.
  1. +3 −3 Benchmark/App.config
  2. +2 −1 Benchmark/Benchmark.csproj
  3. +3 −3 Experiments/App.config
  4. +2 −1 Experiments/Experiments.csproj
  5. +21 −0 Jil.Core/Jil.Core.xproj
  6. +30 −0 Jil.Core/project.json
  7. +1 −0 Jil.StrongName/Jil.StrongName.csproj
  8. +18 −2 Jil.sln
  9. +1 −1 Jil/Common/EnumValues.cs
  10. +173 −22 Jil/Common/ExtensionMethods.cs
  11. +0 −4 Jil/Common/FlagsEnumCombiner.cs
  12. +155 −25 Jil/Common/Utils.cs
  13. +2 −2 Jil/Deserialize/DeserializeIndirect.cs
  14. +23 −23 Jil/Deserialize/InlineDeserializer.cs
  15. +3 −1 Jil/Deserialize/InterfaceImplementation.cs
  16. +1 −1 Jil/Deserialize/NameAutomata.cs
  17. +1 −1 Jil/Deserialize/SetterLookup.cs
  18. +2 −1 Jil/Deserialize/UnionLookup.cs
  19. +5 −5 Jil/DeserializeDynamic/JsonObject.Dynamic.cs
  20. +0 −6 Jil/DeserializeDynamic/JsonObject.TypeConverter.cs
  21. +0 −3 Jil/DeserializeDynamic/JsonObject.cs
  22. +2 −1 Jil/Jil.csproj
  23. +1 −0 Jil/Properties/AssemblyInfo.cs
  24. +33 −33 Jil/Serialize/InlineSerializer.cs
  25. +1 −1 Jil/Serialize/SerializeDynamicThunk.cs
  26. +2 −2 Jil/SerializeDynamic/DynamicSerializer.cs
  27. +1 −1 Jil/SerializerException.cs
  28. +126 −0 JilTests.Core/Fakes.cs
  29. +27 −0 JilTests.Core/JilTests.Core.xproj
  30. +113 −0 JilTests.Core/Program.cs
  31. +19 −0 JilTests.Core/Properties/AssemblyInfo.cs
  32. +27 −0 JilTests.Core/project.json
  33. +1 −1 JilTests/DeepObjectGraphTest.cs
  34. +2 −0 JilTests/DeserializeDynamicTests.cs
  35. +3 −3 JilTests/DeserializeTests.cs
  36. +24 −5 JilTests/DynamicSerializationTests.cs
  37. +102 −0 JilTests/ExtensionMethods.cs
  38. +3 −1 JilTests/JilTests.csproj
  39. +64 −7 JilTests/SerializeTests.cs
  40. +31 −24 JilTests/UtilsTests.cs
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
-</configuration>
+</configuration>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -11,6 +11,7 @@
<AssemblyName>Benchmark</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
-</configuration>
+</configuration>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -11,6 +11,7 @@
<AssemblyName>Experiments</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
+ <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+ </PropertyGroup>
+
+ <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>03029b62-21db-4ce4-9fab-41d3a1615ee8</ProjectGuid>
+ <RootNamespace>Jil.Core</RootNamespace>
+ <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
+ <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
+ <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <SchemaVersion>2.0</SchemaVersion>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
+</Project>
View
@@ -0,0 +1,30 @@
+{
+ "version": "1.0.0-*",
+
+ "dependencies": {
+ "Microsoft.CSharp": "4.3.0",
+ "NETStandard.Library": "1.6.1",
+ "Sigil": "4.7.0",
+ "System.Collections": "4.3.0",
+ "System.Collections.NonGeneric": "4.3.0",
+ "System.ComponentModel": "4.3.0",
+ "System.ComponentModel.TypeConverter": "4.3.0",
+ "System.Dynamic.Runtime": "4.3.0",
+ "System.Reflection": "4.3.0",
+ "System.Runtime.Serialization.Primitives": "4.3.0"
+ },
+
+ "frameworks": {
+ "netstandard1.6": {
+ "imports": "dnxcore50"
+ }
+ },
+
+ "buildOptions": {
+ "define": [ "NETCORE" ],
+ "allowUnsafe": true,
+ "compile": {
+ "include": [ "..\\Jil\\**\\*.cs" ]
+ }
+ }
+}
@@ -11,6 +11,7 @@
<AssemblyName>Jil</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
View
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.31101.0
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jil", "Jil\Jil.csproj", "{73D243E7-DD9B-4546-9B71-4EE8BF5ED6C3}"
EndProject
@@ -19,6 +19,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmark", "Benchmark\Benc
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jil.StrongName", "Jil.StrongName\Jil.StrongName.csproj", "{0EDD50BE-0CCD-48E1-A613-4A623F543492}"
EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Jil.Core", "Jil.Core\Jil.Core.xproj", "{03029B62-21DB-4CE4-9FAB-41D3A1615EE8}"
+EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "JilTests.Core", "JilTests.Core\JilTests.Core.xproj", "{5F76B615-53A4-4DE0-8131-2F4BC49929EF}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -56,6 +60,18 @@ Global
{0EDD50BE-0CCD-48E1-A613-4A623F543492}.Release_ExhaustiveTest|Any CPU.Build.0 = Release|Any CPU
{0EDD50BE-0CCD-48E1-A613-4A623F543492}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0EDD50BE-0CCD-48E1-A613-4A623F543492}.Release|Any CPU.Build.0 = Release|Any CPU
+ {03029B62-21DB-4CE4-9FAB-41D3A1615EE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {03029B62-21DB-4CE4-9FAB-41D3A1615EE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {03029B62-21DB-4CE4-9FAB-41D3A1615EE8}.Release_ExhaustiveTest|Any CPU.ActiveCfg = Release|Any CPU
+ {03029B62-21DB-4CE4-9FAB-41D3A1615EE8}.Release_ExhaustiveTest|Any CPU.Build.0 = Release|Any CPU
+ {03029B62-21DB-4CE4-9FAB-41D3A1615EE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {03029B62-21DB-4CE4-9FAB-41D3A1615EE8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5F76B615-53A4-4DE0-8131-2F4BC49929EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5F76B615-53A4-4DE0-8131-2F4BC49929EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5F76B615-53A4-4DE0-8131-2F4BC49929EF}.Release_ExhaustiveTest|Any CPU.ActiveCfg = Release|Any CPU
+ {5F76B615-53A4-4DE0-8131-2F4BC49929EF}.Release_ExhaustiveTest|Any CPU.Build.0 = Release|Any CPU
+ {5F76B615-53A4-4DE0-8131-2F4BC49929EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5F76B615-53A4-4DE0-8131-2F4BC49929EF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -16,7 +16,7 @@ static class EnumValues<TEnum>
static EnumValues()
{
- PreCalculated = new Dictionary<string, TEnum>(StringComparer.InvariantCultureIgnoreCase);
+ PreCalculated = new Dictionary<string, TEnum>(StringComparer.OrdinalIgnoreCase);
foreach (var val in Enum.GetValues(typeof(TEnum)))
{
Oops, something went wrong.

0 comments on commit f90ea49

Please sign in to comment.