Skip to content

Commit

Permalink
Multi-target Microsoft.DotNet.Interactive.csproj to support both nets…
Browse files Browse the repository at this point in the history
…tandard2.0 as well as net7.0.

Also includes the following changes:

* Remove Microsoft.DotNet.Interactive.VisualStudio.csproj now that Microsoft.DotNet.Interactive.csproj itself supports netstandard2.0.
* Rename Microsoft.DotNet.Interactive.VisualStudio.Tests.csproj to Microsoft.DotNet.Interactive.NetFramework.Tests.csproj.
* Move StdIoKernelConnector from dotnet-interactive.csproj into Microsoft.DotNet.Interactive.csproj.
* Include polygloy-notebooks.js as an embedded resource in Microsoft.DotNet.Interactive.csproj.
* Include some additional tests related to ProxyKernel in Microsoft.DotNet.Interactive.NetFramework.Tests.csproj.
  • Loading branch information
shyamnamboodiripad committed Oct 11, 2023
1 parent ae21674 commit 2110b1d
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 104 deletions.
17 changes: 1 addition & 16 deletions dotnet-interactive.sln
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactiv
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactive.PackageManagement", "src\Microsoft.DotNet.Interactive.PackageManagement\Microsoft.DotNet.Interactive.PackageManagement.csproj", "{53EF46D6-5E21-4507-B8C0-779B634262AA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactive.VisualStudio", "src\Microsoft.DotNet.Interactive.VisualStudio\Microsoft.DotNet.Interactive.VisualStudio.csproj", "{0FAA07B9-DBE4-47B5-939F-E1A69B975AD0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactive.VSCode", "src\Microsoft.DotNet.Interactive.VSCode\Microsoft.DotNet.Interactive.VSCode.csproj", "{382C875B-2CB2-4F93-B5E9-EC14CDDB2256}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactive.Documents", "src\Microsoft.DotNet.Interactive.Documents\Microsoft.DotNet.Interactive.Documents.csproj", "{E06F109D-E9B5-4C68-9904-6955CA30252D}"
Expand Down Expand Up @@ -112,7 +110,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactiv
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactive.SQLite.Tests", "src\Microsoft.DotNet.Interactive.SQLite.Tests\Microsoft.DotNet.Interactive.SQLite.Tests.csproj", "{83B62E34-7AE3-4A7A-A105-1707FF389D39}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactive.VisualStudio.Tests", "src\Microsoft.DotNet.Interactive.VisualStudio.Tests\Microsoft.DotNet.Interactive.VisualStudio.Tests.csproj", "{DE705C7B-7CBD-42C2-81DE-B43ECD179EBC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactive.NetFramework.Tests", "src\Microsoft.DotNet.Interactive.NetFramework.Tests\Microsoft.DotNet.Interactive.NetFramework.Tests.csproj", "{DE705C7B-7CBD-42C2-81DE-B43ECD179EBC}"
ProjectSection(ProjectDependencies) = postProject
{1A4A744F-FEF3-4361-A2E5-C5D496F7BFDC} = {1A4A744F-FEF3-4361-A2E5-C5D496F7BFDC}
EndProjectSection
Expand Down Expand Up @@ -409,18 +407,6 @@ Global
{53EF46D6-5E21-4507-B8C0-779B634262AA}.Release|x64.Build.0 = Release|Any CPU
{53EF46D6-5E21-4507-B8C0-779B634262AA}.Release|x86.ActiveCfg = Release|Any CPU
{53EF46D6-5E21-4507-B8C0-779B634262AA}.Release|x86.Build.0 = Release|Any CPU
{0FAA07B9-DBE4-47B5-939F-E1A69B975AD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0FAA07B9-DBE4-47B5-939F-E1A69B975AD0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0FAA07B9-DBE4-47B5-939F-E1A69B975AD0}.Debug|x64.ActiveCfg = Debug|Any CPU
{0FAA07B9-DBE4-47B5-939F-E1A69B975AD0}.Debug|x64.Build.0 = Debug|Any CPU
{0FAA07B9-DBE4-47B5-939F-E1A69B975AD0}.Debug|x86.ActiveCfg = Debug|Any CPU
{0FAA07B9-DBE4-47B5-939F-E1A69B975AD0}.Debug|x86.Build.0 = Debug|Any CPU
{0FAA07B9-DBE4-47B5-939F-E1A69B975AD0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0FAA07B9-DBE4-47B5-939F-E1A69B975AD0}.Release|Any CPU.Build.0 = Release|Any CPU
{0FAA07B9-DBE4-47B5-939F-E1A69B975AD0}.Release|x64.ActiveCfg = Release|Any CPU
{0FAA07B9-DBE4-47B5-939F-E1A69B975AD0}.Release|x64.Build.0 = Release|Any CPU
{0FAA07B9-DBE4-47B5-939F-E1A69B975AD0}.Release|x86.ActiveCfg = Release|Any CPU
{0FAA07B9-DBE4-47B5-939F-E1A69B975AD0}.Release|x86.Build.0 = Release|Any CPU
{382C875B-2CB2-4F93-B5E9-EC14CDDB2256}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{382C875B-2CB2-4F93-B5E9-EC14CDDB2256}.Debug|Any CPU.Build.0 = Debug|Any CPU
{382C875B-2CB2-4F93-B5E9-EC14CDDB2256}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -737,7 +723,6 @@ Global
{EBDC3450-C4C0-42C6-8D53-85FEDF897664} = {B95A8485-8C53-4F56-B0CE-19C0726B5805}
{79FBB52B-BC6B-44F9-9DF0-F58F2DA83EE0} = {11BA3480-4584-435C-BA9A-8C554DB60E9F}
{53EF46D6-5E21-4507-B8C0-779B634262AA} = {B95A8485-8C53-4F56-B0CE-19C0726B5805}
{0FAA07B9-DBE4-47B5-939F-E1A69B975AD0} = {B95A8485-8C53-4F56-B0CE-19C0726B5805}
{382C875B-2CB2-4F93-B5E9-EC14CDDB2256} = {B95A8485-8C53-4F56-B0CE-19C0726B5805}
{E06F109D-E9B5-4C68-9904-6955CA30252D} = {B95A8485-8C53-4F56-B0CE-19C0726B5805}
{BF607791-F6C2-4E41-B916-DF675FA52D5C} = {11BA3480-4584-435C-BA9A-8C554DB60E9F}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,12 @@ Microsoft.DotNet.Interactive.Connection
public static System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get;}
public static CommandOrEvent DeserializeCommandOrEvent(System.String json)
public static CommandOrEvent DeserializeCommandOrEvent(System.Text.Json.JsonElement jsonObject)
public class StdIoKernelConnector
.ctor(System.String[] command, System.String rootProxyKernelLocalName, System.Uri kernelHostUri, System.IO.DirectoryInfo workingDirectory = null)
public System.Nullable<System.Int32> ProcessId { get;}
public System.Threading.Tasks.Task<ProxyKernel> CreateProxyKernelAsync(System.String remoteName, System.String localNameOverride = null)
public System.Threading.Tasks.Task<ProxyKernel> CreateProxyKernelAsync(Microsoft.DotNet.Interactive.KernelInfo remoteInfo, System.String localNameOverride = null)
public System.Threading.Tasks.Task<ProxyKernel> CreateRootProxyKernelAsync()
Microsoft.DotNet.Interactive.Events
public class CodeSubmissionReceived : KernelEvent
.ctor(Microsoft.DotNet.Interactive.Commands.SubmitCode command)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@

<ItemGroup>
<Compile Include="..\dotnet-interactive\Pocket\Format.CustomizeLogString.cs" Link="Pocket\Format.CustomizeLogString.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\ProxyKernelConnectionTestsBase.cs" Link="ProxyKernelConnectionTestsBase.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\StdIoKernelConnectorTests.cs" Link="StdIoKernelConnectorTests.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\Utility\ConnectHost.cs" Link="Utility\ConnectHost.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\Utility\FactSkipLinux.cs" Link="Utility\FactSkipLinux.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\Utility\FactSkipNetFramework.cs" Link="Utility\FactSkipNetFramework.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\Utility\FakeKernel.cs" Link="Utility\FakeKernel.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\Utility\MarkupTestFile.cs" Link="Utilitiy\MarkupTestFile.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\Utility\TestUtility.cs" Link="Utility\TestUtility.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\KernelTests.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\KernelRoutingTests.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\KernelSchedulerTests.cs" />
<Compile Include="..\dotnet-interactive.Tests\StdIoKernelConnectorTests.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\Utility\WindowsFact.cs" Link="Utility\WindowsFact.cs" />
</ItemGroup>

<ItemGroup>
Expand All @@ -40,17 +43,14 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.DotNet.Interactive.VisualStudio\Microsoft.DotNet.Interactive.VisualStudio.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="xunit.runner.visualstudio" Version="$(xunitrunnervisualstudioVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.DotNet.Interactive\Microsoft.DotNet.Interactive.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</HiddenComponentWarnings>
<IgnoredTests>
<FixtureTestSelector>
<FixtureName>Microsoft.DotNet.Interactive.App.Tests.StdIoKernelConnectorTests</FixtureName>
<FixtureName>Microsoft.DotNet.Interactive.Tests.StdIoKernelConnectorTests</FixtureName>
</FixtureTestSelector>
</IgnoredTests>
</Settings>
Expand Down
2 changes: 0 additions & 2 deletions src/Microsoft.DotNet.Interactive.Tests/KernelRoutingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
using System;
using System.Collections.Generic;
using System.CommandLine;
using System.Linq;
using System.Threading.Tasks;
using FluentAssertions;
using Microsoft.DotNet.Interactive.App;
using Microsoft.DotNet.Interactive.Commands;
using Microsoft.DotNet.Interactive.Events;
using Microsoft.DotNet.Interactive.Tests.Utility;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
using System.Threading.Tasks;
using FluentAssertions;
using FluentAssertions.Execution;
using Microsoft.DotNet.Interactive.App.Connection;
using Microsoft.DotNet.Interactive.Commands;
using Microsoft.DotNet.Interactive.Connection;
using Microsoft.DotNet.Interactive.Events;
using Xunit;

namespace Microsoft.DotNet.Interactive.App.Tests
namespace Microsoft.DotNet.Interactive.Tests
{
public class StdIoKernelConnectorTests
{
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@
using System.Threading.Tasks;

using Microsoft.DotNet.Interactive.Commands;
using Microsoft.DotNet.Interactive.Connection;
using Microsoft.DotNet.Interactive.Events;
using Microsoft.DotNet.Interactive.Utility;

using Pocket;

using static Pocket.Logger<Microsoft.DotNet.Interactive.App.Connection.StdIoKernelConnector>;
using static Pocket.Logger<Microsoft.DotNet.Interactive.Connection.StdIoKernelConnector>;

using CompositeDisposable = Pocket.CompositeDisposable;

namespace Microsoft.DotNet.Interactive.App.Connection;
namespace Microsoft.DotNet.Interactive.Connection;

public class StdIoKernelConnector
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework Condition="'$(TargetFramework)'==''">netstandard2.1</TargetFramework>
<TargetFrameworks>netstandard2.0;net7.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<PackageId Condition="'$(PackageId)'==''">Microsoft.DotNet.Interactive</PackageId>
<NoWarn>$(NoWarn);8002;CS8002</NoWarn>
Expand All @@ -12,6 +12,19 @@
<PackageDescription Condition="'$(PackageDescription)'==''">Core types for building applications providing interactive programming for .NET.</PackageDescription>
<PackageTags Condition="'$(PackageTags)'==''">polyglot notebook dotnet interactive</PackageTags>
</PropertyGroup>

<ItemGroup Label="Resources">
<!-- JavaScript kernel -->
<EmbeddedResource Include="..\polyglot-notebooks\lib\polyglot-notebooks.js" />
</ItemGroup>

<ItemGroup Label="Logging Customization">
<!-- Implementation for partial method in Pocket that customizes logging for commands and events -->
<None Include="..\dotnet-interactive\Pocket\Format.CustomizeLogString.cs">
<Pack>true</Pack>
<PackagePath>contentFiles\cs\any\(Pocket)\LoggerExtensions\Format.CustomizeLogString.cs</PackagePath>
</None>
</ItemGroup>

<PropertyGroup>
<MicrosoftCodeAnalysisAnalyzersVersion>2.9.6</MicrosoftCodeAnalysisAnalyzersVersion>
Expand Down
2 changes: 1 addition & 1 deletion test-retry-runner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if ($IsWindows) {
else
{
$projectsToSkip = @(
"Microsoft.DotNet.Interactive.VisualStudio.Tests",
"Microsoft.DotNet.Interactive.NetFramework.Tests",
"Microsoft.DotNet.Interactive.CSharpProject.Tests"
)
}
Expand Down

0 comments on commit 2110b1d

Please sign in to comment.