Revert to using .NET Core SDK 3.1.423.

This commit is contained in:
Cassandra Granade 2022-09-29 20:46:50 +00:00
Родитель c4c48e425f
Коммит 993a6bfee8
14 изменённых файлов: 36 добавлений и 29 удалений

Просмотреть файл

@ -0,0 +1,13 @@
{
"extensions": [
"ms-dotnettools.csharp"
],
"features": {
"ghcr.io/devcontainers/features/dotnet:1": {
"version": "3.1.423"
},
"ghcr.io/devcontainers/features/python:1": {
"version": "3.8"
}
}
}

Просмотреть файл

@ -4,9 +4,9 @@
steps:
- task: DotNetCoreInstaller@1
displayName: 'Install .NET Core SDK 6.0.401'
displayName: 'Install .NET Core SDK 3.1.423'
inputs:
version: 6.0.401
version: 3.1.423
- task: DotNetCoreCLI@2
displayName: "Build and run unit tests on Core library"

Просмотреть файл

@ -3,7 +3,7 @@
<PropertyGroup>
<PackAsTool>True</PackAsTool>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<!--
NB: We need for the tool command name to match the pattern dotnet-*,

Просмотреть файл

@ -4,7 +4,7 @@
<ToolCommandName>dotnet-imoon</ToolCommandName>
<PackAsTool>True</PackAsTool>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0</Version>
</PropertyGroup>

Просмотреть файл

@ -63,7 +63,7 @@ namespace Microsoft.Jupyter.Core.Protocol
// each message will have the previous message's header in this field.
public MessageHeader ParentHeader { get; set; }
public Dictionary<string, JToken> Metadata { get; set; } = new();
public Dictionary<string, JToken> Metadata { get; set; } = new Dictionary<string, JToken>();
// FIXME: make not just an object.
public MessageContent Content { get; set; }
@ -205,7 +205,8 @@ namespace Microsoft.Jupyter.Core.Protocol
public Dictionary<string, string> Data { get; set; }
[JsonProperty("metadata")]
public Dictionary<string, Dictionary<string, JToken>> Metadata { get; set; } = new();
public Dictionary<string, Dictionary<string, JToken>> Metadata { get; set; }
= new Dictionary<string, Dictionary<string, JToken>>();
}
[JsonObject(MemberSerialization.OptIn)]
@ -286,7 +287,8 @@ namespace Microsoft.Jupyter.Core.Protocol
public Dictionary<string, string> Data { get; set; }
[JsonProperty("metadata")]
public Dictionary<string, Dictionary<string, JToken>> Metadata { get; set; } = new();
public Dictionary<string, Dictionary<string, JToken>> Metadata { get; set; }
= new Dictionary<string, Dictionary<string, JToken>>();
[JsonProperty("transient", NullValueHandling=NullValueHandling.Ignore)]
public TransientDisplayData? Transient { get; set; } = null;

Просмотреть файл

@ -413,7 +413,7 @@ namespace Microsoft.Jupyter.Core
StreamName = stream,
Text = text
},
Metadata = new()
Metadata = new Dictionary<string, Newtonsoft.Json.Linq.JToken>()
}.AsReplyTo(parent)
);
}
@ -435,7 +435,7 @@ namespace Microsoft.Jupyter.Core
Transient = transient
};
#if DEBUG
Debug.Assert(displayData.Metadata is not null);
Debug.Assert(!(displayData.Metadata is null));
#endif
// Send the engine's output to stdout.
@ -503,7 +503,7 @@ namespace Microsoft.Jupyter.Core
{
ZmqIdentities = message.ZmqIdentities,
ParentHeader = message.Header,
Metadata = new(),
Metadata = new Dictionary<string, Newtonsoft.Json.Linq.JToken>(),
Content = null,
Header = new MessageHeader
{

Просмотреть файл

@ -63,7 +63,7 @@ namespace Microsoft.Jupyter.Core
{
ZmqIdentities = message.ZmqIdentities,
ParentHeader = message.Header,
Metadata = new(),
Metadata = new Dictionary<string, Newtonsoft.Json.Linq.JToken>(),
Content = new ExecuteInputContent
{
Code = code,
@ -115,7 +115,7 @@ namespace Microsoft.Jupyter.Core
{
ZmqIdentities = message.ZmqIdentities,
ParentHeader = message.Header,
Metadata = new(),
Metadata = new Dictionary<string, Newtonsoft.Json.Linq.JToken>(),
Content = new ExecuteResultContent
{
ExecutionCount = executionCount,
@ -142,7 +142,7 @@ namespace Microsoft.Jupyter.Core
{
ZmqIdentities = message.ZmqIdentities,
ParentHeader = message.Header,
Metadata = new(),
Metadata = new Dictionary<string, Newtonsoft.Json.Linq.JToken>(),
Content = new ExecuteReplyContent
{
ExecuteStatus = engineResponse.Status,
@ -168,7 +168,7 @@ namespace Microsoft.Jupyter.Core
{
ZmqIdentities = message.ZmqIdentities,
ParentHeader = message.Header,
Metadata = new(),
Metadata = new Dictionary<string, Newtonsoft.Json.Linq.JToken>(),
Content = new ExecuteReplyContent
{
ExecuteStatus = ExecuteStatus.Abort,

Просмотреть файл

@ -42,7 +42,7 @@ namespace Microsoft.Jupyter.Core
new EncodedData
{
Data = data,
Metadata = new()
Metadata = new Dictionary<string, Newtonsoft.Json.Linq.JToken>()
};
/// <summary>

Просмотреть файл

@ -53,7 +53,7 @@ namespace Microsoft.Jupyter.Core
{
ExecutionState = state
},
Metadata = new()
Metadata = new Dictionary<string, JToken>()
}.AsReplyTo(message)
);
}

Просмотреть файл

@ -1,8 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
global using System;
global using System.Collections.Generic;
global using System.Collections.Immutable;
global using System.Linq;
global using System.Threading;

Просмотреть файл

@ -35,8 +35,8 @@ namespace Microsoft.Jupyter.Core
public static MimeBundle Empty() =>
new MimeBundle
{
Data = new(),
Metadata = new()
Data = new Dictionary<string, string>(),
Metadata = new Dictionary<string, Dictionary<string, JToken>>()
};
}

Просмотреть файл

@ -190,7 +190,7 @@ namespace Microsoft.Jupyter.Core
{
ZmqIdentities = message.ZmqIdentities,
ParentHeader = message.Header,
Metadata = new(),
Metadata = new Dictionary<string, Newtonsoft.Json.Linq.JToken>(),
Content = this.context.Properties.AsKernelInfoReply(),
Header = new MessageHeader
{

Просмотреть файл

@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>10.0</LangVersion>
<LangVersion>8.0</LangVersion>
<AssemblyName>Microsoft.Jupyter.Core</AssemblyName>
<Version Condition=" '$(BUILD_MAJOR)' != '' ">$(BUILD_MAJOR).$(BUILD_MINOR).0.0</Version>

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<AssemblyName>Microsoft.Jupyter.Core.Tests</AssemblyName>