这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
<SystemDiagnosticsProcessVersion>4.3.0</SystemDiagnosticsProcessVersion>
<SystemReactiveVersion>4.3.2</SystemReactiveVersion>
<SystemRuntimeExtensionsVersion>4.3.0</SystemRuntimeExtensionsVersion>
<MicrosoftCodeAnalysisCommonVersion>4.4.0</MicrosoftCodeAnalysisCommonVersion>
<MicrosoftCodeAnalysisWorkspacesCommonVersion>4.4.0</MicrosoftCodeAnalysisWorkspacesCommonVersion>
<MicrosoftCodeAnalysisCommonVersion>4.5.0</MicrosoftCodeAnalysisCommonVersion>
<MicrosoftCodeAnalysisWorkspacesCommonVersion>4.5.0</MicrosoftCodeAnalysisWorkspacesCommonVersion>
<SystemDrawingCommonVersion>7.0.0</SystemDrawingCommonVersion>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

<!-- Consolidate FSharp package versions -->
<ItemGroup>
<PackageReference Update="FSharp.Core" Version="6.0.1" />
<PackageReference Update="FSharp.Compiler.Service" Version="41.0.1" />
<PackageReference Update="FSharp.Core" Version="7.0.200" />
<PackageReference Update="FSharp.Compiler.Service" Version="43.7.200" />
</ItemGroup>

<Import Project="eng\targets\Versions.targets" Condition="'$(UseStableVersion)' == 'true'" />
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.TryDotNet.IntegrationTests/EditorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ static void Main() {{
.Contain("Success");
}

[IntegrationTestFact]
[IntegrationTestFact]
public async Task when_user_code_in_editor_is_executed_it_produces_runResult_event_with_outputs()
{
var page = await Playwright.Browser!.NewPageAsync();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// 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 FluentAssertions.Execution;

using System;
using System.Runtime.InteropServices;

using Xunit;

namespace Microsoft.TryDotNet.IntegrationTests
Expand All @@ -10,13 +14,18 @@ internal class IntegrationTestFactAttribute : FactAttribute
{
private const string EnvironmentVariableName = "RunIntegrationTests";

public IntegrationTestFactAttribute()
public IntegrationTestFactAttribute(string? skipReason = null)

{
var variableValue = Environment.GetEnvironmentVariable(EnvironmentVariableName) ?? "false";
switch (variableValue.ToLowerInvariant())
{
case "1":
case "true":
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
Skip = string.IsNullOrWhiteSpace(skipReason) ? "Ignored on Linux" : skipReason;
}
break;
default:
Skip = $"Skipping integration tests because environment variable '{EnvironmentVariableName}' was not 'true' or '1'.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

<ItemGroup>
<PackageReference Include="Assent" Version="1.7.0" />
<PackageReference Include="FluentAssertions" Version="6.8.0" />
<PackageReference Include="Microsoft.Playwright" Version="1.28.0" />
<PackageReference Include="FluentAssertions" Version="6.10.0" />
<PackageReference Include="Microsoft.Playwright" Version="1.30.0" />
<PackageReference Include="coverlet.collector" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ProjectReference Include="..\Microsoft.TryDotNet\Microsoft.TryDotNet.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.5" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="Assent" Version="1.7.0" />
<PackageReference Include="FluentAssertions" Version="6.8.0" />
<PackageReference Include="FluentAssertions" Version="6.10.0" />
<PackageReference Include="coverlet.collector" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand All @@ -25,7 +25,7 @@

<ItemGroup>
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@


<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.5" PrivateAssets="all" />
<PackageReference Include="System.Reactive" Version="5.0.0" />
</ItemGroup>

Expand Down
8 changes: 4 additions & 4 deletions src/Microsoft.TryDotNet/Microsoft.TryDotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Interactive.CSharpProject" Version="1.0.0-beta.22580.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.0" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
<PackageReference Include="Microsoft.DotNet.Interactive.CSharpProject" Version="1.0.0-beta.23212.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.5" />
<PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommonVersion)" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Security.Cryptography.X509Certificates" Version="4.3.2" />
</ItemGroup>
Expand Down
8 changes: 1 addition & 7 deletions src/Microsoft.TryDotNet/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,17 @@ public static WebApplication CreateWebApplication(WebApplicationOptions options)
var kernelEvents = new List<KernelEvent>();
await using (var requestBody = request.Body)
{
//Debugger.Launch();
using var kernel = new CSharpProjectKernel("project-kernel");
var body = await new StreamReader(requestBody).ReadToEndAsync();

var bundle = JsonDocument.Parse(body).RootElement;

kernel.KernelEvents.Subscribe(e => kernelEvents.Add(e));

var commandEnvelopes = ReadCommands(bundle).ToList();
//if (commandEnvelopes.FirstOrDefault(ce => ce.Command is OpenProject) is not null)
//{
// Debugger.Launch();
//}

foreach (var commandEnvelope in commandEnvelopes)
{
var results = await kernel.SendAsync(commandEnvelope.Command, CancellationToken.None);
kernelEvents.AddRange(results.Events);
}
}

Expand Down
20 changes: 10 additions & 10 deletions src/microsoft-trydotnet-editor/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/microsoft-trydotnet-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"webpack-cli": "4.10.0"
},
"dependencies": {
"@microsoft/dotnet-interactive": "1.0.357301",
"@microsoft/polyglot-notebooks": "1.0.411302",
"monaco-editor": "0.33.0",
"rxjs": "7.5.5"
},
Expand Down
18 changes: 9 additions & 9 deletions src/microsoft-trydotnet-editor/src/EditorAdapter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +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.

import * as dotnetInteractive from '@microsoft/dotnet-interactive';
import * as polyglotNotebooks from '@microsoft/polyglot-notebooks';
import * as rxjs from 'rxjs';
import { DebouncingKernel } from './decouncingKernel';

Expand Down Expand Up @@ -35,10 +35,10 @@ export abstract class EditorAdapter {
abstract updateOptions(options: any): void;
abstract focus(): void;

private _diagnostics: dotnetInteractive.Diagnostic[] = [];
private _diagnostics: polyglotNotebooks.Diagnostic[] = [];
abstract setMarkers(markers: IMarkerData[]);

displayDiagnostics(diagnostics: dotnetInteractive.Diagnostic[]) {
displayDiagnostics(diagnostics: polyglotNotebooks.Diagnostic[]) {
const markers: IMarkerData[] = [];
for (const diagnostic of diagnostics) {
let severity = MarkerSeverity.Info;
Expand Down Expand Up @@ -89,7 +89,7 @@ export abstract class EditorAdapter {
return this._languageServiceEnabled;
}

public get diagnostics(): dotnetInteractive.Diagnostic[] {
public get diagnostics(): polyglotNotebooks.Diagnostic[] {
return this._diagnostics;
}

Expand All @@ -110,8 +110,8 @@ export abstract class EditorAdapter {
private handleContentChanged(contentChanged: ContentChangedEvent) {
if (this._kernel && this._languageServiceEnabled) {
this._kernel.send({
commandType: dotnetInteractive.RequestDiagnosticsType,
command: <dotnetInteractive.RequestDiagnostics>{
commandType: polyglotNotebooks.RequestDiagnosticsType,
command: <polyglotNotebooks.RequestDiagnostics>{
code: contentChanged.code
}
});
Expand Down Expand Up @@ -145,10 +145,10 @@ export abstract class EditorAdapter {
});
}

private handleKernelEvent(eventEnvelope: dotnetInteractive.KernelEventEnvelope) {
private handleKernelEvent(eventEnvelope: polyglotNotebooks.KernelEventEnvelope) {
switch (<any>eventEnvelope.eventType) {
case dotnetInteractive.DiagnosticsProducedType:
const diagnosticsEvent = <dotnetInteractive.DiagnosticsProduced>eventEnvelope.event;
case polyglotNotebooks.DiagnosticsProducedType:
const diagnosticsEvent = <polyglotNotebooks.DiagnosticsProduced>eventEnvelope.event;
this._diagnostics = diagnosticsEvent.diagnostics;
this.displayDiagnostics(diagnosticsEvent.diagnostics);
break;
Expand Down
Loading