Skip to content

fix: remove the dependency on protobuf-lite for tombstones#5157

Open
supervacuus wants to merge 3 commits intomainfrom
fix/remove_protobuf-lite_dep_tombstone
Open

fix: remove the dependency on protobuf-lite for tombstones#5157
supervacuus wants to merge 3 commits intomainfrom
fix/remove_protobuf-lite_dep_tombstone

Conversation

@supervacuus
Copy link
Collaborator

@supervacuus supervacuus commented Mar 5, 2026

📜 Description

As the title says, it replaces the dependency on a huge generic protobuf decoder with a tiny tombstone-specific package called epitaph (GH, central). The dependency is MIT licensed and can be incorporated into the Sentry ecosystem in whichever ways make sense down the road.

💡 Motivation and Context

Part of the wrap-up milestone in https://linear.app/getsentry/project/tombstone-support-android-0024cb6e3ffd

https://linear.app/getsentry/issue/ANDROID-267/switch-to-dependency-free-protobuf-runtime

💚 How did you test it?

Tested the same way as the dependency it replaces. The library, though, has a battery of test cases for encoding errors and edge cases.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

  • (screenshot) Add dontwarn replay rules to sentry-android-core by romtsn in #5153
  • Remove the dependency on protobuf-lite for tombstones by supervacuus in #5157

🤖 This preview updates automatically when you update the PR.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: NPE in close() when tombstoneStream is null
    • Added a null guard in TombstoneParser.close() so try-with-resources no longer throws when constructed without an InputStream.

Create PR

Or push these changes by commenting:

@cursor push 9737b16a1a
Preview (9737b16a1a)
diff --git a/sentry-android-core/src/main/java/io/sentry/android/core/internal/tombstone/TombstoneParser.java b/sentry-android-core/src/main/java/io/sentry/android/core/internal/tombstone/TombstoneParser.java
--- a/sentry-android-core/src/main/java/io/sentry/android/core/internal/tombstone/TombstoneParser.java
+++ b/sentry-android-core/src/main/java/io/sentry/android/core/internal/tombstone/TombstoneParser.java
@@ -349,6 +349,8 @@
 
   @Override
   public void close() throws IOException {
-    tombstoneStream.close();
+    if (tombstoneStream != null) {
+      tombstoneStream.close();
+    }
   }
 }
This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant