From b32d781752203d0cf24564fe358cf29ffd99d063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lozier?= Date: Tue, 26 Nov 2024 20:38:40 -0500 Subject: [PATCH 1/4] Fix for missing trace event on first expression --- .../Debugging/DebugInfoRewriter.cs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Src/Microsoft.Dynamic/Debugging/DebugInfoRewriter.cs b/Src/Microsoft.Dynamic/Debugging/DebugInfoRewriter.cs index 838465e3..17496e1d 100644 --- a/Src/Microsoft.Dynamic/Debugging/DebugInfoRewriter.cs +++ b/Src/Microsoft.Dynamic/Debugging/DebugInfoRewriter.cs @@ -17,7 +17,7 @@ namespace Microsoft.Scripting.Debugging { using Ast = MSAst.Expression; using System.Threading; - + /// /// Used to rewrite expressions containing DebugInfoExpressions. /// @@ -355,17 +355,12 @@ protected override MSAst.Expression VisitDebugInfo(MSAst.DebugInfoExpression nod // Update the location cookie int locationCookie = _locationCookie++; if (!_transformToGenerator) { - MSAst.Expression tracebackCall = null; - if (locationCookie == 0) { - tracebackCall = Ast.Empty(); - } else { - tracebackCall = Ast.Call( - typeof(RuntimeOps).GetMethod(nameof(RuntimeOps.OnTraceEvent)), - _thread, - AstUtils.Constant(locationCookie), - Ast.Convert(Ast.Constant(null), typeof(Exception)) - ); - } + var tracebackCall = Ast.Call( + typeof(RuntimeOps).GetMethod(nameof(RuntimeOps.OnTraceEvent)), + _thread, + AstUtils.Constant(locationCookie), + Ast.Convert(Ast.Constant(null), typeof(Exception)) + ); transformedExpression = Ast.Block( Ast.Assign( From 1faa4e4990bcca7199fe1a7b2ed0467f7d97464d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lozier?= Date: Tue, 26 Nov 2024 20:42:43 -0500 Subject: [PATCH 2/4] Update build actions --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 656679d8..10be6a9f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,21 +13,21 @@ jobs: os: [windows-latest, ubuntu-latest, macos-latest-large] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup .NET Core 3.1 - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: '3.1.x' - name: Setup .NET 6.0 - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: '6.0.x' - name: Setup .NET 8.0 - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - name: Setup .NET 9.0 - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: '9.0.x' include-prerelease: true @@ -35,7 +35,7 @@ jobs: run: pwsh make.ps1 - name: Package run: pwsh make.ps1 package - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: packages path: Package/Release/Packages From ade965b828d8d20414eddea1eb0bc64845fd27a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lozier?= Date: Tue, 26 Nov 2024 20:45:55 -0500 Subject: [PATCH 3/4] Fix packaging --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index a9c79692..eebef0c4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -94,7 +94,7 @@ - false + true portable true false From 0dbb3e990527228898288576110353701273f96a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lozier?= Date: Tue, 26 Nov 2024 20:49:54 -0500 Subject: [PATCH 4/4] Fix packaging --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 10be6a9f..a1c1fdfc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,7 @@ jobs: run: pwsh make.ps1 package - uses: actions/upload-artifact@v4 with: - name: packages + name: packages-${{ matrix.os }} path: Package/Release/Packages - name: Test (net462) run: ./make.ps1 -frameworks net462 test-all