Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use obsolete attribute to display warning #213

Merged
merged 1 commit into from
May 9, 2024
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
8 changes: 0 additions & 8 deletions Runtime/Attributes.meta

This file was deleted.

9 changes: 0 additions & 9 deletions Runtime/Attributes/NotSupportedAttribute.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Runtime/Attributes/NotSupportedAttribute.cs.meta

This file was deleted.

15 changes: 7 additions & 8 deletions Runtime/Model/BacktraceConfiguration.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Backtrace.Unity.Attributes;
using Backtrace.Unity.Common;
using Backtrace.Unity.Common;
using Backtrace.Unity.Model.Breadcrumbs;
using Backtrace.Unity.Services;
using Backtrace.Unity.Types;
Expand Down Expand Up @@ -140,7 +139,7 @@ public class BacktraceConfiguration : ScriptableObject
/// <summary>
/// Capture native crashes.
/// </summary>
[NotSupported]
[Obsolete("Not supported")]
#endif
public bool CaptureNativeCrashes = true;

Expand All @@ -150,7 +149,7 @@ public class BacktraceConfiguration : ScriptableObject
#if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE_WIN
[Tooltip("Capture ANR events - Application not responding")]
#else
[NotSupported]
[Obsolete("Not supported")]
#endif
public bool HandleANR = true;

Expand All @@ -161,7 +160,7 @@ public class BacktraceConfiguration : ScriptableObject
#if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE_WIN
[Tooltip("ANR watchdog timeout")]
#else
[NotSupported]
[Obsolete("Not supported")]
#endif
public int AnrWatchdogTimeout = DefaultAnrWatchdogTimeout;

Expand All @@ -171,7 +170,7 @@ public class BacktraceConfiguration : ScriptableObject
#if UNITY_ANDROID || UNITY_IOS
[Tooltip("Send Out of Memory exceptions to Backtrace")]
#else
[NotSupported]
[Obsolete("Not supported")]
#endif
public bool OomReports = false;

Expand All @@ -181,7 +180,7 @@ public class BacktraceConfiguration : ScriptableObject
#if UNITY_2019_2_OR_NEWER && (UNITY_ANDROID || UNITY_IOS)
[Tooltip("Enable client-side unwinding.")]
#else
[NotSupported]
[Obsolete("Not supported")]
#endif
public bool ClientSideUnwinding = false;

Expand All @@ -192,7 +191,7 @@ public class BacktraceConfiguration : ScriptableObject
#if UNITY_2019_2_OR_NEWER && UNITY_ANDROID
[Tooltip("Symbols upload token required to upload symbols to Backtrace")]
#else
[NotSupported]
[Obsolete("Not supported")]
#endif
public string SymbolsUploadToken = string.Empty;

Expand Down
3 changes: 2 additions & 1 deletion Tests/Runtime/BacktraceClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ public void Setup()
}

[UnityTest]
[Obsolete]
public IEnumerator TestClientConfigurationOptions_ValidConfigurationWithAllOptions_AllowsToUseNotSupportedOptions()
{
var clientConfiguration = GetValidClientConfiguration();
clientConfiguration.OomReports = false;
clientConfiguration.HandleANR = false;
clientConfiguration.AnrWatchdogTimeout = 0;
clientConfiguration.CaptureNativeCrashes = false;
clientConfiguration.OomReports = false;
clientConfiguration.ClientSideUnwinding = false;
clientConfiguration.SymbolsUploadToken = string.Empty;
BacktraceClient.Configuration = clientConfiguration;
Expand Down
Loading