From 55e8396b2155c242b0cc70fe448d69283715b3f0 Mon Sep 17 00:00:00 2001 From: Akshita Date: Thu, 5 Sep 2019 16:14:58 -0700 Subject: [PATCH 01/27] Add IsPackable --- .../Microsoft.DotNet.Interactive.Rendering.csproj | 6 +++++- .../Microsoft.DotNet.Interactive.csproj | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj index 41e03b444..a716065eb 100644 --- a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj +++ b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj @@ -4,7 +4,11 @@ netstandard2.0 preview - + + + true + + diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj index eef6d3446..a9f913e6a 100644 --- a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj @@ -6,6 +6,11 @@ preview + + + true + + all From 7dd801d1991620d29aa764592cf0e1f1bcfa6ad6 Mon Sep 17 00:00:00 2001 From: Akshita Date: Thu, 5 Sep 2019 16:17:06 -0700 Subject: [PATCH 02/27] publish tools package as well --- MLS.Agent.Tools/MLS.Agent.Tools.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MLS.Agent.Tools/MLS.Agent.Tools.csproj b/MLS.Agent.Tools/MLS.Agent.Tools.csproj index 7c074078c..050afad68 100644 --- a/MLS.Agent.Tools/MLS.Agent.Tools.csproj +++ b/MLS.Agent.Tools/MLS.Agent.Tools.csproj @@ -4,6 +4,10 @@ netstandard2.0 $(NoWarn);8002 + + + true + From fdb2b37d1238868bed481471b3fe3eb22ad441a4 Mon Sep 17 00:00:00 2001 From: Akshita Date: Wed, 11 Sep 2019 14:53:13 -0700 Subject: [PATCH 03/27] add nuspec file --- .../Microsoft.DotNet.Interactive.csproj | 2 ++ .../Microsoft.DotNet.Interactive.nuspec | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj index a9f913e6a..8fa974f91 100644 --- a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj @@ -2,8 +2,10 @@ netstandard2.0 + Microsoft.DotNet.Interactive $(NoWarn);8002 preview + Microsoft.DotNet.Interactive.nuspec diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec new file mode 100644 index 000000000..01bc8587f --- /dev/null +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec @@ -0,0 +1,10 @@ + + + + $CommonMetadataElements$ + en-US + + + + + \ No newline at end of file From 259cbde1c285f64baf8aa4b9b624568a4eb066f2 Mon Sep 17 00:00:00 2001 From: Akshita Date: Wed, 11 Sep 2019 15:39:44 -0700 Subject: [PATCH 04/27] do arcade stuff to include MLS.Agent.Tools --- Directory.Build.props | 1 + MLS.Agent.Tools/MLS.Agent.Tools.csproj | 4 ---- .../Microsoft.DotNet.Interactive.csproj | 2 +- .../Microsoft.DotNet.Interactive.nuspec | 1 + eng/targets/NuGet.targets | 8 ++++++++ eng/targets/Settings.props | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 eng/targets/NuGet.targets diff --git a/Directory.Build.props b/Directory.Build.props index 98dccce15..23d62a0ae 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,6 +2,7 @@ + http://go.microsoft.com/fwlink/?LinkID=288859 diff --git a/MLS.Agent.Tools/MLS.Agent.Tools.csproj b/MLS.Agent.Tools/MLS.Agent.Tools.csproj index 050afad68..f93f32e9c 100644 --- a/MLS.Agent.Tools/MLS.Agent.Tools.csproj +++ b/MLS.Agent.Tools/MLS.Agent.Tools.csproj @@ -5,10 +5,6 @@ $(NoWarn);8002 - - true - - diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj index 8fa974f91..6bc33efe8 100644 --- a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj @@ -2,7 +2,7 @@ netstandard2.0 - Microsoft.DotNet.Interactive + Microsoft.DotNet.Interactive $(NoWarn);8002 preview Microsoft.DotNet.Interactive.nuspec diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec index 01bc8587f..644195739 100644 --- a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec @@ -6,5 +6,6 @@ + \ No newline at end of file diff --git a/eng/targets/NuGet.targets b/eng/targets/NuGet.targets new file mode 100644 index 000000000..088a3ab35 --- /dev/null +++ b/eng/targets/NuGet.targets @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/eng/targets/Settings.props b/eng/targets/Settings.props index 79b8ab172..c38bf4fd4 100644 --- a/eng/targets/Settings.props +++ b/eng/targets/Settings.props @@ -4,7 +4,7 @@ MIT Microsoft dotnet try + $(ArtifactsBinDir) $(CopyrightMicrosoft) - From 420a0081bb39a305dcbab7c01bce6833c7bf525c Mon Sep 17 00:00:00 2001 From: Akshita Date: Wed, 11 Sep 2019 15:44:20 -0700 Subject: [PATCH 05/27] add nuspec file fot the try markdown --- .../Microsoft.DotNet.Try.Markdown.csproj | 2 ++ .../Microsoft.DotNet.Try.Markdown.nuspec | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.nuspec diff --git a/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.csproj b/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.csproj index 9f3222d86..c37b8efae 100644 --- a/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.csproj +++ b/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.csproj @@ -1,10 +1,12 @@  + Microsoft.DotNet.Try.Markdown netstandard2.0 latest $(NoWarn);659;660 $(NoWarn);8002 + Microsoft.DotNet.Try.Markdown.nuspec diff --git a/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.nuspec b/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.nuspec new file mode 100644 index 000000000..e52ea8d29 --- /dev/null +++ b/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.nuspec @@ -0,0 +1,11 @@ + + + + $CommonMetadataElements$ + en-US + + + + + + \ No newline at end of file From e32f89e8cd695ad931c3fd40560ca3fe0ed096d0 Mon Sep 17 00:00:00 2001 From: Akshita Date: Wed, 11 Sep 2019 15:46:33 -0700 Subject: [PATCH 06/27] do not change tools --- MLS.Agent.Tools/MLS.Agent.Tools.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MLS.Agent.Tools/MLS.Agent.Tools.csproj b/MLS.Agent.Tools/MLS.Agent.Tools.csproj index f93f32e9c..7c074078c 100644 --- a/MLS.Agent.Tools/MLS.Agent.Tools.csproj +++ b/MLS.Agent.Tools/MLS.Agent.Tools.csproj @@ -4,7 +4,7 @@ netstandard2.0 $(NoWarn);8002 - + From 14e09f75adfe1acc331ae0900db75bb07ead2bc8 Mon Sep 17 00:00:00 2001 From: Akshita Date: Wed, 11 Sep 2019 16:48:47 -0700 Subject: [PATCH 07/27] override assembly version only for mls.agent.tools --- Directory.Build.targets | 10 +--------- eng/targets/Version.targets | 4 ++++ 2 files changed, 5 insertions(+), 9 deletions(-) create mode 100644 eng/targets/Version.targets diff --git a/Directory.Build.targets b/Directory.Build.targets index 6f9e1e273..a5dd44240 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -13,13 +13,5 @@ - - - - - - - - - + diff --git a/eng/targets/Version.targets b/eng/targets/Version.targets new file mode 100644 index 000000000..5d9510388 --- /dev/null +++ b/eng/targets/Version.targets @@ -0,0 +1,4 @@ + + + + \ No newline at end of file From 8ccb32a85b68f1c6b630ae186091ae51e08062d7 Mon Sep 17 00:00:00 2001 From: Akshita Date: Wed, 11 Sep 2019 17:29:11 -0700 Subject: [PATCH 08/27] retrigger --- eng/targets/Version.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/targets/Version.targets b/eng/targets/Version.targets index 5d9510388..172ea84ac 100644 --- a/eng/targets/Version.targets +++ b/eng/targets/Version.targets @@ -1,4 +1,4 @@ - - + + \ No newline at end of file From 866e6649e3b896ef7a054f16dfab1b3d17ed90cc Mon Sep 17 00:00:00 2001 From: Akshita Date: Thu, 12 Sep 2019 15:07:23 -0700 Subject: [PATCH 09/27] Clean up --- Directory.Build.targets | 10 +++++++++- eng/targets/Version.targets | 4 ---- 2 files changed, 9 insertions(+), 5 deletions(-) delete mode 100644 eng/targets/Version.targets diff --git a/Directory.Build.targets b/Directory.Build.targets index a5dd44240..6f9e1e273 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -13,5 +13,13 @@ - + + + + + + + + + diff --git a/eng/targets/Version.targets b/eng/targets/Version.targets deleted file mode 100644 index 172ea84ac..000000000 --- a/eng/targets/Version.targets +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file From 4b337f3e73dde3a1408bc72259ae2748c5c1a77b Mon Sep 17 00:00:00 2001 From: Akshita Date: Fri, 13 Sep 2019 12:34:36 -0700 Subject: [PATCH 10/27] add nuspc file for rendering --- .../Microsoft.DotNet.Interactive.Rendering.csproj | 2 ++ .../Microsoft.DotNet.Interactive.Rendering.nuspec | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec diff --git a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj index a716065eb..3fc9d0f7b 100644 --- a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj +++ b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj @@ -3,6 +3,8 @@ netstandard2.0 preview + Microsoft.DotNet.Interactive.Rendering + Microsoft.DotNet.Interactive.Rendering.nuspec diff --git a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec new file mode 100644 index 000000000..6ed99ac5b --- /dev/null +++ b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec @@ -0,0 +1,11 @@ + + + + $CommonMetadataElements$ + en-US + + + + + + \ No newline at end of file From 08ddb80f85e9256c9535420fc27e7691d7b156d7 Mon Sep 17 00:00:00 2001 From: Akshita Date: Fri, 13 Sep 2019 14:16:58 -0700 Subject: [PATCH 11/27] Extract out the common versions for MLS.Agent.Tools and interactive --- Directory.Build.props | 10 +++++++ MLS.Agent.Tools/MLS.Agent.Tools.csproj | 16 +++++----- .../Microsoft.DotNet.Interactive.csproj | 30 ++++++++++++------- .../Microsoft.DotNet.Interactive.nuspec | 19 ++++++++++++ eng/targets/NuGet.targets | 8 +++++ 5 files changed, 65 insertions(+), 18 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 23d62a0ae..9b126e453 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -15,4 +15,14 @@ $(NoWarn);NU5104 + + 1.0.261-beta + 12.0.02 + 0.3.0 + 4.3.0 + 4.3.0 + 3.1.0-beta3-final + 3.1.0-beta3-final + 0.1.8580001 + diff --git a/MLS.Agent.Tools/MLS.Agent.Tools.csproj b/MLS.Agent.Tools/MLS.Agent.Tools.csproj index 7c074078c..b527e849d 100644 --- a/MLS.Agent.Tools/MLS.Agent.Tools.csproj +++ b/MLS.Agent.Tools/MLS.Agent.Tools.csproj @@ -17,16 +17,16 @@ - - - + + + all - - - - - + + + + + all runtime; build; native; contentfiles; analyzers diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj index 6bc33efe8..1b1d268fc 100644 --- a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj @@ -12,16 +12,20 @@ true - + + + 2.9.4 + 4.3.0 + 4.1.5 + 0.3.0-alpha.19420.2 + + - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + all @@ -29,5 +33,11 @@ - + + + + + + + diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec index 644195739..ca82ffc57 100644 --- a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec @@ -3,6 +3,25 @@ $CommonMetadataElements$ en-US + + + + + + + + + + + + + + + + + + + diff --git a/eng/targets/NuGet.targets b/eng/targets/NuGet.targets index 088a3ab35..be39b8ba8 100644 --- a/eng/targets/NuGet.targets +++ b/eng/targets/NuGet.targets @@ -3,6 +3,14 @@ + + + + + + + + \ No newline at end of file From aab5d701a1fe00c5c6df80afa3706e3d3c1a930f Mon Sep 17 00:00:00 2001 From: Akshita Date: Fri, 13 Sep 2019 14:26:48 -0700 Subject: [PATCH 12/27] do the same for rendering csproj --- ...icrosoft.DotNet.Interactive.Rendering.csproj | 16 +++++++++++++--- ...icrosoft.DotNet.Interactive.Rendering.nuspec | 17 +++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj index 3fc9d0f7b..0bd50c829 100644 --- a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj +++ b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj @@ -12,12 +12,22 @@ - - + + - + + + + + 2.2.0 + 4.5.0 + + + + + diff --git a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec index 6ed99ac5b..3b8366ef2 100644 --- a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec +++ b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec @@ -3,6 +3,23 @@ $CommonMetadataElements$ en-US + + + + + + + + + + + + + + + + + From b60f8145716a81ee4d3b09c40e9e317faac8ce2a Mon Sep 17 00:00:00 2001 From: Akshita Date: Fri, 13 Sep 2019 14:55:45 -0700 Subject: [PATCH 13/27] do the same for the markdown --- MLS.Agent.Tools/MLS.Agent.Tools.csproj | 1 + .../Microsoft.DotNet.Try.Markdown.csproj | 25 ++++++++++++++----- .../Microsoft.DotNet.Try.Markdown.nuspec | 18 +++++++++++++ 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/MLS.Agent.Tools/MLS.Agent.Tools.csproj b/MLS.Agent.Tools/MLS.Agent.Tools.csproj index b527e849d..3f7c414a5 100644 --- a/MLS.Agent.Tools/MLS.Agent.Tools.csproj +++ b/MLS.Agent.Tools/MLS.Agent.Tools.csproj @@ -17,6 +17,7 @@ + diff --git a/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.csproj b/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.csproj index c37b8efae..3a6f054f1 100644 --- a/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.csproj +++ b/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.csproj @@ -4,9 +4,9 @@ Microsoft.DotNet.Try.Markdown netstandard2.0 latest - $(NoWarn);659;660 - $(NoWarn);8002 - Microsoft.DotNet.Try.Markdown.nuspec + $(NoWarn);659;660 + $(NoWarn);8002 + Microsoft.DotNet.Try.Markdown.nuspec @@ -14,11 +14,24 @@ - - - + + + + + + + + + + + 2.2.0 + 0.3.0-alpha.19420.2 + 0.17.0 + + + diff --git a/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.nuspec b/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.nuspec index e52ea8d29..594f27892 100644 --- a/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.nuspec +++ b/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.nuspec @@ -3,6 +3,24 @@ $CommonMetadataElements$ en-US + + + + + + + + + + + + + + + + + + From ad07d03a12883d37dd7fd4a92135e285e0772070 Mon Sep 17 00:00:00 2001 From: Akshita Date: Fri, 13 Sep 2019 15:00:09 -0700 Subject: [PATCH 14/27] add few comments --- Directory.Build.props | 1 + .../Microsoft.DotNet.Interactive.Rendering.nuspec | 2 +- .../Microsoft.DotNet.Try.Markdown.csproj | 11 +++++------ eng/targets/NuGet.targets | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 9b126e453..4d0463e0d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -16,6 +16,7 @@ + 1.0.261-beta 12.0.02 0.3.0 diff --git a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec index 3b8366ef2..6c83e3a27 100644 --- a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec +++ b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec @@ -5,7 +5,7 @@ en-US - + diff --git a/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.csproj b/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.csproj index 3a6f054f1..802af1263 100644 --- a/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.csproj +++ b/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.csproj @@ -19,18 +19,17 @@ - - - - - - 2.2.0 0.3.0-alpha.19420.2 0.17.0 + + + + + diff --git a/eng/targets/NuGet.targets b/eng/targets/NuGet.targets index be39b8ba8..ecee013ae 100644 --- a/eng/targets/NuGet.targets +++ b/eng/targets/NuGet.targets @@ -3,6 +3,7 @@ + From bb3a30fc9f6b8c123cf57643404414439ec1eac7 Mon Sep 17 00:00:00 2001 From: Akshita Date: Fri, 13 Sep 2019 15:35:25 -0700 Subject: [PATCH 15/27] Remove clockwise dependency from tools csproj --- MLS.Agent.Tools/MLS.Agent.Tools.csproj | 1 - .../Microsoft.DotNet.Interactive.Jupyter.csproj | 1 + {MLS.Agent.Tools => WorkspaceServer}/AddPackageResult.cs | 2 +- {MLS.Agent.Tools => WorkspaceServer}/CommandLine.cs | 2 +- .../CommandLineInvocationException.cs | 2 +- {MLS.Agent.Tools => WorkspaceServer}/CommandLineResult.cs | 2 +- .../CommandLineResultExtensions.cs | 2 +- {MLS.Agent.Tools => WorkspaceServer}/Dotnet.cs | 3 ++- 8 files changed, 8 insertions(+), 7 deletions(-) rename {MLS.Agent.Tools => WorkspaceServer}/AddPackageResult.cs (98%) rename {MLS.Agent.Tools => WorkspaceServer}/CommandLine.cs (99%) rename {MLS.Agent.Tools => WorkspaceServer}/CommandLineInvocationException.cs (95%) rename {MLS.Agent.Tools => WorkspaceServer}/CommandLineResult.cs (96%) rename {MLS.Agent.Tools => WorkspaceServer}/CommandLineResultExtensions.cs (96%) rename {MLS.Agent.Tools => WorkspaceServer}/Dotnet.cs (99%) diff --git a/MLS.Agent.Tools/MLS.Agent.Tools.csproj b/MLS.Agent.Tools/MLS.Agent.Tools.csproj index 3f7c414a5..2f491769e 100644 --- a/MLS.Agent.Tools/MLS.Agent.Tools.csproj +++ b/MLS.Agent.Tools/MLS.Agent.Tools.csproj @@ -18,7 +18,6 @@ - all diff --git a/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj b/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj index df0840e9d..5afa829a6 100644 --- a/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj +++ b/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj @@ -5,6 +5,7 @@ $(NoWarn);8002 + diff --git a/MLS.Agent.Tools/AddPackageResult.cs b/WorkspaceServer/AddPackageResult.cs similarity index 98% rename from MLS.Agent.Tools/AddPackageResult.cs rename to WorkspaceServer/AddPackageResult.cs index e49f270d2..a454c4e0d 100644 --- a/MLS.Agent.Tools/AddPackageResult.cs +++ b/WorkspaceServer/AddPackageResult.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Linq; -namespace MLS.Agent.Tools +namespace WorkspaceServer { public partial class Dotnet { diff --git a/MLS.Agent.Tools/CommandLine.cs b/WorkspaceServer/CommandLine.cs similarity index 99% rename from MLS.Agent.Tools/CommandLine.cs rename to WorkspaceServer/CommandLine.cs index 7a925eba3..1f07e800c 100644 --- a/MLS.Agent.Tools/CommandLine.cs +++ b/WorkspaceServer/CommandLine.cs @@ -12,7 +12,7 @@ using Pocket; using Recipes; -namespace MLS.Agent.Tools +namespace WorkspaceServer { public static class CommandLine { diff --git a/MLS.Agent.Tools/CommandLineInvocationException.cs b/WorkspaceServer/CommandLineInvocationException.cs similarity index 95% rename from MLS.Agent.Tools/CommandLineInvocationException.cs rename to WorkspaceServer/CommandLineInvocationException.cs index 79c2fea26..0aed51fed 100644 --- a/MLS.Agent.Tools/CommandLineInvocationException.cs +++ b/WorkspaceServer/CommandLineInvocationException.cs @@ -3,7 +3,7 @@ using System; -namespace MLS.Agent.Tools +namespace WorkspaceServer { public class CommandLineInvocationException : Exception { diff --git a/MLS.Agent.Tools/CommandLineResult.cs b/WorkspaceServer/CommandLineResult.cs similarity index 96% rename from MLS.Agent.Tools/CommandLineResult.cs rename to WorkspaceServer/CommandLineResult.cs index 8f6cdaa1a..be805b043 100644 --- a/MLS.Agent.Tools/CommandLineResult.cs +++ b/WorkspaceServer/CommandLineResult.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -namespace MLS.Agent.Tools +namespace WorkspaceServer { public class CommandLineResult { diff --git a/MLS.Agent.Tools/CommandLineResultExtensions.cs b/WorkspaceServer/CommandLineResultExtensions.cs similarity index 96% rename from MLS.Agent.Tools/CommandLineResultExtensions.cs rename to WorkspaceServer/CommandLineResultExtensions.cs index 61994b7af..8e6fe85b9 100644 --- a/MLS.Agent.Tools/CommandLineResultExtensions.cs +++ b/WorkspaceServer/CommandLineResultExtensions.cs @@ -4,7 +4,7 @@ using System; using System.Linq; -namespace MLS.Agent.Tools +namespace WorkspaceServer { public static class CommandLineResultExtensions { diff --git a/MLS.Agent.Tools/Dotnet.cs b/WorkspaceServer/Dotnet.cs similarity index 99% rename from MLS.Agent.Tools/Dotnet.cs rename to WorkspaceServer/Dotnet.cs index b6379211f..790d7e02c 100644 --- a/MLS.Agent.Tools/Dotnet.cs +++ b/WorkspaceServer/Dotnet.cs @@ -9,8 +9,9 @@ using System.Reflection; using System.Threading.Tasks; using Clockwise; +using MLS.Agent.Tools; -namespace MLS.Agent.Tools +namespace WorkspaceServer { public partial class Dotnet { From 8fcab5d9a989322bd7d0c08c63aa4ccac64e890e Mon Sep 17 00:00:00 2001 From: Akshita Date: Fri, 13 Sep 2019 15:39:56 -0700 Subject: [PATCH 16/27] clean up clcokwise further and add missing usings --- Directory.Build.props | 1 - MLS.Agent/FileSystemJupyterKernelSpec.cs | 5 +++-- MLS.Agent/IJupyterKernelSpec.cs | 1 + .../Microsoft.DotNet.Interactive.Jupyter.csproj | 2 +- .../Microsoft.DotNet.Interactive.Rendering.nuspec | 1 - .../Microsoft.DotNet.Interactive.nuspec | 1 - .../Microsoft.DotNet.Try.Markdown.nuspec | 1 - eng/targets/NuGet.targets | 1 - 8 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 4d0463e0d..933088187 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -17,7 +17,6 @@ - 1.0.261-beta 12.0.02 0.3.0 4.3.0 diff --git a/MLS.Agent/FileSystemJupyterKernelSpec.cs b/MLS.Agent/FileSystemJupyterKernelSpec.cs index fc7e0bd9d..a29445cbb 100644 --- a/MLS.Agent/FileSystemJupyterKernelSpec.cs +++ b/MLS.Agent/FileSystemJupyterKernelSpec.cs @@ -8,6 +8,7 @@ using System.Runtime.InteropServices; using System.Threading.Tasks; using Clockwise; +using WorkspaceServer; namespace MLS.Agent { @@ -20,7 +21,7 @@ public async Task ExecuteCommand(string command, string args return new CommandLineResult(1, new List() { "Could not find jupyter kernelspec module" }); } - return await Tools.CommandLine.Execute("jupyter", $"kernelspec {command} {args}"); + return await WorkspaceServer.CommandLine.Execute("jupyter", $"kernelspec {command} {args}"); } public Task InstallKernel(DirectoryInfo sourceDirectory) @@ -34,7 +35,7 @@ public static bool CheckIfJupyterKernelSpecExists() bool jupyterKernelSpecExists = false ; Task.Run(async ()=> { - var result = await Tools.CommandLine.Execute(command, "jupyter-kernelspec"); + var result = await WorkspaceServer.CommandLine.Execute(command, "jupyter-kernelspec"); jupyterKernelSpecExists = result.ExitCode == 0; }).Wait(2000); diff --git a/MLS.Agent/IJupyterKernelSpec.cs b/MLS.Agent/IJupyterKernelSpec.cs index a25f92450..36a44f97d 100644 --- a/MLS.Agent/IJupyterKernelSpec.cs +++ b/MLS.Agent/IJupyterKernelSpec.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Threading.Tasks; +using WorkspaceServer; namespace MLS.Agent { diff --git a/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj b/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj index 5afa829a6..078b330a0 100644 --- a/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj +++ b/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj @@ -5,7 +5,7 @@ $(NoWarn);8002 - + diff --git a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec index 6c83e3a27..296f004ab 100644 --- a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec +++ b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec @@ -10,7 +10,6 @@ - diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec index ca82ffc57..7477b7314 100644 --- a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec @@ -12,7 +12,6 @@ - diff --git a/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.nuspec b/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.nuspec index 594f27892..a4d3f0345 100644 --- a/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.nuspec +++ b/Microsoft.DotNet.Try.Markdown/Microsoft.DotNet.Try.Markdown.nuspec @@ -11,7 +11,6 @@ - diff --git a/eng/targets/NuGet.targets b/eng/targets/NuGet.targets index ecee013ae..9a30e2de1 100644 --- a/eng/targets/NuGet.targets +++ b/eng/targets/NuGet.targets @@ -4,7 +4,6 @@ - From b3d0c4393ceddc896218f0c34177e2da4fe88b47 Mon Sep 17 00:00:00 2001 From: Akshita Date: Fri, 13 Sep 2019 15:45:08 -0700 Subject: [PATCH 17/27] further clean --- MLS.Agent.Tests/InMemoryJupyterKernelSpec.cs | 8 ++++---- MLS.Agent.Tests/LocalToolPackageDiscoveryStrategyTests.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MLS.Agent.Tests/InMemoryJupyterKernelSpec.cs b/MLS.Agent.Tests/InMemoryJupyterKernelSpec.cs index b51a1eb62..3653e2531 100644 --- a/MLS.Agent.Tests/InMemoryJupyterKernelSpec.cs +++ b/MLS.Agent.Tests/InMemoryJupyterKernelSpec.cs @@ -20,20 +20,20 @@ public InMemoryJupyterKernelSpec(bool successfulInstall) _successfulInstall = successfulInstall; } - public Task ExecuteCommand(string command, string args = "") + public Task ExecuteCommand(string command, string args = "") { throw new NotImplementedException(); } - public Task InstallKernel(DirectoryInfo sourceDirectory) + public Task InstallKernel(DirectoryInfo sourceDirectory) { if(_successfulInstall) { var installPath = Path.Combine(Directory.GetCurrentDirectory(), sourceDirectory.Name.ToLower()); - return Task.FromResult(new CommandLineResult(0, error: new List { $"[InstallKernelSpec] Installed kernelspec {sourceDirectory.Name} in {installPath}" })); + return Task.FromResult(new WorkspaceServer.CommandLineResult(0, error: new List { $"[InstallKernelSpec] Installed kernelspec {sourceDirectory.Name} in {installPath}" })); } - return Task.FromResult(new CommandLineResult(1)); + return Task.FromResult(new WorkspaceServer.CommandLineResult(1)); } } } \ No newline at end of file diff --git a/MLS.Agent.Tests/LocalToolPackageDiscoveryStrategyTests.cs b/MLS.Agent.Tests/LocalToolPackageDiscoveryStrategyTests.cs index 89d22d204..0419e29d0 100644 --- a/MLS.Agent.Tests/LocalToolPackageDiscoveryStrategyTests.cs +++ b/MLS.Agent.Tests/LocalToolPackageDiscoveryStrategyTests.cs @@ -34,7 +34,7 @@ public async Task Discover_tool_from_directory() var package = await Create.ConsoleWorkspaceCopy(); File.Move(package.Directory.GetFiles("*.csproj").First().FullName, Path.Combine(package.Directory.FullName, "not-console.csproj")); await PackCommand.Do(new PackOptions(package.Directory, outputDirectory: temp, enableWasm: false), console); - var result = await Tools.CommandLine.Execute("dotnet", $"tool install --add-source {temp.FullName} not-console --tool-path {temp.FullName}"); + var result = await WorkspaceServer.CommandLine.Execute("dotnet", $"tool install --add-source {temp.FullName} not-console --tool-path {temp.FullName}"); output.WriteLine(string.Join("\n", result.Error)); result.ExitCode.Should().Be(0); From 51ae2635702f17f25a52db03754f19dd21e31845 Mon Sep 17 00:00:00 2001 From: Akshita Date: Fri, 13 Sep 2019 15:52:00 -0700 Subject: [PATCH 18/27] tools is not needed for rendering --- ...rosoft.DotNet.Interactive.Rendering.csproj | 24 +++-------------- ...rosoft.DotNet.Interactive.Rendering.nuspec | 27 ------------------- 2 files changed, 4 insertions(+), 47 deletions(-) delete mode 100644 Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec diff --git a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj index 0bd50c829..41e03b444 100644 --- a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj +++ b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj @@ -3,31 +3,15 @@ netstandard2.0 preview - Microsoft.DotNet.Interactive.Rendering - Microsoft.DotNet.Interactive.Rendering.nuspec - - - true - - - - - - - + + - - 2.2.0 - 4.5.0 - - - - - + + diff --git a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec deleted file mode 100644 index 296f004ab..000000000 --- a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.nuspec +++ /dev/null @@ -1,27 +0,0 @@ - - - - $CommonMetadataElements$ - en-US - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 06d2bbc4424ef69f8a7a8e53e946d46dd74a6138 Mon Sep 17 00:00:00 2001 From: Akshita Date: Fri, 13 Sep 2019 18:05:48 -0700 Subject: [PATCH 19/27] remove reference to MLS.Agent.Tools --- .../CommandDeserializer.cs | 1 - .../Commands/LoadExtensionsInDirectory.cs | 8 ++--- .../IExtensibleKernel.cs | 4 +-- .../KernelExtensionLoader.cs | 13 -------- .../Microsoft.DotNet.Interactive.csproj | 33 ++++--------------- .../Microsoft.DotNet.Interactive.nuspec | 29 ---------------- .../TypeExtensions.cs | 17 ++++++++++ .../Kernel/CSharpKernelTests.cs | 2 +- WorkspaceServer/Kernel/CSharpKernel.cs | 21 ++++++++++-- .../Kernel/CSharpKernelExtensions.cs | 2 +- 10 files changed, 48 insertions(+), 82 deletions(-) delete mode 100644 Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec create mode 100644 Microsoft.DotNet.Interactive/TypeExtensions.cs diff --git a/Microsoft.DotNet.Interactive/CommandDeserializer.cs b/Microsoft.DotNet.Interactive/CommandDeserializer.cs index e9ba13175..f82af0358 100644 --- a/Microsoft.DotNet.Interactive/CommandDeserializer.cs +++ b/Microsoft.DotNet.Interactive/CommandDeserializer.cs @@ -6,7 +6,6 @@ using System.Linq; using System.Reflection; using Microsoft.DotNet.Interactive.Commands; -using MLS.Agent.Tools; using Newtonsoft.Json.Linq; namespace Microsoft.DotNet.Interactive diff --git a/Microsoft.DotNet.Interactive/Commands/LoadExtensionsInDirectory.cs b/Microsoft.DotNet.Interactive/Commands/LoadExtensionsInDirectory.cs index 591b180ee..98c988fdd 100644 --- a/Microsoft.DotNet.Interactive/Commands/LoadExtensionsInDirectory.cs +++ b/Microsoft.DotNet.Interactive/Commands/LoadExtensionsInDirectory.cs @@ -1,21 +1,17 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; -using System.Collections.Generic; using System.IO; -using MLS.Agent.Tools; -using Newtonsoft.Json; namespace Microsoft.DotNet.Interactive.Commands { public class LoadExtensionsInDirectory : KernelCommandBase { - public LoadExtensionsInDirectory(IDirectoryAccessor directory) + public LoadExtensionsInDirectory(DirectoryInfo directory) { Directory = directory; } - public IDirectoryAccessor Directory { get; } + public DirectoryInfo Directory { get; } } } \ No newline at end of file diff --git a/Microsoft.DotNet.Interactive/IExtensibleKernel.cs b/Microsoft.DotNet.Interactive/IExtensibleKernel.cs index 6ee038f51..c09014c6a 100644 --- a/Microsoft.DotNet.Interactive/IExtensibleKernel.cs +++ b/Microsoft.DotNet.Interactive/IExtensibleKernel.cs @@ -1,13 +1,13 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using MLS.Agent.Tools; +using System.IO; using System.Threading.Tasks; namespace Microsoft.DotNet.Interactive { public interface IExtensibleKernel { - public Task LoadExtensionsInDirectory(IDirectoryAccessor directory, KernelInvocationContext invocationContext); + public Task LoadExtensionsInDirectory(DirectoryInfo directory, KernelInvocationContext invocationContext); } } \ No newline at end of file diff --git a/Microsoft.DotNet.Interactive/KernelExtensionLoader.cs b/Microsoft.DotNet.Interactive/KernelExtensionLoader.cs index cd0f03ce3..0516d2739 100644 --- a/Microsoft.DotNet.Interactive/KernelExtensionLoader.cs +++ b/Microsoft.DotNet.Interactive/KernelExtensionLoader.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.DotNet.Interactive.Events; -using MLS.Agent.Tools; using System; using System.IO; using System.Linq; @@ -50,17 +49,5 @@ public async Task LoadFromAssembly(FileInfo assemblyFile, IKernel kernel, return extensionTypes.Length > 0; } - - public async Task LoadFromAssembliesInDirectory(IDirectoryAccessor directory, IKernel kernel, PublishEvent publishEvent) - { - if (directory.RootDirectoryExists()) - { - var extensionDlls = directory.GetAllFiles().Where(file => file.Extension == ".dll").Select(file => directory.GetFullyQualifiedFilePath(file)); - foreach (var extensionDll in extensionDlls) - { - await LoadFromAssembly(extensionDll, kernel, publishEvent); - } - } - } } } \ No newline at end of file diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj index 1b1d268fc..16e6a15b7 100644 --- a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj @@ -2,42 +2,21 @@ netstandard2.0 - Microsoft.DotNet.Interactive $(NoWarn);8002 preview - Microsoft.DotNet.Interactive.nuspec - - - true - - - - 2.9.4 - 4.3.0 - 4.1.5 - 0.3.0-alpha.19420.2 - - - - - - - + + + + + all - - - - - - - - + diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec deleted file mode 100644 index 7477b7314..000000000 --- a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec +++ /dev/null @@ -1,29 +0,0 @@ - - - - $CommonMetadataElements$ - en-US - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Microsoft.DotNet.Interactive/TypeExtensions.cs b/Microsoft.DotNet.Interactive/TypeExtensions.cs new file mode 100644 index 000000000..4b157b823 --- /dev/null +++ b/Microsoft.DotNet.Interactive/TypeExtensions.cs @@ -0,0 +1,17 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +namespace Microsoft.DotNet.Interactive +{ + public static class TypeExtensions + { + public static bool CanBeInstantiated(this Type type) + { + return !type.IsAbstract + && !type.IsGenericTypeDefinition + && !type.IsInterface; + } + } +} diff --git a/WorkspaceServer.Tests/Kernel/CSharpKernelTests.cs b/WorkspaceServer.Tests/Kernel/CSharpKernelTests.cs index a0ee9f416..6f1ebebfa 100644 --- a/WorkspaceServer.Tests/Kernel/CSharpKernelTests.cs +++ b/WorkspaceServer.Tests/Kernel/CSharpKernelTests.cs @@ -573,7 +573,7 @@ public async Task Should_load_extension_in_directory() var kernel = CreateKernel(); - await kernel.SendAsync(new LoadExtensionsInDirectory(nugetPackageDirectory)); + await kernel.SendAsync(new LoadExtensionsInDirectory(nugetPackageDirectory.GetFullyQualifiedRoot())); KernelEvents.Should() diff --git a/WorkspaceServer/Kernel/CSharpKernel.cs b/WorkspaceServer/Kernel/CSharpKernel.cs index 2fc43bf23..c825e18ac 100644 --- a/WorkspaceServer/Kernel/CSharpKernel.cs +++ b/WorkspaceServer/Kernel/CSharpKernel.cs @@ -25,6 +25,7 @@ using CompletionItem = Microsoft.DotNet.Interactive.CompletionItem; using Task = System.Threading.Tasks.Task; using MLS.Agent.Tools; +using System.IO; namespace WorkspaceServer.Kernel { @@ -323,9 +324,10 @@ bool ShouldRebuild() } } - public async Task LoadExtensionsInDirectory(IDirectoryAccessor directory, KernelInvocationContext context) + public async Task LoadExtensionsInDirectory(DirectoryInfo directory, KernelInvocationContext context) { - var extensionsDirectory = directory.GetDirectoryAccessorForRelativePath(_assemblyExtensionsPath); + var directoryAccessor = new FileSystemDirectoryAccessor(directory); + var extensionsDirectory = directoryAccessor.GetDirectoryAccessorForRelativePath(_assemblyExtensionsPath); await new KernelExtensionLoader().LoadFromAssembliesInDirectory(extensionsDirectory, context.HandlingKernel, (kernelEvent) => context.Publish(kernelEvent)); } @@ -333,4 +335,19 @@ public async Task LoadExtensionsInDirectory(IDirectoryAccessor directory, Kernel ScriptState != null && (bool)_hasReturnValueMethod.Invoke(ScriptState.Script, null); } + + public static class KernelExtensionLoaderExtensions + { + public static async Task LoadFromAssembliesInDirectory(this KernelExtensionLoader loader, IDirectoryAccessor directory, IKernel kernel, KernelExtensionLoader.PublishEvent publishEvent) + { + if (directory.RootDirectoryExists()) + { + var extensionDlls = directory.GetAllFiles().Where(file => file.Extension == ".dll").Select(file => directory.GetFullyQualifiedFilePath(file)); + foreach (var extensionDll in extensionDlls) + { + await loader.LoadFromAssembly(extensionDll, kernel, publishEvent); + } + } + } + } } \ No newline at end of file diff --git a/WorkspaceServer/Kernel/CSharpKernelExtensions.cs b/WorkspaceServer/Kernel/CSharpKernelExtensions.cs index 620444851..ea2c89f2c 100644 --- a/WorkspaceServer/Kernel/CSharpKernelExtensions.cs +++ b/WorkspaceServer/Kernel/CSharpKernelExtensions.cs @@ -104,7 +104,7 @@ public static CSharpKernel UseNugetDirective(this CSharpKernel kernel, INativeAs context.Publish(new DisplayedValueProduced($"Successfully added reference to package {package.PackageName}, version {result.InstalledVersion}", context.Command)); context.Publish(new NuGetPackageAdded(addPackage, package)); - var nugetPackageDirectory = new FileSystemDirectoryAccessor(await restoreContext.GetDirectoryForPackage(package.PackageName)); + var nugetPackageDirectory =await restoreContext.GetDirectoryForPackage(package.PackageName); await pipelineContext.HandlingKernel.SendAsync(new LoadExtensionsInDirectory(nugetPackageDirectory)); } else From 1a312b5921a1735ae1efc3153dd3c089311ea6ac Mon Sep 17 00:00:00 2001 From: Akshita Date: Fri, 13 Sep 2019 18:08:01 -0700 Subject: [PATCH 20/27] make is packable --- .../Microsoft.DotNet.Interactive.Rendering.csproj | 4 ++++ .../Microsoft.DotNet.Interactive.csproj | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj index 41e03b444..3cde1428e 100644 --- a/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj +++ b/Microsoft.DotNet.Interactive.Rendering/Microsoft.DotNet.Interactive.Rendering.csproj @@ -5,6 +5,10 @@ preview + + true + + diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj index 16e6a15b7..98df9ca9a 100644 --- a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj @@ -6,6 +6,11 @@ preview + + + true + + From 30c4bc22f720aeeff4e0943f23b2bae8f7c98dec Mon Sep 17 00:00:00 2001 From: Akshita Date: Mon, 16 Sep 2019 10:51:24 -0700 Subject: [PATCH 21/27] change the roslyn version --- Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 933088187..a3a7cc248 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -21,8 +21,8 @@ 0.3.0 4.3.0 4.3.0 - 3.1.0-beta3-final - 3.1.0-beta3-final + 3.2.1 + 3.2.1 0.1.8580001 From d98a4c8141d380c0b3884225975376bf6a9d2aa8 Mon Sep 17 00:00:00 2001 From: Akshita Date: Mon, 16 Sep 2019 10:54:09 -0700 Subject: [PATCH 22/27] move to different class --- WorkspaceServer/Kernel/CSharpKernel.cs | 15 ----------- .../Kernel/KernelExtensionLoaderExtensions.cs | 25 +++++++++++++++++++ 2 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 WorkspaceServer/Kernel/KernelExtensionLoaderExtensions.cs diff --git a/WorkspaceServer/Kernel/CSharpKernel.cs b/WorkspaceServer/Kernel/CSharpKernel.cs index c825e18ac..56bf3b9a5 100644 --- a/WorkspaceServer/Kernel/CSharpKernel.cs +++ b/WorkspaceServer/Kernel/CSharpKernel.cs @@ -335,19 +335,4 @@ public async Task LoadExtensionsInDirectory(DirectoryInfo directory, KernelInvoc ScriptState != null && (bool)_hasReturnValueMethod.Invoke(ScriptState.Script, null); } - - public static class KernelExtensionLoaderExtensions - { - public static async Task LoadFromAssembliesInDirectory(this KernelExtensionLoader loader, IDirectoryAccessor directory, IKernel kernel, KernelExtensionLoader.PublishEvent publishEvent) - { - if (directory.RootDirectoryExists()) - { - var extensionDlls = directory.GetAllFiles().Where(file => file.Extension == ".dll").Select(file => directory.GetFullyQualifiedFilePath(file)); - foreach (var extensionDll in extensionDlls) - { - await loader.LoadFromAssembly(extensionDll, kernel, publishEvent); - } - } - } - } } \ No newline at end of file diff --git a/WorkspaceServer/Kernel/KernelExtensionLoaderExtensions.cs b/WorkspaceServer/Kernel/KernelExtensionLoaderExtensions.cs new file mode 100644 index 000000000..a4d82a287 --- /dev/null +++ b/WorkspaceServer/Kernel/KernelExtensionLoaderExtensions.cs @@ -0,0 +1,25 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Linq; +using Microsoft.DotNet.Interactive; +using Task = System.Threading.Tasks.Task; +using MLS.Agent.Tools; + +namespace WorkspaceServer.Kernel +{ + public static class KernelExtensionLoaderExtensions + { + public static async Task LoadFromAssembliesInDirectory(this KernelExtensionLoader loader, IDirectoryAccessor directory, IKernel kernel, KernelExtensionLoader.PublishEvent publishEvent) + { + if (directory.RootDirectoryExists()) + { + var extensionDlls = directory.GetAllFiles().Where(file => file.Extension == ".dll").Select(file => directory.GetFullyQualifiedFilePath(file)); + foreach (var extensionDll in extensionDlls) + { + await loader.LoadFromAssembly(extensionDll, kernel, publishEvent); + } + } + } + } +} \ No newline at end of file From 6ffd21995b63c9f65ec46965e75708393542d3b1 Mon Sep 17 00:00:00 2001 From: Akshita Date: Tue, 17 Sep 2019 11:07:09 -0700 Subject: [PATCH 23/27] clean up --- MLS.Agent.Tools/MLS.Agent.Tools.csproj | 2 +- .../Microsoft.DotNet.Interactive.Jupyter.csproj | 1 - .../Microsoft.DotNet.Interactive.csproj | 9 ++++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/MLS.Agent.Tools/MLS.Agent.Tools.csproj b/MLS.Agent.Tools/MLS.Agent.Tools.csproj index 2f491769e..2996e4689 100644 --- a/MLS.Agent.Tools/MLS.Agent.Tools.csproj +++ b/MLS.Agent.Tools/MLS.Agent.Tools.csproj @@ -17,7 +17,7 @@ - + all diff --git a/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj b/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj index d225d2490..9f295ab81 100644 --- a/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj +++ b/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj @@ -5,7 +5,6 @@ $(NoWarn);8002 - diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj index 98df9ca9a..738a94bcb 100644 --- a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj @@ -7,14 +7,17 @@ - + true - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - + all From ba5901e8c59145d9911289a7507c7274e6cf4698 Mon Sep 17 00:00:00 2001 From: Akshita Date: Tue, 17 Sep 2019 11:17:56 -0700 Subject: [PATCH 24/27] add clockwise dependency in the jupyter project --- .../Microsoft.DotNet.Interactive.Jupyter.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj b/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj index 9f295ab81..d225d2490 100644 --- a/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj +++ b/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj @@ -5,6 +5,7 @@ $(NoWarn);8002 + From 00d7301893fe628410c2bea2fccd5d1699576c7f Mon Sep 17 00:00:00 2001 From: Akshita Date: Tue, 17 Sep 2019 13:49:14 -0700 Subject: [PATCH 25/27] do not remove dependency on MLS.Agent.Tools --- .../Commands/LoadExtensionsInDirectory.cs | 5 ++-- .../IExtensibleKernel.cs | 3 +- .../Microsoft.DotNet.Interactive.csproj | 26 +++++++++++++---- .../Microsoft.DotNet.Interactive.nuspec | 29 +++++++++++++++++++ .../Kernel/CSharpKernelTests.cs | 2 +- WorkspaceServer/Kernel/CSharpKernel.cs | 5 ++-- .../Kernel/CSharpKernelExtensions.cs | 2 +- 7 files changed, 59 insertions(+), 13 deletions(-) create mode 100644 Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec diff --git a/Microsoft.DotNet.Interactive/Commands/LoadExtensionsInDirectory.cs b/Microsoft.DotNet.Interactive/Commands/LoadExtensionsInDirectory.cs index 98c988fdd..aa66e45a2 100644 --- a/Microsoft.DotNet.Interactive/Commands/LoadExtensionsInDirectory.cs +++ b/Microsoft.DotNet.Interactive/Commands/LoadExtensionsInDirectory.cs @@ -1,17 +1,18 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using MLS.Agent.Tools; using System.IO; namespace Microsoft.DotNet.Interactive.Commands { public class LoadExtensionsInDirectory : KernelCommandBase { - public LoadExtensionsInDirectory(DirectoryInfo directory) + public LoadExtensionsInDirectory(IDirectoryAccessor directory) { Directory = directory; } - public DirectoryInfo Directory { get; } + public IDirectoryAccessor Directory { get; } } } \ No newline at end of file diff --git a/Microsoft.DotNet.Interactive/IExtensibleKernel.cs b/Microsoft.DotNet.Interactive/IExtensibleKernel.cs index c09014c6a..31841a0dd 100644 --- a/Microsoft.DotNet.Interactive/IExtensibleKernel.cs +++ b/Microsoft.DotNet.Interactive/IExtensibleKernel.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using MLS.Agent.Tools; using System.IO; using System.Threading.Tasks; @@ -8,6 +9,6 @@ namespace Microsoft.DotNet.Interactive { public interface IExtensibleKernel { - public Task LoadExtensionsInDirectory(DirectoryInfo directory, KernelInvocationContext invocationContext); + public Task LoadExtensionsInDirectory(IDirectoryAccessor directory, KernelInvocationContext invocationContext); } } \ No newline at end of file diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj index 738a94bcb..071987b2c 100644 --- a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj @@ -10,21 +10,37 @@ true + + + 2.9.4 + 4.3.0 + 4.1.6 + 0.3.0-alpha.19420.2 + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + all + + + + + + + + + diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec new file mode 100644 index 000000000..f25bc1af4 --- /dev/null +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec @@ -0,0 +1,29 @@ + + + + $CommonMetadataElements$ + en-US + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WorkspaceServer.Tests/Kernel/CSharpKernelTests.cs b/WorkspaceServer.Tests/Kernel/CSharpKernelTests.cs index d1cc5b73b..b70362df9 100644 --- a/WorkspaceServer.Tests/Kernel/CSharpKernelTests.cs +++ b/WorkspaceServer.Tests/Kernel/CSharpKernelTests.cs @@ -635,7 +635,7 @@ public async Task Should_load_extension_in_directory() var kernel = CreateKernel(); - await kernel.SendAsync(new LoadExtensionsInDirectory(nugetPackageDirectory.GetFullyQualifiedRoot())); + await kernel.SendAsync(new LoadExtensionsInDirectory(nugetPackageDirectory)); KernelEvents.Should() diff --git a/WorkspaceServer/Kernel/CSharpKernel.cs b/WorkspaceServer/Kernel/CSharpKernel.cs index b740708de..eeec04661 100644 --- a/WorkspaceServer/Kernel/CSharpKernel.cs +++ b/WorkspaceServer/Kernel/CSharpKernel.cs @@ -324,10 +324,9 @@ bool ShouldRebuild() } } - public async Task LoadExtensionsInDirectory(DirectoryInfo directory, KernelInvocationContext context) + public async Task LoadExtensionsInDirectory(IDirectoryAccessor directory, KernelInvocationContext context) { - var directoryAccessor = new FileSystemDirectoryAccessor(directory); - var extensionsDirectory = directoryAccessor.GetDirectoryAccessorForRelativePath(_assemblyExtensionsPath); + var extensionsDirectory = directory.GetDirectoryAccessorForRelativePath(_assemblyExtensionsPath); await new KernelExtensionLoader().LoadFromAssembliesInDirectory(extensionsDirectory, context.HandlingKernel, context); } diff --git a/WorkspaceServer/Kernel/CSharpKernelExtensions.cs b/WorkspaceServer/Kernel/CSharpKernelExtensions.cs index 035c64e5e..71385455a 100644 --- a/WorkspaceServer/Kernel/CSharpKernelExtensions.cs +++ b/WorkspaceServer/Kernel/CSharpKernelExtensions.cs @@ -100,7 +100,7 @@ public static CSharpKernel UseNugetDirective(this CSharpKernel kernel, INativeAs context.Publish(new DisplayedValueProduced($"Successfully added reference to package {package.PackageName}, version {result.InstalledVersion}", context.Command)); context.Publish(new NuGetPackageAdded(addPackage, package)); - var nugetPackageDirectory =await restoreContext.GetDirectoryForPackage(package.PackageName); + var nugetPackageDirectory = new FileSystemDirectoryAccessor(await restoreContext.GetDirectoryForPackage(package.PackageName)); await pipelineContext.HandlingKernel.SendAsync(new LoadExtensionsInDirectory(nugetPackageDirectory)); } else From b431610fc662ab2142614537a467bf9c1b7f02aa Mon Sep 17 00:00:00 2001 From: Akshita Date: Tue, 17 Sep 2019 13:54:16 -0700 Subject: [PATCH 26/27] add the nuspec file --- .../Microsoft.DotNet.Interactive.csproj | 2 + .../Microsoft.DotNet.Interactive.nuspec | 50 +++++++++---------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj index 071987b2c..9f16ea6a8 100644 --- a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj @@ -2,8 +2,10 @@ netstandard2.0 + Microsoft.DotNet.Interactive $(NoWarn);8002 preview + Microsoft.DotNet.Interactive.nuspec diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec index f25bc1af4..bf9014ab8 100644 --- a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.nuspec @@ -1,29 +1,29 @@ - - + + $CommonMetadataElements$ - en-US - - - - - - - + en-US + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file From 506d9e06903c221fc97107f4503b35c0be2d5ac3 Mon Sep 17 00:00:00 2001 From: Akshita Date: Tue, 17 Sep 2019 14:17:36 -0700 Subject: [PATCH 27/27] use task.run --- MLS.Agent/KernelExtensions.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MLS.Agent/KernelExtensions.cs b/MLS.Agent/KernelExtensions.cs index 73675aafb..3167bff0d 100644 --- a/MLS.Agent/KernelExtensions.cs +++ b/MLS.Agent/KernelExtensions.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System.Threading.Tasks; using Clockwise; using Microsoft.DotNet.Interactive; using XPlot.DotNet.Interactive.KernelExtensions; @@ -13,7 +14,7 @@ public static T UseXplot(this T kernel) where T : KernelBase { var extension = new XPlotKernelExtension(); - extension.OnLoadAsync(kernel).Wait(); + Task.Run(() => extension.OnLoadAsync(kernel)).Wait(); return kernel; } }