diff --git a/modules/sentry-cocoa.properties b/modules/sentry-cocoa.properties index bc8723fa..c5debd14 100644 --- a/modules/sentry-cocoa.properties +++ b/modules/sentry-cocoa.properties @@ -1,2 +1,2 @@ -version=8.57.2 +version=9.0.0-alpha.0 repo=https://github.com/getsentry/sentry-cocoa diff --git a/project/test/suites/test_event_json.gd b/project/test/suites/test_event_json.gd index 067e6d48..255504d8 100644 --- a/project/test/suites/test_event_json.gd +++ b/project/test/suites/test_event_json.gd @@ -255,16 +255,10 @@ func test_event_json_sdk_interface() -> void: .must_end_with(".godot") \ .verify() + var version_regex := RegEx.create_from_string(r"^\d+\.\d+\.\d+(?:-[a-zA-Z]+\.\d+)?$") assert_json(json).describe("Has SDK version with semantic versioning format") \ .at("/sdk/version") \ .is_string() \ .is_not_empty() \ - .must_satisfy("valid version string", func(candidate) -> bool: - if not candidate is String: - return false - for part in candidate.split("."): - if not part.is_valid_int() or part.to_int() < 0: - return false - return true - ) \ + .must_match_regex(version_regex) \ .verify() diff --git a/src/sentry/cocoa/cocoa_includes.h b/src/sentry/cocoa/cocoa_includes.h index 8a36bb9e..17e61009 100644 --- a/src/sentry/cocoa/cocoa_includes.h +++ b/src/sentry/cocoa/cocoa_includes.h @@ -8,6 +8,7 @@ #import #endif #import +#import namespace objc { diff --git a/src/sentry/cocoa/cocoa_log.mm b/src/sentry/cocoa/cocoa_log.mm index 8394274c..174f316b 100644 --- a/src/sentry/cocoa/cocoa_log.mm +++ b/src/sentry/cocoa/cocoa_log.mm @@ -4,54 +4,54 @@ namespace { -SentryStructuredLogAttribute *_as_attribute(const Variant &p_variant) { +SentryLogAttribute *_as_attribute(const Variant &p_variant) { switch (p_variant.get_type()) { case Variant::BOOL: - return [[SentryStructuredLogAttribute alloc] initWithBoolean:(bool)p_variant]; + return [[SentryLogAttribute alloc] initWithBoolean:(bool)p_variant]; case Variant::INT: - return [[SentryStructuredLogAttribute alloc] initWithInteger:(int64_t)p_variant]; + return [[SentryLogAttribute alloc] initWithInteger:(int64_t)p_variant]; case Variant::FLOAT: - return [[SentryStructuredLogAttribute alloc] initWithDouble:(double)p_variant]; + return [[SentryLogAttribute alloc] initWithDouble:(double)p_variant]; default: - return [[SentryStructuredLogAttribute alloc] initWithString:sentry::cocoa::string_to_objc(p_variant)]; + return [[SentryLogAttribute alloc] initWithString:sentry::cocoa::string_to_objc(p_variant)]; } } -sentry::LogLevel _log_level_from_objc(SentryStructuredLogLevel p_level) { +sentry::LogLevel _log_level_from_objc(SentryLogLevel p_level) { switch (p_level) { - case SentryStructuredLogLevelTrace: + case SentryLogLevelTrace: return sentry::LOG_LEVEL_TRACE; - case SentryStructuredLogLevelDebug: + case SentryLogLevelDebug: return sentry::LOG_LEVEL_DEBUG; - case SentryStructuredLogLevelInfo: + case SentryLogLevelInfo: return sentry::LOG_LEVEL_INFO; - case SentryStructuredLogLevelWarn: + case SentryLogLevelWarn: return sentry::LOG_LEVEL_WARN; - case SentryStructuredLogLevelError: + case SentryLogLevelError: return sentry::LOG_LEVEL_ERROR; - case SentryStructuredLogLevelFatal: + case SentryLogLevelFatal: return sentry::LOG_LEVEL_FATAL; default: return sentry::LOG_LEVEL_INFO; } } -SentryStructuredLogLevel _log_level_to_objc(sentry::LogLevel p_level) { +SentryLogLevel _log_level_to_objc(sentry::LogLevel p_level) { switch (p_level) { case sentry::LOG_LEVEL_TRACE: - return SentryStructuredLogLevelTrace; + return SentryLogLevelTrace; case sentry::LOG_LEVEL_DEBUG: - return SentryStructuredLogLevelDebug; + return SentryLogLevelDebug; case sentry::LOG_LEVEL_INFO: - return SentryStructuredLogLevelInfo; + return SentryLogLevelInfo; case sentry::LOG_LEVEL_WARN: - return SentryStructuredLogLevelWarn; + return SentryLogLevelWarn; case sentry::LOG_LEVEL_ERROR: - return SentryStructuredLogLevelError; + return SentryLogLevelError; case sentry::LOG_LEVEL_FATAL: - return SentryStructuredLogLevelFatal; + return SentryLogLevelFatal; default: - return SentryStructuredLogLevelInfo; + return SentryLogLevelInfo; } } @@ -76,7 +76,7 @@ SentryStructuredLogLevel _log_level_to_objc(sentry::LogLevel p_level) { } Variant CocoaLog::get_attribute(const String &p_name) const { - SentryStructuredLogAttribute *attribute = cocoa_log.attributes[string_to_objc(p_name)]; + SentryLogAttribute *attribute = cocoa_log.attributes[string_to_objc(p_name)]; if (!attribute) { return Variant(); } diff --git a/src/sentry/cocoa/cocoa_sdk.mm b/src/sentry/cocoa/cocoa_sdk.mm index dc800284..01071896 100644 --- a/src/sentry/cocoa/cocoa_sdk.mm +++ b/src/sentry/cocoa/cocoa_sdk.mm @@ -261,7 +261,7 @@ // NOTE: This only works for captureMessage(), unfortunately. options.attachStacktrace = false; - options.experimental.enableLogs = SentryOptions::get_singleton()->get_experimental()->get_enable_logs(); + options.enableLogs = SentryOptions::get_singleton()->get_experimental()->get_enable_logs(); options.initialScope = ^(objc::SentryScope *scope) { // Add global attachments