From 7069bc7aac34d8976fbf61dbe98ded12fa7a03d7 Mon Sep 17 00:00:00 2001 From: Andrey Shchekin Date: Mon, 18 Nov 2024 23:17:05 +1300 Subject: [PATCH 01/11] [gh-1350] Resolve security warnings in build --- .../#external/mirrorsharp-codemirror-6-preview | 2 +- .../Container.Manager/Container.Manager.csproj | 2 ++ source/NetFramework/Server/Server.csproj | 3 ++- source/NetFramework/Server/Web.config | 16 +++++++++++----- source/Server/Server.csproj | 5 ++++- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/source/#external/mirrorsharp-codemirror-6-preview b/source/#external/mirrorsharp-codemirror-6-preview index 860db8c2..9f736e81 160000 --- a/source/#external/mirrorsharp-codemirror-6-preview +++ b/source/#external/mirrorsharp-codemirror-6-preview @@ -1 +1 @@ -Subproject commit 860db8c220e702c630841f873017e936b09b7d18 +Subproject commit 9f736e814449cea07ae1338193928f79d74ebd4b diff --git a/source/Container.Manager/Container.Manager.csproj b/source/Container.Manager/Container.Manager.csproj index 73be21d2..008fcf28 100644 --- a/source/Container.Manager/Container.Manager.csproj +++ b/source/Container.Manager/Container.Manager.csproj @@ -13,6 +13,8 @@ + + diff --git a/source/NetFramework/Server/Server.csproj b/source/NetFramework/Server/Server.csproj index fa5c5e93..3a9074b7 100644 --- a/source/NetFramework/Server/Server.csproj +++ b/source/NetFramework/Server/Server.csproj @@ -20,7 +20,7 @@ - + @@ -41,6 +41,7 @@ + diff --git a/source/NetFramework/Server/Web.config b/source/NetFramework/Server/Web.config index 22778ff9..0b8afd92 100644 --- a/source/NetFramework/Server/Web.config +++ b/source/NetFramework/Server/Web.config @@ -87,7 +87,7 @@ - + @@ -111,7 +111,7 @@ - + @@ -165,7 +165,7 @@ - + @@ -177,13 +177,13 @@ - + - + @@ -192,5 +192,11 @@ + + + + + + \ No newline at end of file diff --git a/source/Server/Server.csproj b/source/Server/Server.csproj index 164e03c0..dd9b4815 100644 --- a/source/Server/Server.csproj +++ b/source/Server/Server.csproj @@ -31,7 +31,7 @@ - + @@ -49,8 +49,11 @@ + + + From 192ea05c1b2009a6f7c84501b9df4782fb439cc0 Mon Sep 17 00:00:00 2001 From: Andrey Shchekin Date: Mon, 18 Nov 2024 23:39:18 +1300 Subject: [PATCH 02/11] [gh-1350] Fix web.config for .NET Framework --- source/NetFramework/Server/Web.config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/NetFramework/Server/Web.config b/source/NetFramework/Server/Web.config index 0b8afd92..6c9be345 100644 --- a/source/NetFramework/Server/Web.config +++ b/source/NetFramework/Server/Web.config @@ -102,6 +102,12 @@ + + + + + + From 6582e6740151250c2c13cbdf6db0cced4616c5da Mon Sep 17 00:00:00 2001 From: Andrey Shchekin Date: Mon, 18 Nov 2024 23:59:27 +1300 Subject: [PATCH 03/11] [gh-1350] Update to latest mirrorsharp --- source/#external/mirrorsharp-codemirror-6-preview | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/#external/mirrorsharp-codemirror-6-preview b/source/#external/mirrorsharp-codemirror-6-preview index 9f736e81..21855eda 160000 --- a/source/#external/mirrorsharp-codemirror-6-preview +++ b/source/#external/mirrorsharp-codemirror-6-preview @@ -1 +1 @@ -Subproject commit 9f736e814449cea07ae1338193928f79d74ebd4b +Subproject commit 21855eda79182195cac4c931659b8060311f84ef From 8dc140ed0bc89e1f614ce59514ad6bcdb3c1edf8 Mon Sep 17 00:00:00 2001 From: Andrey Shchekin Date: Tue, 19 Nov 2024 00:34:15 +1300 Subject: [PATCH 04/11] [gh-1349] Update Server and Container Host to .NET 9 --- .github/workflows/container-host-edge.yml | 10 +- .github/workflows/server-edge.yml | 20 +- global.json | 2 +- source/#external/Mobius.ILasm | 2 +- .../mirrorsharp-codemirror-6-preview | 2 +- .../Container.Manager.csproj | 2 +- .../Container.Warmup/Container.Warmup.csproj | 2 +- source/Container/Container.csproj | 2 +- source/NetFramework/Server/Web.config | 6 + source/Server/Server.csproj | 7 +- source/Server/Startup.cs | 186 +++++++++--------- .../TestCode/FSharp/SimpleUnion.fs | 56 +++--- .../TestCode/Finalizer.Exception.cs | 2 +- .../JitAsm/Generic.ClassWithAttribute.cs | 11 +- .../JitAsm/Generic.MethodWithAttribute.cs | 9 +- .../JitAsm/Generic.Nested.AttributeOnBoth.cs | 6 +- .../Generic.Nested.AttributeOnNested.cs | 2 +- .../JitAsm/Generic.Nested.AttributeOnTop.cs | 2 +- .../TestCode/JitAsm/Math.FusedMultiplyAdd.cs | 5 +- .../TestCode/JitAsm/Vectors.Avx2.cs | 15 +- .../TestCode/Nullable.Reference.Simple.IL.cs | 2 +- source/Tests/Decompilation/TestCode/Simple.cs | 2 +- source/Tests/Tests.csproj | 2 +- source/WebApp.Server/WebApp.Server.csproj | 2 +- 24 files changed, 182 insertions(+), 175 deletions(-) diff --git a/.github/workflows/container-host-edge.yml b/.github/workflows/container-host-edge.yml index fe69fb4f..aab9fa7f 100644 --- a/.github/workflows/container-host-edge.yml +++ b/.github/workflows/container-host-edge.yml @@ -14,19 +14,19 @@ on: jobs: build: - name: 'Build (.NET 8)' + name: 'Build (.NET 9)' # https://github.community/t/duplicate-checks-on-push-and-pull-request-simultaneous-event/18012/5 if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository runs-on: windows-latest env: NUGET_PACKAGES: ${{github.workspace}}/.nuget/packages steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: 'true' - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - uses: microsoft/setup-msbuild@v1.1 # https://github.com/actions/setup-dotnet/issues/155 @@ -47,7 +47,7 @@ jobs: - run: dotnet build source/Tests --configuration Release - run: dotnet test source/Tests --no-build --configuration Release - run: dotnet publish source/Container.Manager --no-build --configuration Release - - run: Compress-Archive -Path 'source/Container.Manager/bin/Release/net8.0/publish/*' -DestinationPath 'Container.Manager.zip' + - run: Compress-Archive -Path 'source/Container.Manager/bin/Release/net9.0/publish/*' -DestinationPath 'Container.Manager.zip' shell: pwsh - uses: actions/upload-artifact@v3 diff --git a/.github/workflows/server-edge.yml b/.github/workflows/server-edge.yml index d70584b3..3482e275 100644 --- a/.github/workflows/server-edge.yml +++ b/.github/workflows/server-edge.yml @@ -16,19 +16,19 @@ on: jobs: build-core: - name: 'Build (.NET 8)' + name: 'Build (.NET 9)' # https://github.community/t/duplicate-checks-on-push-and-pull-request-simultaneous-event/18012/5 if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository runs-on: windows-latest env: NUGET_PACKAGES: ${{github.workspace}}/.nuget/packages steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: 'true' - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - uses: microsoft/setup-msbuild@v1.1 # https://github.com/actions/setup-dotnet/issues/155 @@ -52,9 +52,9 @@ jobs: - run: dotnet test source/Tests --no-build --configuration Release - run: dotnet publish source/Server --no-build --configuration Release - run: dotnet publish source/WebApp.Server --no-build --configuration Release /p:ErrorOnDuplicatePublishOutputFiles=false - - run: Compress-Archive -Path 'source/Server/bin/Release/net8.0/publish/*' -DestinationPath 'Server.zip' + - run: Compress-Archive -Path 'source/Server/bin/Release/net9.0/publish/*' -DestinationPath 'Server.zip' shell: pwsh - - run: Compress-Archive -Path 'source/WebApp.Server/bin/Release/net8.0/publish/*' -DestinationPath 'WebApp.Server.zip' + - run: Compress-Archive -Path 'source/WebApp.Server/bin/Release/net9.0/publish/*' -DestinationPath 'WebApp.Server.zip' shell: pwsh - uses: actions/upload-artifact@v3 @@ -109,12 +109,12 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: 'true' - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x # https://github.com/actions/setup-dotnet/issues/155 - run: dotnet nuget locals all --clear @@ -178,7 +178,7 @@ jobs: - deploy-netfx if: github.ref == 'refs/heads/main' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: 'git show ${{ github.sha }} --format="version_number=%cd" --date=format:%Y-%m-%d-%H%M --no-patch >> $GITHUB_OUTPUT' id: version diff --git a/global.json b/global.json index 273d5751..b2934c71 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "9.0.100", "rollForward": "latestFeature" } } diff --git a/source/#external/Mobius.ILasm b/source/#external/Mobius.ILasm index 46d8e265..bd0ec42e 160000 --- a/source/#external/Mobius.ILasm +++ b/source/#external/Mobius.ILasm @@ -1 +1 @@ -Subproject commit 46d8e265dff7be06245a6a34e4214d91bba627f6 +Subproject commit bd0ec42e1cc9bb473831abc870fe7ec358e2f42d diff --git a/source/#external/mirrorsharp-codemirror-6-preview b/source/#external/mirrorsharp-codemirror-6-preview index 21855eda..192401e7 160000 --- a/source/#external/mirrorsharp-codemirror-6-preview +++ b/source/#external/mirrorsharp-codemirror-6-preview @@ -1 +1 @@ -Subproject commit 21855eda79182195cac4c931659b8060311f84ef +Subproject commit 192401e73d5c2ec608529823db7aa89911f44bf9 diff --git a/source/Container.Manager/Container.Manager.csproj b/source/Container.Manager/Container.Manager.csproj index 008fcf28..96326503 100644 --- a/source/Container.Manager/Container.Manager.csproj +++ b/source/Container.Manager/Container.Manager.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 SharpLab.Container.Manager SharpLab.Container.Manager diff --git a/source/Container.Warmup/Container.Warmup.csproj b/source/Container.Warmup/Container.Warmup.csproj index 17d9256f..bf027354 100644 --- a/source/Container.Warmup/Container.Warmup.csproj +++ b/source/Container.Warmup/Container.Warmup.csproj @@ -1,7 +1,7 @@ Exe - net8.0 + net9.0 SharpLab.Container.Warmup SharpLab.Container.Warmup diff --git a/source/Container/Container.csproj b/source/Container/Container.csproj index 4b89137a..e3c02ea4 100644 --- a/source/Container/Container.csproj +++ b/source/Container/Container.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 SharpLab.Container SharpLab.Container Exe diff --git a/source/NetFramework/Server/Web.config b/source/NetFramework/Server/Web.config index 6c9be345..c50bcc90 100644 --- a/source/NetFramework/Server/Web.config +++ b/source/NetFramework/Server/Web.config @@ -204,5 +204,11 @@ + + + + + + \ No newline at end of file diff --git a/source/Server/Server.csproj b/source/Server/Server.csproj index dd9b4815..b2fac48a 100644 --- a/source/Server/Server.csproj +++ b/source/Server/Server.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 InProcess SharpLab.Server SharpLab.Server @@ -46,6 +46,11 @@ + + diff --git a/source/Server/Startup.cs b/source/Server/Startup.cs index 6d7330e6..949a1e84 100644 --- a/source/Server/Startup.cs +++ b/source/Server/Startup.cs @@ -17,111 +17,111 @@ using Microsoft.AspNetCore.Http; using System.Threading.Tasks; -namespace SharpLab.Server { - public class Startup { - // Chrome would limit to 10 mins I believe - private static readonly TimeSpan CorsPreflightMaxAge = TimeSpan.FromHours(1); - - public void ConfigureServices(IServiceCollection services) { - services.AddHttpClient(); - services.AddCors(); - services.AddControllers(); - } +namespace SharpLab.Server; - public void ConfigureContainer(ContainerBuilder builder) { - var assembly = Assembly.GetExecutingAssembly(); +public class Startup { + // Chrome would limit to 10 mins I believe + private static readonly TimeSpan CorsPreflightMaxAge = TimeSpan.FromHours(1); - builder - .RegisterAssemblyModulesInDirectoryOf(assembly) - .WhereFileMatches("SharpLab.*"); - } + public void ConfigureServices(IServiceCollection services) { + services.AddHttpClient(); + services.AddCors(); + services.AddControllers(); + } + + public void ConfigureContainer(ContainerBuilder builder) { + var assembly = Assembly.GetExecutingAssembly(); + + builder + .RegisterAssemblyModulesInDirectoryOf(assembly) + .WhereFileMatches("SharpLab.*"); + } - public static MirrorSharpOptions CreateMirrorSharpOptions(ILifetimeScope container) { - var options = new MirrorSharpOptions { - IncludeExceptionDetails = true, - StatusTestCommands = { - ('O', "x-optimize=debug,x-target=C#,x-no-cache=true,language=C#"), - ('R', "0:0:0::using System; public class C { public void M() { } }"), - ('U', "") - } - }; - var languages = container.Resolve(); - foreach (var language in languages) { - language.SlowSetup(options); + public static MirrorSharpOptions CreateMirrorSharpOptions(ILifetimeScope container) { + var options = new MirrorSharpOptions { + IncludeExceptionDetails = true, + StatusTestCommands = { + ('O', "x-optimize=debug,x-target=C#,x-no-cache=true,language=C#"), + ('R', "0:0:0::using System; public class C { public void M() { } }"), + ('U', "") } - PerformanceLog.Checkpoint("Startup.CreateMirrorSharpOptions.End"); - return options; + }; + var languages = container.Resolve(); + foreach (var language in languages) { + language.SlowSetup(options); } + PerformanceLog.Checkpoint("Startup.CreateMirrorSharpOptions.End"); + return options; + } - public virtual void Configure(IApplicationBuilder app, IWebHostEnvironment env) { + public virtual void Configure(IApplicationBuilder app, IWebHostEnvironment env) { + if (env.IsDevelopment()) + app.UseDeveloperExceptionPage(); + + app.UseRouting(); + app.UseCors(p => p + .AllowAnyHeader() + .AllowAnyOrigin() + .AllowAnyMethod() + .SetPreflightMaxAge(CorsPreflightMaxAge) + ); + + app.UseWebSockets(); + app.MapMirrorSharp("/mirrorsharp", CreateMirrorSharpOptions(app.ApplicationServices.GetAutofacRoot())); + + app.UseEndpoints(e => { + MapStatus(e); + MapBranchVersion(e, env); if (env.IsDevelopment()) - app.UseDeveloperExceptionPage(); - - app.UseRouting(); - app.UseCors(p => p - .AllowAnyHeader() - .AllowAnyOrigin() - .AllowAnyMethod() - .SetPreflightMaxAge(CorsPreflightMaxAge) - ); - - app.UseWebSockets(); - app.MapMirrorSharp("/mirrorsharp", CreateMirrorSharpOptions(app.ApplicationServices.GetAutofacRoot())); - - app.UseEndpoints(e => { - MapStatus(e); - MapBranchVersion(e, env); - if (env.IsDevelopment()) - MapFeatureFlags(e); - MapOtherEndpoints(e); - - e.MapControllers(); - }); - } + MapFeatureFlags(e); + MapOtherEndpoints(e); - private void MapStatus(IEndpointRouteBuilder e) { - var okBytes = new ReadOnlyMemory(Encoding.UTF8.GetBytes("OK")); - e.MapGet("/status", context => { - context.Response.ContentType = MediaTypeNames.Text.Plain; - return WriteResponseBodyAsync(context, okBytes); - }); - } + e.MapControllers(); + }); + } - private void MapFeatureFlags(IEndpointRouteBuilder e) { - e.MapGet("/featureflags/{key:alpha}", static context => { - var key = (string)context.GetRouteValue("key")!; - var featureFlagClient = context.RequestServices.GetRequiredService(); + private void MapStatus(IEndpointRouteBuilder e) { + var okBytes = new ReadOnlyMemory(Encoding.UTF8.GetBytes("OK")); + e.MapGet("/status", context => { + context.Response.ContentType = MediaTypeNames.Text.Plain; + return WriteResponseBodyAsync(context, okBytes); + }); + } - return context.Response.WriteAsync( - featureFlagClient.GetInt32Flag(key)?.ToString() ?? "", - context.RequestAborted - ); - }); - } + private void MapFeatureFlags(IEndpointRouteBuilder e) { + e.MapGet("/featureflags/{key:alpha}", static context => { + var key = (string)context.GetRouteValue("key")!; + var featureFlagClient = context.RequestServices.GetRequiredService(); - // Temporary: until build is updated to something better than a json file on site itself - protected virtual void MapBranchVersion(IEndpointRouteBuilder endpoints, IWebHostEnvironment env) { - var file = env.WebRootFileProvider.GetFileInfo("branch-version.json"); - if (!file.Exists) - return; - - using var stream = file.CreateReadStream(); - var bytes = new byte[stream.Length]; - stream.Read(bytes, 0, bytes.Length); - endpoints.MapGet("/branch-version.json", context => { - context.Response.ContentType = MediaTypeNames.Application.Json; - return WriteResponseBodyAsync(context, bytes); - }); - } + return context.Response.WriteAsync( + featureFlagClient.GetInt32Flag(key)?.ToString() ?? "", + context.RequestAborted + ); + }); + } - private Task WriteResponseBodyAsync(HttpContext context, ReadOnlyMemory body) { - var writeTask = context.Response.BodyWriter.WriteAsync(body, context.RequestAborted); - return writeTask.IsCompletedSuccessfully - ? Task.CompletedTask - : writeTask.AsTask(); - } + // Temporary: until build is updated to something better than a json file on site itself + protected virtual void MapBranchVersion(IEndpointRouteBuilder endpoints, IWebHostEnvironment env) { + var file = env.WebRootFileProvider.GetFileInfo("branch-version.json"); + if (!file.Exists) + return; + + using var stream = file.CreateReadStream(); + var bytes = new byte[stream.Length]; + stream.ReadExactly(bytes, 0, bytes.Length); + endpoints.MapGet("/branch-version.json", context => { + context.Response.ContentType = MediaTypeNames.Application.Json; + return WriteResponseBodyAsync(context, bytes); + }); + } - protected virtual void MapOtherEndpoints(IEndpointRouteBuilder endpoints) { - } + private Task WriteResponseBodyAsync(HttpContext context, ReadOnlyMemory body) { + var writeTask = context.Response.BodyWriter.WriteAsync(body, context.RequestAborted); + return writeTask.IsCompletedSuccessfully + ? Task.CompletedTask + : writeTask.AsTask(); + } + + protected virtual void MapOtherEndpoints(IEndpointRouteBuilder endpoints) { } } diff --git a/source/Tests/Decompilation/TestCode/FSharp/SimpleUnion.fs b/source/Tests/Decompilation/TestCode/FSharp/SimpleUnion.fs index 1c376544..516f7fa5 100644 --- a/source/Tests/Decompilation/TestCode/FSharp/SimpleUnion.fs +++ b/source/Tests/Decompilation/TestCode/FSharp/SimpleUnion.fs @@ -44,37 +44,37 @@ _+T.__DebugDisplay() L0052: mov rdi, rax L0055: mov rbp, [rsi+0x10] L0059: test rbp, rbp - L005c: jne short L006b + L005c: jne short L0084 L005e: mov rcx, rdi L0061: cmp [rcx], ecx L0063: call qword ptr [0x] - L0069: jmp short L00aa - L006b: mov rcx, rdi - L006e: cmp [rcx], ecx - L0070: call qword ptr [0x] - L0076: mov r14, rax - L0079: mov ecx, [rdi+0x28] - L007c: call qword ptr [0x] - L0082: mov rcx, rax - L0085: mov r8, [rsi+0x18] - L0089: mov rdx, rbp - L008c: mov r9, r14 - L008f: cmp [rcx], ecx - L0091: call qword ptr [0x] - L0097: mov rdx, rax - L009a: mov rcx, 0x - L00a4: call qword ptr [0x] - L00aa: movzx edx, byte ptr [rbx] - L00ad: mov rcx, rax - L00b0: mov rax, [rax] - L00b3: mov rax, [rax+0x40] - L00b7: add rsp, 0x20 - L00bb: pop rbx - L00bc: pop rbp - L00bd: pop rsi - L00be: pop rdi - L00bf: pop r14 - L00c1: jmp qword ptr [rax+0x20] + L0069: movzx edx, byte ptr [rbx] + L006c: mov rcx, rax + L006f: mov rax, [rax] + L0072: mov rax, [rax+0x40] + L0076: add rsp, 0x20 + L007a: pop rbx + L007b: pop rbp + L007c: pop rsi + L007d: pop rdi + L007e: pop r14 + L0080: jmp qword ptr [rax+0x20] + L0084: mov rcx, rdi + L0087: cmp [rcx], ecx + L0089: call qword ptr [0x] + L008f: mov r14, rax + L0092: mov ecx, [rdi+0x28] + L0095: call qword ptr [0x] + L009b: mov rcx, rax + L009e: mov r8, [rsi+0x18] + L00a2: mov rdx, rbp + L00a5: mov r9, r14 + L00a8: cmp [rcx], ecx + L00aa: call qword ptr [0x] + L00b0: mov rdx, rax + L00b3: mov rcx, 0x + L00bd: call qword ptr [0x] + L00c3: jmp short L0069 _+T.ToString() ; Failed to find JIT output. This might appear more frequently than before due to a library update. diff --git a/source/Tests/Decompilation/TestCode/Finalizer.Exception.cs b/source/Tests/Decompilation/TestCode/Finalizer.Exception.cs index 1244af9c..cb413968 100644 --- a/source/Tests/Decompilation/TestCode/Finalizer.Exception.cs +++ b/source/Tests/Decompilation/TestCode/Finalizer.Exception.cs @@ -25,7 +25,7 @@ 69 74 79 2e 50 65 72 6d 69 73 73 69 6f 6e 73 2e 53 65 63 75 72 69 74 79 50 65 72 6d 69 73 73 69 6f 6e 41 74 74 72 69 62 75 74 65 2c 20 53 79 73 74 65 6d 2e 52 75 6e 74 69 6d 65 2c 20 56 65 72 - 73 69 6f 6e 3d 38 2e 30 2e 30 2e 30 2c 20 43 75 + 73 69 6f 6e 3d 39 2e 30 2e 30 2e 30 2c 20 43 75 6c 74 75 72 65 3d 6e 65 75 74 72 61 6c 2c 20 50 75 62 6c 69 63 4b 65 79 54 6f 6b 65 6e 3d 62 30 33 66 35 66 37 66 31 31 64 35 30 61 33 61 15 01 diff --git a/source/Tests/Decompilation/TestCode/JitAsm/Generic.ClassWithAttribute.cs b/source/Tests/Decompilation/TestCode/JitAsm/Generic.ClassWithAttribute.cs index c321411c..8ee493ec 100644 --- a/source/Tests/Decompilation/TestCode/JitAsm/Generic.ClassWithAttribute.cs +++ b/source/Tests/Decompilation/TestCode/JitAsm/Generic.ClassWithAttribute.cs @@ -18,13 +18,12 @@ static T M() { L0002: ret C`1[[System.Decimal, System.Private.CoreLib]].M() - L0000: vzeroupper - L0003: vxorps xmm0, xmm0, xmm0 - L0007: vmovdqu [rcx], xmm0 - L000b: mov rax, rcx - L000e: ret + L0000: vxorps xmm0, xmm0, xmm0 + L0004: vmovdqu [rcx], xmm0 + L0008: mov rax, rcx + L000b: ret -C`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].M() +C`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].M() ; Failed to find JIT output. This might appear more frequently than before due to a library update. ; Please monitor https://github.com/ashmind/SharpLab/issues/1334 for progress. diff --git a/source/Tests/Decompilation/TestCode/JitAsm/Generic.MethodWithAttribute.cs b/source/Tests/Decompilation/TestCode/JitAsm/Generic.MethodWithAttribute.cs index 9e0371fc..5fc692ce 100644 --- a/source/Tests/Decompilation/TestCode/JitAsm/Generic.MethodWithAttribute.cs +++ b/source/Tests/Decompilation/TestCode/JitAsm/Generic.MethodWithAttribute.cs @@ -17,11 +17,10 @@ static T M() { L0002: ret C.M[[System.Decimal, System.Private.CoreLib]]() - L0000: vzeroupper - L0003: vxorps xmm0, xmm0, xmm0 - L0007: vmovdqu [rcx], xmm0 - L000b: mov rax, rcx - L000e: ret + L0000: vxorps xmm0, xmm0, xmm0 + L0004: vmovdqu [rcx], xmm0 + L0008: mov rax, rcx + L000b: ret C.M[[System.String, System.Private.CoreLib]]() ; Failed to find JIT output. This might appear more frequently than before due to a library update. diff --git a/source/Tests/Decompilation/TestCode/JitAsm/Generic.Nested.AttributeOnBoth.cs b/source/Tests/Decompilation/TestCode/JitAsm/Generic.Nested.AttributeOnBoth.cs index 356b200f..87366a52 100644 --- a/source/Tests/Decompilation/TestCode/JitAsm/Generic.Nested.AttributeOnBoth.cs +++ b/source/Tests/Decompilation/TestCode/JitAsm/Generic.Nested.AttributeOnBoth.cs @@ -18,15 +18,15 @@ static class N { L0000: xor eax, eax L0002: ret -C`1+N`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].M(...) +C`1+N`1[[System.Int32, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].M(...) ; Failed to find JIT output. This might appear more frequently than before due to a library update. ; Please monitor https://github.com/ashmind/SharpLab/issues/1334 for progress. -C`1+N`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].M(...) +C`1+N`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int32, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].M(...) ; Failed to find JIT output. This might appear more frequently than before due to a library update. ; Please monitor https://github.com/ashmind/SharpLab/issues/1334 for progress. -C`1+N`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].M(...) +C`1+N`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].M(...) ; Failed to find JIT output. This might appear more frequently than before due to a library update. ; Please monitor https://github.com/ashmind/SharpLab/issues/1334 for progress. diff --git a/source/Tests/Decompilation/TestCode/JitAsm/Generic.Nested.AttributeOnNested.cs b/source/Tests/Decompilation/TestCode/JitAsm/Generic.Nested.AttributeOnNested.cs index 51a6c974..5e3ffc31 100644 --- a/source/Tests/Decompilation/TestCode/JitAsm/Generic.Nested.AttributeOnNested.cs +++ b/source/Tests/Decompilation/TestCode/JitAsm/Generic.Nested.AttributeOnNested.cs @@ -16,7 +16,7 @@ static class N { L0000: xor eax, eax L0002: ret -C+N`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].get_M() +C+N`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].get_M() ; Failed to find JIT output. This might appear more frequently than before due to a library update. ; Please monitor https://github.com/ashmind/SharpLab/issues/1334 for progress. diff --git a/source/Tests/Decompilation/TestCode/JitAsm/Generic.Nested.AttributeOnTop.cs b/source/Tests/Decompilation/TestCode/JitAsm/Generic.Nested.AttributeOnTop.cs index 6f8baa82..91cc04df 100644 --- a/source/Tests/Decompilation/TestCode/JitAsm/Generic.Nested.AttributeOnTop.cs +++ b/source/Tests/Decompilation/TestCode/JitAsm/Generic.Nested.AttributeOnTop.cs @@ -16,7 +16,7 @@ static class N { L0000: xor eax, eax L0002: ret -C`1+N[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].M() +C`1+N[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].M() ; Failed to find JIT output. This might appear more frequently than before due to a library update. ; Please monitor https://github.com/ashmind/SharpLab/issues/1334 for progress. diff --git a/source/Tests/Decompilation/TestCode/JitAsm/Math.FusedMultiplyAdd.cs b/source/Tests/Decompilation/TestCode/JitAsm/Math.FusedMultiplyAdd.cs index badc7755..6949f166 100644 --- a/source/Tests/Decompilation/TestCode/JitAsm/Math.FusedMultiplyAdd.cs +++ b/source/Tests/Decompilation/TestCode/JitAsm/Math.FusedMultiplyAdd.cs @@ -11,8 +11,7 @@ public static double M(double a, double b, double c) { ; Core CLR on x64 C.M(Double, Double, Double) - L0000: vzeroupper - L0003: vfmadd213sd xmm0, xmm1, xmm2 - L0008: ret + L0000: vfmadd213sd xmm0, xmm1, xmm2 + L0005: ret */ \ No newline at end of file diff --git a/source/Tests/Decompilation/TestCode/JitAsm/Vectors.Avx2.cs b/source/Tests/Decompilation/TestCode/JitAsm/Vectors.Avx2.cs index e891ff07..c272e56b 100644 --- a/source/Tests/Decompilation/TestCode/JitAsm/Vectors.Avx2.cs +++ b/source/Tests/Decompilation/TestCode/JitAsm/Vectors.Avx2.cs @@ -18,13 +18,12 @@ public int M(Vector256 vector) { L0000: ret C.M(System.Runtime.Intrinsics.Vector256`1) - L0000: vzeroupper - L0003: vmovups ymm0, [rdx] - L0007: vmovaps ymm1, ymm0 - L000b: vextracti128 xmm0, ymm0, 1 - L0011: vpaddd xmm0, xmm1, xmm0 - L0015: vmovd eax, xmm0 - L0019: vzeroupper - L001c: ret + L0000: vmovups ymm0, [rdx] + L0004: vmovaps ymm1, ymm0 + L0008: vextracti128 xmm0, ymm0, 1 + L000e: vpaddd xmm0, xmm0, xmm1 + L0012: vmovd eax, xmm0 + L0016: vzeroupper + L0019: ret */ \ No newline at end of file diff --git a/source/Tests/Decompilation/TestCode/Nullable.Reference.Simple.IL.cs b/source/Tests/Decompilation/TestCode/Nullable.Reference.Simple.IL.cs index 9a2692a9..5db22849 100644 --- a/source/Tests/Decompilation/TestCode/Nullable.Reference.Simple.IL.cs +++ b/source/Tests/Decompilation/TestCode/Nullable.Reference.Simple.IL.cs @@ -21,7 +21,7 @@ 69 74 79 2e 50 65 72 6d 69 73 73 69 6f 6e 73 2e 53 65 63 75 72 69 74 79 50 65 72 6d 69 73 73 69 6f 6e 41 74 74 72 69 62 75 74 65 2c 20 53 79 73 74 65 6d 2e 52 75 6e 74 69 6d 65 2c 20 56 65 72 - 73 69 6f 6e 3d 38 2e 30 2e 30 2e 30 2c 20 43 75 + 73 69 6f 6e 3d 39 2e 30 2e 30 2e 30 2c 20 43 75 6c 74 75 72 65 3d 6e 65 75 74 72 61 6c 2c 20 50 75 62 6c 69 63 4b 65 79 54 6f 6b 65 6e 3d 62 30 33 66 35 66 37 66 31 31 64 35 30 61 33 61 15 01 diff --git a/source/Tests/Decompilation/TestCode/Simple.cs b/source/Tests/Decompilation/TestCode/Simple.cs index 575d15d0..dc4044d9 100644 --- a/source/Tests/Decompilation/TestCode/Simple.cs +++ b/source/Tests/Decompilation/TestCode/Simple.cs @@ -21,7 +21,7 @@ 69 74 79 2e 50 65 72 6d 69 73 73 69 6f 6e 73 2e 53 65 63 75 72 69 74 79 50 65 72 6d 69 73 73 69 6f 6e 41 74 74 72 69 62 75 74 65 2c 20 53 79 73 74 65 6d 2e 52 75 6e 74 69 6d 65 2c 20 56 65 72 - 73 69 6f 6e 3d 38 2e 30 2e 30 2e 30 2c 20 43 75 + 73 69 6f 6e 3d 39 2e 30 2e 30 2e 30 2c 20 43 75 6c 74 75 72 65 3d 6e 65 75 74 72 61 6c 2c 20 50 75 62 6c 69 63 4b 65 79 54 6f 6b 65 6e 3d 62 30 33 66 35 66 37 66 31 31 64 35 30 61 33 61 15 01 diff --git a/source/Tests/Tests.csproj b/source/Tests/Tests.csproj index 0ac2bc10..36f7f532 100644 --- a/source/Tests/Tests.csproj +++ b/source/Tests/Tests.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 SharpLab.Tests SharpLab.Tests false diff --git a/source/WebApp.Server/WebApp.Server.csproj b/source/WebApp.Server/WebApp.Server.csproj index 762af05c..3b3ff912 100644 --- a/source/WebApp.Server/WebApp.Server.csproj +++ b/source/WebApp.Server/WebApp.Server.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 SharpLab.WebApp.Server SharpLab.WebApp.Server true From 78a0b8094b205468ee9bbc45fc112fc8c4ecf2c3 Mon Sep 17 00:00:00 2001 From: Andrey Shchekin Date: Tue, 19 Nov 2024 00:53:04 +1300 Subject: [PATCH 05/11] [gh-1349] Add missing dependency on System.Drawing.Common --- source/Server/Server.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/source/Server/Server.csproj b/source/Server/Server.csproj index b2fac48a..b168549a 100644 --- a/source/Server/Server.csproj +++ b/source/Server/Server.csproj @@ -54,6 +54,7 @@ + From dee68c5b13d8ef751d7b5c73ee6d2970dc849c8e Mon Sep 17 00:00:00 2001 From: Andrey Shchekin Date: Tue, 19 Nov 2024 01:15:59 +1300 Subject: [PATCH 06/11] [gh-1349] Update branch build to .NET 9 --- #scripts/roslyn-branches/arm/template.json | 2 +- #scripts/roslyn-branches/flow/update/updateBranch.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/#scripts/roslyn-branches/arm/template.json b/#scripts/roslyn-branches/arm/template.json index 7e1b198a..e417c334 100644 --- a/#scripts/roslyn-branches/arm/template.json +++ b/#scripts/roslyn-branches/arm/template.json @@ -34,7 +34,7 @@ "serverFarmId": "[variables('serverfarms_main_id')]", "clientAffinityEnabled": false, "siteConfig": { - "netFrameworkVersion": "v8.0", + "netFrameworkVersion": "v9.0", "publishingUsername": "[concat('$', parameters('sites_name'))]", "use32BitWorkerProcess": true, "webSocketsEnabled": true, diff --git a/#scripts/roslyn-branches/flow/update/updateBranch.ts b/#scripts/roslyn-branches/flow/update/updateBranch.ts index 0e760031..a9cd3d4a 100644 --- a/#scripts/roslyn-branches/flow/update/updateBranch.ts +++ b/#scripts/roslyn-branches/flow/update/updateBranch.ts @@ -242,7 +242,7 @@ async function buildSharpLab(roslynPackagesRoot: string) { }); return { - publishRoot: `${branchSourceRoot}/Server/bin/Release/net8.0/publish` + publishRoot: `${branchSourceRoot}/Server/bin/Release/net9.0/publish` }; } From 7e14442b9e7f51c6408f5ede7499e8ee513f05fc Mon Sep 17 00:00:00 2001 From: Andrey Shchekin Date: Tue, 19 Nov 2024 01:27:07 +1300 Subject: [PATCH 07/11] [gh-1343] Exclude ILAsm.SourceGenerator from branch version updates --- #scripts/roslyn-branches/flow/update/updateBranch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/#scripts/roslyn-branches/flow/update/updateBranch.ts b/#scripts/roslyn-branches/flow/update/updateBranch.ts index a9cd3d4a..fd9eb362 100644 --- a/#scripts/roslyn-branches/flow/update/updateBranch.ts +++ b/#scripts/roslyn-branches/flow/update/updateBranch.ts @@ -177,7 +177,7 @@ async function buildSharpLab(roslynPackagesRoot: string) { // sigh: dotnet.exe should do this, but of course it does not const projectPath = projectPathUntyped as string; const projectName = path.basename(projectPath); - if (/mirrorsharp[^/\\]*[/\\]Internal\.Roslyn/i.test(projectPath)) { + if (/mirrorsharp[^/\\]*[/\\]Internal\.Roslyn|Mobius\.ILasm\.Tests\.SourceGenerator/i.test(projectPath)) { console.log(` ${projectName}`); console.log(' Skipping'); continue; From 6c6186d1e589e6025638234dd6b9c9a2536a7d4f Mon Sep 17 00:00:00 2001 From: Andrey Shchekin Date: Tue, 19 Nov 2024 01:41:17 +1300 Subject: [PATCH 08/11] [gh-1343] Disable NuGet Audit in branch build --- #scripts/roslyn-branches/flow/update/updateBranch.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/#scripts/roslyn-branches/flow/update/updateBranch.ts b/#scripts/roslyn-branches/flow/update/updateBranch.ts index fd9eb362..d90e296e 100644 --- a/#scripts/roslyn-branches/flow/update/updateBranch.ts +++ b/#scripts/roslyn-branches/flow/update/updateBranch.ts @@ -222,6 +222,7 @@ async function buildSharpLab(roslynPackagesRoot: string) { '--source', 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json', '--source', 'https://ci.appveyor.com/nuget/vanara-prerelease', '--source', roslynPackagesRoot, + '-p:NuGetAudit=false', '--verbosity', 'minimal' ], { stdout: 'inherit', From 157f55121a306b8f96505571e784b214bf465032 Mon Sep 17 00:00:00 2001 From: Andrey Shchekin Date: Tue, 19 Nov 2024 01:46:11 +1300 Subject: [PATCH 09/11] [gh-1349] Update branch build workflow to use .NET 9 --- .github/workflows/roslyn-branches.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/roslyn-branches.yml b/.github/workflows/roslyn-branches.yml index 39b79a8d..5c95d131 100644 --- a/.github/workflows/roslyn-branches.yml +++ b/.github/workflows/roslyn-branches.yml @@ -51,9 +51,9 @@ jobs: - uses: actions/setup-node@v3 with: node-version: '20.14.0' - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - run: npm ci - run: npm run update-branch -- ${{matrix.branch}} env: From 3b120653afd3fd97c4f2c8809fd1fb237f81e148 Mon Sep 17 00:00:00 2001 From: Andrey Shchekin Date: Tue, 19 Nov 2024 02:34:40 +1300 Subject: [PATCH 10/11] [gh-1343] Update to latest mirrorsharp --- source/#external/mirrorsharp-codemirror-6-preview | 2 +- source/NetFramework/Server/Web.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/#external/mirrorsharp-codemirror-6-preview b/source/#external/mirrorsharp-codemirror-6-preview index 192401e7..037ff9d8 160000 --- a/source/#external/mirrorsharp-codemirror-6-preview +++ b/source/#external/mirrorsharp-codemirror-6-preview @@ -1 +1 @@ -Subproject commit 192401e73d5c2ec608529823db7aa89911f44bf9 +Subproject commit 037ff9d85fed1b98d6b27fbe2bf42bba55c39be9 diff --git a/source/NetFramework/Server/Web.config b/source/NetFramework/Server/Web.config index c50bcc90..d18bd3cd 100644 --- a/source/NetFramework/Server/Web.config +++ b/source/NetFramework/Server/Web.config @@ -206,7 +206,7 @@ - + From a8902c9f13937e8a01f19aff8c3b9e00a20a2bd9 Mon Sep 17 00:00:00 2001 From: Andrey Shchekin Date: Tue, 19 Nov 2024 10:33:49 +1300 Subject: [PATCH 11/11] [gh-1351] Update Roslyn version in Default branch --- source/Server/Server.csproj | 8 ++++---- source/Tests/Decompilation/TestCode/Lambda.CallInArray.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/Server/Server.csproj b/source/Server/Server.csproj index b168549a..0286d467 100644 --- a/source/Server/Server.csproj +++ b/source/Server/Server.csproj @@ -38,10 +38,10 @@ - - - - + + + + diff --git a/source/Tests/Decompilation/TestCode/Lambda.CallInArray.cs b/source/Tests/Decompilation/TestCode/Lambda.CallInArray.cs index be84244c..dac584c9 100644 --- a/source/Tests/Decompilation/TestCode/Lambda.CallInArray.cs +++ b/source/Tests/Decompilation/TestCode/Lambda.CallInArray.cs @@ -55,7 +55,7 @@ public void M() internal sealed class { [StructLayout(LayoutKind.Explicit, Pack = 1, Size = 16)] - private struct __StaticArrayInitTypeSize=16 + internal struct __StaticArrayInitTypeSize=16 { }