diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 791af3c670..be8848bbf4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,9 +1,9 @@ # Contributing -We love receiving PRs from the community with features and fixed. +We love receiving PRs from the community with features and fixed. For big feature it's advised to raise an issue to discuss it first. -## TLDR: +## TLDR * Install the .NET SDKs * To quickly get up and running, you can just run `dotnet build` @@ -68,7 +68,7 @@ Note that the MSBuild version should always be `17.0` but will change paths base We'd love for users to update the SDK everytime and as soon as we make a new release. But in reality most users rarely update the SDK. To help users see value in updating the SDK, we maintain a changelog file with entries split between two headings: -1. `### Features` +1. `### Features` 2. `### Fixes` We add the heading in the first PR that's adding either a feature or fixes in the current release. @@ -86,3 +86,15 @@ Below that, you'll add the heading 3 mentioned above. For example, if you're add ``` There's a GitHub action check to verify if an entry was added. If the entry isn't a user-facing change, you can skip the verification with `#skip-changelog` written to the PR description. The bot writes a comment in the PR with a suggestion entry to the changelog based on the PR title. + +## Verify tests + +Some tests use [Verify](https://github.com/VerifyTests/Verify) to check returned objects against snapshots that are part of the repo. +In case you're making code changes that produce many (intended) changes in those snapshots, you can use [accept-verifier-changes.ps1](./scripts/accept-verifier-changes.ps1) like this: + +```shell-script +dotnet test +pwsh ./scripts/accept-verifier-changes.ps1 +``` + +You may need to run this multiple times because `dotnet test` stops after a certain number of failures. \ No newline at end of file diff --git a/scripts/update-test-apks.ps1 b/scripts/update-test-apks.ps1 index 9bb018911b..83d404e2d8 100644 --- a/scripts/update-test-apks.ps1 +++ b/scripts/update-test-apks.ps1 @@ -9,7 +9,6 @@ $apkPrefix = "$repoRoot/test/Sentry.Tests/Internals/android" function BuildAndroidSample([bool] $UseAssemblyStore, [bool] $UseAssemblyCompression) { $sampleDir = "$repoRoot/samples/Sentry.Samples.Android" - $framework = 'net6.0-android' $outputApk = "$apkPrefix-Store=$UseAssemblyStore-Compressed=$UseAssemblyCompression.apk" if ($IfNotExist -and (Test-Path $outputApk)) @@ -24,7 +23,7 @@ function BuildAndroidSample([bool] $UseAssemblyStore, [bool] $UseAssemblyCompres # Need to do a clean build otherwise some DLLs would end up being compressed even if it's disabled on this run. git clean -ffxd . | Out-Host - dotnet build --configuration Release --framework $framework ` + dotnet build --configuration Release ` --property:AndroidUseAssemblyStore=$UseAssemblyStore ` --property:AndroidEnableAssemblyCompression=$UseAssemblyCompression ` | Out-Host @@ -38,7 +37,7 @@ function BuildAndroidSample([bool] $UseAssemblyStore, [bool] $UseAssemblyCompres Pop-Location } - Move-Item -Verbose "$sampleDir/bin/Release/$framework/io.sentry.dotnet.samples.android-Signed.apk" $outputApk + Move-Item -Verbose "$sampleDir/bin/Release/*/io.sentry.dotnet.samples.android-Signed.apk" $outputApk } if (!$IfNotExist) diff --git a/src/Sentry/Extensibility/SentryStackTraceFactory.cs b/src/Sentry/Extensibility/SentryStackTraceFactory.cs index 6b8f541830..6255e63661 100644 --- a/src/Sentry/Extensibility/SentryStackTraceFactory.cs +++ b/src/Sentry/Extensibility/SentryStackTraceFactory.cs @@ -32,7 +32,7 @@ public class SentryStackTraceFactory : ISentryStackTraceFactory var stackTrace = exception is null ? new StackTrace(true) : new StackTrace(exception, true); var result = DebugStackTrace.Create(_options, stackTrace, isCurrentStackTrace); - _options.LogDebug($"Created {typeof(DebugStackTrace).Name} with {0} frames.", result.Frames.Count); + _options.LogDebug("Created {0} with {1} frames.", typeof(DebugStackTrace).Name, result.Frames.Count); return result.Frames.Count != 0 ? result : null; } } diff --git a/src/Sentry/Internal/DebugStackTrace.cs b/src/Sentry/Internal/DebugStackTrace.cs index 805d4c033f..0cbde2d793 100644 --- a/src/Sentry/Internal/DebugStackTrace.cs +++ b/src/Sentry/Internal/DebugStackTrace.cs @@ -485,7 +485,7 @@ private void InitializeAssemblyReader() // well, we are out of luck :-( if (debugId == null) { - _options.LogDebug("Skipping DebugImage for module '{0}' because DebugId couldn't be determined", module.Name); + _options.LogWarning("Skipping DebugImage for module '{0}' because DebugId couldn't be determined", module.Name); _debugImageIndexByModule.Add(id, DebugImageMissing); // don't try to resolve again return null; } diff --git a/src/Sentry/SentryStackTrace.cs b/src/Sentry/SentryStackTrace.cs index 2987f74131..0951a08e7b 100644 --- a/src/Sentry/SentryStackTrace.cs +++ b/src/Sentry/SentryStackTrace.cs @@ -27,9 +27,6 @@ public IList Frames set => InternalFrames = value; } - // This class is sealed externally, but can be extended internally. - internal SentryStackTrace() { } - /// public void WriteTo(Utf8JsonWriter writer, IDiagnosticLogger? logger) { diff --git a/test/Sentry.Tests/Sentry.Tests.csproj b/test/Sentry.Tests/Sentry.Tests.csproj index 9d3cca03ae..4c75fec998 100644 --- a/test/Sentry.Tests/Sentry.Tests.csproj +++ b/test/Sentry.Tests/Sentry.Tests.csproj @@ -17,6 +17,6 @@ - +