From bc33828e5a65194e7893153eebed657a2f1f23bf Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 2 Oct 2026 12:34:51 +0200 Subject: [PATCH] chore(core): Resolve non-actionable TODOs Three TODOs that describe work that won't happen as written, verified and resolved: - sentryMetroSerializer.ts: drop the "deprecate then rename to createSentryDebugIdSerializer" TODO. It's a cosmetic rename of a public (`@sentry/react-native/metro`) export that is now used internally by `withSentryConfig`; the rename would need a full deprecation/breaking cycle for no functional gain. - transports/native.ts: reframe the TODO as a limitation note. The native SDK owns the transport and `captureEnvelope` returns only a boolean, so there is no HTTP response to surface to JS. - RNSentryNativeLogsForwarder.m: reframe the TODO as a limitation note. cocoa exposes no public getter for the current SentrySDKLog output (the only getter is test-only, `#if SENTRY_TEST`), so the previous block can't be restored; resetting to the default NSLog behavior is the only option. Comment-only; no behavior change. Co-Authored-By: Claude Opus 4.8 --- packages/core/ios/RNSentryNativeLogsForwarder.m | 5 ++--- packages/core/src/js/tools/sentryMetroSerializer.ts | 1 - packages/core/src/js/transports/native.ts | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/core/ios/RNSentryNativeLogsForwarder.m b/packages/core/ios/RNSentryNativeLogsForwarder.m index 1125796882..e7e3c630c1 100644 --- a/packages/core/ios/RNSentryNativeLogsForwarder.m +++ b/packages/core/ios/RNSentryNativeLogsForwarder.m @@ -47,9 +47,8 @@ - (void)stopForwarding { self.eventEmitter = nil; - // TODO: Ideally we should save the previous output block in configureWithEventEmitter: - // and restore it here instead of hardcoding NSLog. - // Reset to default print behavior + // cocoa exposes no public getter for the current SentrySDKLog output, so we reset to the + // default NSLog print behavior rather than restoring the previous block. [SentrySDKLog setOutput:^(NSString *_Nonnull message) { NSLog(@"%@", message); }]; } diff --git a/packages/core/src/js/tools/sentryMetroSerializer.ts b/packages/core/src/js/tools/sentryMetroSerializer.ts index 1c0069ae9b..70e3949815 100644 --- a/packages/core/src/js/tools/sentryMetroSerializer.ts +++ b/packages/core/src/js/tools/sentryMetroSerializer.ts @@ -47,7 +47,6 @@ export function unstableBeforeAssetSerializationDebugIdPlugin({ return prependModule(premodules, debugIdModule); } -// TODO: deprecate this and afterwards rename to createSentryDebugIdSerializer /** * Creates a Metro serializer that adds Debug ID module to the plain bundle. * The Debug ID module is a virtual module that provides a debug ID in runtime. diff --git a/packages/core/src/js/transports/native.ts b/packages/core/src/js/transports/native.ts index e2c8d28b70..b7aef82a6d 100644 --- a/packages/core/src/js/transports/native.ts +++ b/packages/core/src/js/transports/native.ts @@ -33,7 +33,8 @@ export class NativeTransport implements Transport { * @param envelope Envelope that should be sent to Sentry. */ public send(envelope: Envelope): PromiseLike { - // TODO: We currently can't retrieve the response information from native + // The native SDK owns the transport and doesn't expose the HTTP response, so there's + // no response info to return. return this._buffer.add(() => NATIVE.sendEnvelope(envelope)).then(() => ({})); }