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
Add ThreadSafe annotation to com.bugsnag.android, remove infer dependency #370
Conversation
infer.sh
Outdated
@@ -1,3 +1,5 @@ | |||
#!/usr/bin/env bash | |||
./gradlew clean && infer --disable-issue-type "NULL_DEREFERENCE" \ | |||
--disable-issue-type "RESOURCE_LEAK" -- ./gradlew sdk:build | |||
--disable-issue-type "RESOURCE_LEAK" \ | |||
--threadsafe-aliases "[\"ThreadSafe\"]" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adds com.bugsnag.android.ThreadSafe
as an alias for com.facebook.infer.annotation.ThreadSafe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems pretty magical (in a good way). Shouldn't there be something in the contrib guide about how to run this and what its for?
CHANGELOG.md
Outdated
|
||
### Bug fixes | ||
|
||
* Add ThreadSafe annotation to com.bugsnag.android, remove infer dependency [#370](https://github.com/bugsnag/bugsnag-android/pull/370) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also link the fixed issue.
7e03918
to
e3c5f6a
Compare
…need for Infer compile dependen
656073e
to
7c1910f
Compare
React Native includes a different version of ThreadSafe, breaking the build in React Native apps which include bugsnag-react-native. This is fixed by bugsnag/bugsnag-android#370.
Goal
Removes the need for a compile-time dependency on the infer-annotation artefact.
Changeset
@ThreadSafe
annotation to bugsnag packageinfer
property must be set to compile infer-annotation artefactTests
./infer.sh
./gradlew sdk:assemble
to confirmgeneratePomFileForProductionPublication
task to confirm that the generated POM excludes the infer-annotation dependency.Discussion
Alternative Approaches
We could attempt forking Uber's infer plugin, which is deprecated.
Linked issues
Fixes #366
Review
For the submitter, initial self-review:
For the pull request reviewer(s), this changeset has been reviewed for: