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

[NDK] Add loadNativeLibraries method to allow pre-loading .so files #1082

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

markushi
Copy link
Member

sentry-java 7.x loads the .so libraries using a background thread, see getsentry/sentry-java#3670

Instead of porting this behaviour 1:1 to sentry-native, I'm proposing a new .loadNativeLibraries() method, allowing you to pre-load the libraries if necessary. It's up to the consumer, like sentry-java 8.x to use this method, and e.g. call it on a background thread.

This is a change in behaviour, as the .so files no longer get loaded during class init.

Copy link

github-actions bot commented Nov 19, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against b5d3b83

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.34%. Comparing base (d8230a8) to head (b5d3b83).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1082      +/-   ##
==========================================
- Coverage   82.40%   82.34%   -0.07%     
==========================================
  Files          53       53              
  Lines        7752     7752              
  Branches     1216     1216              
==========================================
- Hits         6388     6383       -5     
- Misses       1252     1257       +5     
  Partials      112      112              
---- 🚨 Try these New Features:

@markushi markushi marked this pull request as ready for review November 19, 2024 14:32
@markushi markushi requested a review from supervacuus November 19, 2024 14:32
Copy link
Collaborator

@supervacuus supervacuus left a comment

Choose a reason for hiding this comment

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

We already talked about how little love I have for static init blocks, but for a library, it makes even less sense since different clients have different needs. LGTM.

@markushi markushi merged commit 2ad5f0d into master Nov 19, 2024
25 checks passed
@markushi markushi deleted the feat/ndk-load-lib-api branch November 19, 2024 15:38
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.

2 participants