Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
5717371
net8 sdk
bruno-garcia Sep 15, 2023
9de053f
net8 in ci
bruno-garcia Sep 15, 2023
9575f68
new import needed
bruno-garcia Sep 15, 2023
00590b5
hack to build on mac
bruno-garcia Sep 15, 2023
de035bc
Merge branch 'feat/4.0.0' into feat/net8-2
bruno-garcia Sep 18, 2023
ad557a0
Merge branch 'feat/4.0.0' into feat/net8-2
bruno-garcia Sep 18, 2023
eaef79f
net7 min
bruno-garcia Sep 19, 2023
13c3e7c
update cli integration test
vaind Sep 25, 2023
291ff21
fix cli integration test paths
vaind Sep 25, 2023
c1320df
Merge remote-tracking branch 'origin/feat/4.0.0' into feat/net8-2
vaind Oct 4, 2023
a85d7f8
add SelfContained=true (previously implied by RuntimeIdentifier)
vaind Oct 4, 2023
b8a3082
Merge remote-tracking branch 'origin' into feat/net8-2
bruno-garcia Oct 6, 2023
33a2e8b
Removed `Scope.Platform` as it would never be applied. (#2695)
jamescrosswell Oct 5, 2023
e4f2a07
feat: Native AOT frame info (#2701)
vaind Oct 5, 2023
4cb767d
fix build on mac m1 (#2702)
vaind Oct 5, 2023
67c0bd1
Upgraded to `NLog 5` (#2697)
bitsandfoxes Oct 6, 2023
7e0e916
fix: CaptureFailedRequests xml docs
bruno-garcia Oct 6, 2023
bebb2f4
Fallback to `AssemblyVersion` if `InformalVersion` is `NullOrEmpty` (…
bitsandfoxes Oct 10, 2023
e75bcfa
Reenabled API Verify tests (#2716)
bitsandfoxes Oct 11, 2023
4ed996a
Reordered parameters to TransactionContext and SpanContext constructo…
jamescrosswell Oct 11, 2023
e11f3fb
Change signature order in `DiagnosticLogger` for exceptions (#2715)
bitsandfoxes Oct 12, 2023
7dac060
build(deps): bump styfle/cancel-workflow-action from 0.11.0 to 0.12.0…
dependabot[bot] Oct 9, 2023
cc21277
Fix: Scope not being applied to OpenTelemetry spans in ASP.NET Core (…
jamescrosswell Oct 9, 2023
2fa8a6b
Delete SentryAzureFunctions.slnf (#2708)
bruno-garcia Oct 10, 2023
6b74c2e
Apply Scope to exceptions captured via Activity.RecordException (#2712)
jamescrosswell Oct 10, 2023
e839285
release: 3.40.0
getsentry-bot Oct 10, 2023
a4f681e
Update .craft.yml (#2615)
jamescrosswell Oct 11, 2023
008dfca
Make ISentryUserFactory public (#2719)
jamescrosswell Oct 12, 2023
c8fa788
chore: update scripts/update-java.ps1 to 6.31.0 (#2723)
github-actions[bot] Oct 13, 2023
6b484a5
release: 3.40.1
getsentry-bot Oct 12, 2023
8e8a159
chore(deps): update Cocoa SDK to v8.13.1 (#2722)
github-actions[bot] Oct 13, 2023
1182b90
Merge branch 'feat/4.0.0' into feat/net8-2
vaind Oct 14, 2023
1eb587c
Merge branch 'feat/4.0.0' into feat/net8-2
vaind Oct 14, 2023
dc1f34e
temporarily drop caching
bitsandfoxes Oct 16, 2023
e685d3f
loggig
bitsandfoxes Oct 16, 2023
51d7b58
pinning the version
bitsandfoxes Oct 16, 2023
fffe04d
restore and update
bitsandfoxes Oct 16, 2023
f58540b
no rollback
bitsandfoxes Oct 16, 2023
db71be6
no more tizen
bitsandfoxes Oct 16, 2023
c1ac3c4
fix
bitsandfoxes Oct 16, 2023
67be026
restore and updte #2
bitsandfoxes Oct 16, 2023
cb50e2f
suddenly I need iOS?
bitsandfoxes Oct 16, 2023
1ed4aa1
restore and update #3
bitsandfoxes Oct 16, 2023
df4d5c9
added .NET 6 for tests
bitsandfoxes Oct 16, 2023
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
42 changes: 19 additions & 23 deletions .github/actions/environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,15 @@ runs:
distribution: 'temurin'
java-version: '11'

# .NET 3.1 has been removed from all OS due to EOL
# https://github.com/actions/runner-images/issues/7667
- name: Install .NET 3.1 SDK
- name: Install .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.x

- name: Install .NET 7 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.203 # switch back to 7.x.x after resolving the below Tizen issue.

# Workaround for Tizen issue
# See https://github.com/dotnet/sdk/issues/33192
- name: Pin to .NET SDK 7.0.203
run: dotnet new globaljson --sdk-version 7.0.203 --force
shell: bash

dotnet-version: |
3.1.x
6.0.x
7.0.x
8.0.100-rc.2.23502.2

- name: Dependency Caching
uses: actions/cache@v3
# Cache is too slow on Windows to be useful. See https://github.com/actions/cache/issues/752
Expand All @@ -51,14 +42,19 @@ runs:
run: >
dotnet workload install \
maui-android \
${{ runner.os == 'macOS' && 'maui-ios maui-maccatalyst maui-windows maui-tizen' || '' }} \
${{ runner.os == 'macOS' && 'maui-ios maui-maccatalyst maui-windows' || '' }} \
${{ runner.os == 'Windows' && 'maui-windows' || '' }} \
--temp-dir "${{ runner.temp }}" --from-rollback-file rollback.json

# We build Sentry.Maui for every supported MAUI target so we can access platform-specific features.
# That includes Tizen. We don't need the entire Tizen SDK, but we do need the base Tizen workload.
# Though we could install it on all runners, we really only need it when building and packing for NuGet, which we do on macOS only.
- name: Install Tizen Workload
if: runner.os == 'macOS'
- name: Restore workloads
shell: bash
run: dotnet workload restore

- name: Update workloads
shell: bash
run: dotnet workload update
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we include an explanation for this? We just ran dotnet workload restore right? Won't doing dotnet workload update give us non-deterministic builds (we don't know what version of the workloads is going to be used for the build)?


- name: Log what we have in the workloads
shell: bash
run: "curl -sSL https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.sh | sudo bash"
run: dotnet workload update

2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-13]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinned? Maybe put a comment in there explaining why so we know in the future whether this is still required or not.


steps:
- name: Cancel Previous Runs
Expand Down
1 change: 1 addition & 0 deletions GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
global using System.IO.MemoryMappedFiles;
global using System.Net;
global using System.Net.Http.Headers;
global using System.Net.Http;
global using System.Net.NetworkInformation;
global using System.Net.Sockets;
global using System.Reflection;
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"version": "7.0.100",
"version": "8.0.*",
"rollForward": "latestMinor",
"allowPrerelease": false
"allowPrerelease": true
}
}
2 changes: 1 addition & 1 deletion src/Sentry.Maui/Sentry.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Target net6.0 so we can run unit tests on platform-neutral code.
Target other platforms so we can include platform-specific code, and bundle native SDKs.
-->
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net7.0</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_ANDROID)' == ''">$(TargetFrameworks);net7.0-android</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_IOS)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-ios</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-maccatalyst</TargetFrameworks>
Expand Down
2 changes: 1 addition & 1 deletion test/Sentry.Maui.Tests/Sentry.Maui.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net7.0</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_ANDROID)' == ''">$(TargetFrameworks);net7.0-android</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_IOS)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-ios</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-maccatalyst</TargetFrameworks>
Expand Down
61 changes: 52 additions & 9 deletions test/sentry-cli-integration.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,49 @@ if (!(Test-Path env:CI ))
Import-Module $PSScriptRoot/../../github-workflows/sentry-cli/integration-test/action.psm1 -Force
}

function Should-AnyElementMatch ($ActualValue, [string]$ExpectedValue, [switch] $Negate, [string] $Because)
{
<#
.SYNOPSIS
Asserts whether any item in the collection matches the expected value
.EXAMPLE
'foo','bar','foobar' | Should -AnyElementMatch 'oob'

This should pass because 'oob' is a substring of 'foobar'.
#>

$filtered = $ActualValue | Where-Object { $_ -match $ExpectedValue }
[bool] $succeeded = @($filtered).Count -gt 0
if ($Negate) { $succeeded = -not $succeeded }

if (-not $succeeded)
{
if ($Negate)
{
$failureMessage = "Expected string '$ExpectedValue' to match no elements in collection @($($ActualValue -join ', '))$(if($Because) { " because $Because"})."
}
else
{
$failureMessage = "Expected string '$ExpectedValue' to match any element in collection @($($ActualValue -join ', '))$(if($Because) { " because $Because"})."
}
}

return [pscustomobject]@{
Succeeded = $succeeded
FailureMessage = $failureMessage
}
}

BeforeDiscovery {
Add-ShouldOperator -Name AnyElementMatch `
-InternalName 'Should-AnyElementMatch' `
-Test ${function:Should-AnyElementMatch} `
-SupportsArrayInput
}

BeforeAll {
$env:SENTRY_LOG_LEVEL = 'debug';

function DotnetBuild([string]$Sample, [bool]$Symbols, [bool]$Sources, [string]$TargetFramework = '')
{
$rootDir = "$(Get-Item $PSScriptRoot/../../)"
Expand Down Expand Up @@ -58,8 +100,8 @@ Describe 'CLI-integration' {
$result.HasErrors() | Should -BeFalse
$result.UploadedDebugFiles() | Sort-Object -Unique | Should -Be @(
'Sentry.pdb',
'Sentry.Samples.Console.Basic.pdb',
'Sentry.Samples.Console.Basic.src.zip')
'Sentry.Samples.Console.Basic.pdb')
$result.ScriptOutput | Should -AnyElementMatch 'Skipping embedded source file: .*/samples/Sentry.Samples.Console.Basic/Program.cs'
}

It "uploads symbols for a console app build" {
Expand All @@ -75,8 +117,8 @@ Describe 'CLI-integration' {
$result = DotnetBuild 'Sentry.Samples.Console.Basic' $False $True
$result.ScriptOutput | Should -Contain 'Build succeeded.'
$result.HasErrors() | Should -BeFalse
$result.UploadedDebugFiles() | Sort-Object -Unique | Should -Be @(
'Sentry.Samples.Console.Basic.src.zip')
$result.ScriptOutput | Should -AnyElementMatch 'Skipping embedded source file: .*/samples/Sentry.Samples.Console.Basic/Program.cs'
$result.UploadedDebugFiles() | Should -BeNullOrEmpty
}

It "uploads nothing for a console app build when disabled" {
Expand All @@ -96,12 +138,13 @@ Describe 'CLI-integration' {
'Sentry.Extensions.Logging.pdb',
'Sentry.Maui.pdb',
'Sentry.pdb',
'Sentry.Samples.Maui.pdb',
'Sentry.Samples.Maui.src.zip'
'Sentry.Samples.Maui.pdb'
)
$result.ScriptOutput | Should -AnyElementMatch 'Skipping embedded source file: .*/samples/Sentry.Samples.Maui/MauiProgram.cs'
}

if (![RuntimeInformation]::IsOSPlatform([OSPlatform]::OSX)) {
if (![RuntimeInformation]::IsOSPlatform([OSPlatform]::OSX))
{
# Remaining tests run on macOS only
return
}
Expand All @@ -127,8 +170,8 @@ Describe 'CLI-integration' {
'Sentry.Maui.pdb',
'Sentry.pdb',
'Sentry.Samples.Maui',
'Sentry.Samples.Maui.pdb',
'Sentry.Samples.Maui.src.zip'
'Sentry.Samples.Maui.pdb'
)
$result.ScriptOutput | Should -AnyElementMatch 'Skipping embedded source file: .*/samples/Sentry.Samples.Maui/MauiProgram.cs'
}
}