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

infer-annotation bundled in SDK #366

Closed
jrodbx opened this issue Aug 20, 2018 · 3 comments
Closed

infer-annotation bundled in SDK #366

jrodbx opened this issue Aug 20, 2018 · 3 comments

Comments

@jrodbx
Copy link
Contributor

jrodbx commented Aug 20, 2018

Our CI environment highlighted the following transitive dependency being pulled in to our build:

-+--- com.bugsnag:bugsnag-android:4.5.0
-|    \--- com.android.support:support-annotations:27.0.0 -> 27.1.1
++--- com.bugsnag:bugsnag-android:4.6.0
+|    +--- com.android.support:support-annotations:27.0.0 -> 27.1.1
+|    \--- com.facebook.infer.annotation:infer-annotation:0.11.2
+|         \--- com.google.code.findbugs:jsr305:3.0.1

Here's the line in question:

compile "com.facebook.infer.annotation:infer-annotation:0.11.2"

Since Infer is a static analyzer tool, might it be better to add it as a buildscript dependency or use a plugin like: https://github.com/uber-common/infer-plugin?

@fractalwrench
Copy link
Contributor

Thanks for the report @jrodbx. Did you have specific concerns over the inclusion of this dependency, such as size, or just having one more artefact to download?

Uber's infer-plugin appears to be deprecated, but we can investigate forking the project or coming up with a similar solution that doesn't use a compile-time dependency.

@jrodbx
Copy link
Contributor Author

jrodbx commented Aug 23, 2018

The inclusion of the transitive dependency as it would also be bundled into our app, despite its sole function as a build time static analysis tool.

Oops, I missed that it's now deprecated. What about uber/nullaway? I'm exploring it myself for use in Picasso: https://github.com/square/picasso/compare/jrod/nullaway

@fractalwrench
Copy link
Contributor

Got it. We'll investigate nullaway and a few other options - we are primarily interested in Infer for the thread-safety analysis.

One option might be specifying a custom annotation com.bugsnag.android, that can be substituted for @ThreadSafe using the Infer options. That could avoid adding Infer as a dependency in the release build, but would still document which classes should be Thread Safe.

Thanks for all your contributions to Picasso by the way :) that library has saved me from many painful hours of development!

lemnik pushed a commit that referenced this issue Jun 2, 2021
Move addition of the local Maven repo for ReactNative into afterEvaluate
rich-bugsnag added a commit that referenced this issue Sep 3, 2021
* task(config): create EndpointConfiguration config type and deprecate old endpoint fields
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

No branches or pull requests

2 participants