You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by we...@apache.org on 2017/05/17 21:27:59 UTC

reef git commit: [REEF-1798] Migrate Wake projects to VS2017 cs projects

Repository: reef
Updated Branches:
  refs/heads/master 4729037be -> 687e02ab3


[REEF-1798] Migrate Wake projects to VS2017 cs projects

  * Adds the new DotNet projects for Wake and Wake.Tests.
  * Updates references that are dotnet core compliant.
  * Added a NOT_DOTNET_BUILD directive so that code can change usings based
    upon the build that is being used. NOT_DOTNET_BUILD is only defined in
    the older build.props file. Both the ConnectionRetryHandler and
    RemoteConnectionHandler leverage this switch to use the right namespace.

JIRA:
  [REEF-1798](https://issues.apache.org/jira/browse/REEF-1798)

Pull request
  This closes #1305


Project: http://git-wip-us.apache.org/repos/asf/reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/687e02ab
Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/687e02ab
Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/687e02ab

Branch: refs/heads/master
Commit: 687e02ab3573f140f6d37d6c4a50344b2c0b54cb
Parents: 4729037
Author: Scott Inglis <ms...@gmail.com>
Authored: Mon May 15 18:12:44 2017 -0700
Committer: Markus Weimer <we...@apache.org>
Committed: Wed May 17 14:25:56 2017 -0700

----------------------------------------------------------------------
 lang/cs/Org.Apache.REEF.DotNet.sln              | 14 +++++++-
 .../Properties/AssemblyInfo.DotNet.cs           | 21 +++++++++++
 .../Org.Apache.REEF.Wake.Tests.DotNet.csproj    | 32 +++++++++++++++++
 .../Org.Apache.REEF.Wake.DotNet.csproj          | 37 ++++++++++++++++++++
 .../Properties/AssemblyInfo.DotNet.cs           | 20 +++++++++++
 .../Remote/IConnectionRetryHandler.cs           |  5 +++
 .../Remote/Impl/RemoteConnectionRetryHandler.cs |  4 +++
 lang/cs/build.DotNet.props                      |  7 +++-
 lang/cs/nuget.config                            |  6 ++++
 lang/cs/xunit.DotNet.props                      | 29 +++++++++++++++
 10 files changed, 173 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/reef/blob/687e02ab/lang/cs/Org.Apache.REEF.DotNet.sln
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.DotNet.sln b/lang/cs/Org.Apache.REEF.DotNet.sln
index c10a132..87f190f 100644
--- a/lang/cs/Org.Apache.REEF.DotNet.sln
+++ b/lang/cs/Org.Apache.REEF.DotNet.sln
@@ -1,12 +1,16 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 15
-VisualStudioVersion = 15.0.26228.10
+VisualStudioVersion = 15.0.26403.7
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Org.Apache.Reef.Utilities.DotNet", "Org.Apache.REEF.Utilities\Org.Apache.Reef.Utilities.DotNet.csproj", "{FE4CEA75-2F26-4C97-B256-375AA698B4A9}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Org.Apache.REEF.Tang.DotNet", "Org.Apache.REEF.Tang\Org.Apache.REEF.Tang.DotNet.csproj", "{16E1218C-9A3C-49E2-A939-C29944BBB72E}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Org.Apache.REEF.Wake.DotNet", "Org.Apache.REEF.Wake\Org.Apache.REEF.Wake.DotNet.csproj", "{C7314C70-7D05-4A77-B442-712712C60E16}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Org.Apache.REEF.Wake.Tests.DotNet", "Org.Apache.REEF.Wake.Tests\Org.Apache.REEF.Wake.Tests.DotNet.csproj", "{1E2B189D-239E-419F-BA09-2A3B28EF98EB}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|x64 = Debug|x64
@@ -21,6 +25,14 @@ Global
 		{16E1218C-9A3C-49E2-A939-C29944BBB72E}.Debug|x64.Build.0 = Debug|x64
 		{16E1218C-9A3C-49E2-A939-C29944BBB72E}.Release|x64.ActiveCfg = Release|x64
 		{16E1218C-9A3C-49E2-A939-C29944BBB72E}.Release|x64.Build.0 = Release|x64
+		{C7314C70-7D05-4A77-B442-712712C60E16}.Debug|x64.ActiveCfg = Debug|x64
+		{C7314C70-7D05-4A77-B442-712712C60E16}.Debug|x64.Build.0 = Debug|x64
+		{C7314C70-7D05-4A77-B442-712712C60E16}.Release|x64.ActiveCfg = Release|x64
+		{C7314C70-7D05-4A77-B442-712712C60E16}.Release|x64.Build.0 = Release|x64
+		{1E2B189D-239E-419F-BA09-2A3B28EF98EB}.Debug|x64.ActiveCfg = Debug|x64
+		{1E2B189D-239E-419F-BA09-2A3B28EF98EB}.Debug|x64.Build.0 = Debug|x64
+		{1E2B189D-239E-419F-BA09-2A3B28EF98EB}.Release|x64.ActiveCfg = Release|x64
+		{1E2B189D-239E-419F-BA09-2A3B28EF98EB}.Release|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

http://git-wip-us.apache.org/repos/asf/reef/blob/687e02ab/lang/cs/Org.Apache.REEF.Tang/Properties/AssemblyInfo.DotNet.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Properties/AssemblyInfo.DotNet.cs b/lang/cs/Org.Apache.REEF.Tang/Properties/AssemblyInfo.DotNet.cs
new file mode 100644
index 0000000..5a43114
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tang/Properties/AssemblyInfo.DotNet.cs
@@ -0,0 +1,21 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+using System.Runtime.CompilerServices;
+
+// Allow the tests access to `internal` APIs
+[assembly: InternalsVisibleTo("Org.Apache.REEF.Tang.Tests")]

http://git-wip-us.apache.org/repos/asf/reef/blob/687e02ab/lang/cs/Org.Apache.REEF.Wake.Tests/Org.Apache.REEF.Wake.Tests.DotNet.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake.Tests/Org.Apache.REEF.Wake.Tests.DotNet.csproj b/lang/cs/Org.Apache.REEF.Wake.Tests/Org.Apache.REEF.Wake.Tests.DotNet.csproj
new file mode 100644
index 0000000..33c2bdb
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Wake.Tests/Org.Apache.REEF.Wake.Tests.DotNet.csproj
@@ -0,0 +1,32 @@
+<Project Sdk="Microsoft.NET.Sdk">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+  <PropertyGroup>
+    <AssemblyName>Org.Apache.REEF.Wake.Tests</AssemblyName>
+    <TargetFrameworks>net46;net451</TargetFrameworks>
+  </PropertyGroup>
+  <Import Project="..\build.DotNet.props" />
+  <ItemGroup>
+    <PackageReference Include="System.Reactive.Core" Version="$(RxVersion)" />
+    <PackageReference Include="System.Reactive.Interfaces" Version="$(RxVersion)" />
+  </ItemGroup>
+  <Import Project="..\xunit.DotNet.props" />
+  <ItemGroup>
+    <ProjectReference Include="..\Org.Apache.REEF.Tang\Org.Apache.Reef.Tang.DotNet.csproj" />
+    <ProjectReference Include="..\Org.Apache.REEF.Wake\Org.Apache.Reef.Wake.DotNet.csproj" />
+  </ItemGroup>
+</Project>

http://git-wip-us.apache.org/repos/asf/reef/blob/687e02ab/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.DotNet.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.DotNet.csproj b/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.DotNet.csproj
new file mode 100644
index 0000000..8d8ce5f
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.DotNet.csproj
@@ -0,0 +1,37 @@
+<Project Sdk="Microsoft.NET.Sdk">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+  <PropertyGroup>
+    <AssemblyName>Org.Apache.REEF.Wake</AssemblyName>
+    <Description>Wake is an event-driven framework</Description>
+    <PackageTags>wake event-driven</PackageTags>
+    <TargetFrameworks>net46;net451</TargetFrameworks>
+  </PropertyGroup>
+  <Import Project="..\build.DotNet.props" />
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml" />
+    <PackageReference Include="protobuf-net" Version="$(ProtobufVersion)" />
+    <PackageReference Include="EnterpriseLibrary.TransientFaultHandling.Core" Version="$(TransientFaultHandlingVersion)" />
+    <PackageReference Include="System.Reactive.Interfaces" Version="$(RxVersion)" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Org.Apache.REEF.Tang\Org.Apache.Reef.Tang.DotNet.csproj" />
+    <ProjectReference Include="..\Org.Apache.REEF.Utilities\Org.Apache.Reef.Utilities.DotNet.csproj" />
+  </ItemGroup>
+</Project>

http://git-wip-us.apache.org/repos/asf/reef/blob/687e02ab/lang/cs/Org.Apache.REEF.Wake/Properties/AssemblyInfo.DotNet.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Properties/AssemblyInfo.DotNet.cs b/lang/cs/Org.Apache.REEF.Wake/Properties/AssemblyInfo.DotNet.cs
new file mode 100644
index 0000000..6caaaa2
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Wake/Properties/AssemblyInfo.DotNet.cs
@@ -0,0 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+using System.Runtime.CompilerServices;
+
+[assembly: InternalsVisibleToAttribute("Org.Apache.REEF.Wake.Tests")]

http://git-wip-us.apache.org/repos/asf/reef/blob/687e02ab/lang/cs/Org.Apache.REEF.Wake/Remote/IConnectionRetryHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/IConnectionRetryHandler.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/IConnectionRetryHandler.cs
index 4b89b83..80be721 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/IConnectionRetryHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/IConnectionRetryHandler.cs
@@ -15,7 +15,12 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#if DOTNET_BUILD
+using Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling;
+#else
 using Microsoft.Practices.TransientFaultHandling;
+#endif
+
 using Org.Apache.REEF.Tang.Annotations;
 using Org.Apache.REEF.Wake.Remote.Impl;
 

http://git-wip-us.apache.org/repos/asf/reef/blob/687e02ab/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteConnectionRetryHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteConnectionRetryHandler.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteConnectionRetryHandler.cs
index aef68af..802e0d7 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteConnectionRetryHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/RemoteConnectionRetryHandler.cs
@@ -16,7 +16,11 @@
 // under the License.
 
 using System;
+#if DOTNET_BUILD
+using Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling;
+#else
 using Microsoft.Practices.TransientFaultHandling;
+#endif
 using Org.Apache.REEF.Tang.Annotations;
 using Org.Apache.REEF.Utilities.Logging;
 using Org.Apache.REEF.Wake.Remote.Parameters;

http://git-wip-us.apache.org/repos/asf/reef/blob/687e02ab/lang/cs/build.DotNet.props
----------------------------------------------------------------------
diff --git a/lang/cs/build.DotNet.props b/lang/cs/build.DotNet.props
index cd58b9c..9e623a5 100644
--- a/lang/cs/build.DotNet.props
+++ b/lang/cs/build.DotNet.props
@@ -34,13 +34,18 @@ under the License.
   </PropertyGroup>
 
   <PropertyGroup>
+    <PlatformTarget>x64</PlatformTarget>
+    <DefineConstants>DOTNET_BUILD</DefineConstants>
     <OutputPath>..\bin\$(AssemblyName)</OutputPath>
     <AvroVersion>1.5.6</AvroVersion>
     <NewtonsoftJsonVersion>10.0.1</NewtonsoftJsonVersion>
+    <NSubstituteVersion>1.8.2.0</NSubstituteVersion>
     <ProtobufVersion>2.0.0.668</ProtobufVersion>
     <RxVersion>2.2.5</RxVersion>
     <StyleCopVersion>4.7.49.1</StyleCopVersion>
-    <NSubstituteVersion>1.8.2.0</NSubstituteVersion>
+    <TransientFaultHandlingVersion>1.0.0</TransientFaultHandlingVersion>
+    <RxVersion>3.0.0</RxVersion>
+    <NSubstituteVersion>2.0.3</NSubstituteVersion>
   </PropertyGroup>
 
 </Project>

http://git-wip-us.apache.org/repos/asf/reef/blob/687e02ab/lang/cs/nuget.config
----------------------------------------------------------------------
diff --git a/lang/cs/nuget.config b/lang/cs/nuget.config
new file mode 100644
index 0000000..771b00e
--- /dev/null
+++ b/lang/cs/nuget.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+    <packageSources>
+        <add key="dotnet" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
+    </packageSources>
+</configuration>

http://git-wip-us.apache.org/repos/asf/reef/blob/687e02ab/lang/cs/xunit.DotNet.props
----------------------------------------------------------------------
diff --git a/lang/cs/xunit.DotNet.props b/lang/cs/xunit.DotNet.props
new file mode 100644
index 0000000..b866911
--- /dev/null
+++ b/lang/cs/xunit.DotNet.props
@@ -0,0 +1,29 @@
+<Project>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<ItemGroup>
+    <PackageReference Include="xunit" Version="2.2.0"/>
+    <PackageReference Include="xunit.abstractions" Version="2.0.1"/>
+    <PackageReference Include="xunit.assert" Version="2.2.0"/>
+    <PackageReference Include="xunit.core" Version="2.2.0"/>
+    <PackageReference Include="xunit.extensibility.core" Version="2.2.0"/>
+    <PackageReference Include="xunit.extensibility.execution" Version="2.2.0"/>
+    <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0"/>
+</ItemGroup>
+
+</Project>
+