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

R8 warnings #183

Open
jakoss opened this issue Sep 24, 2019 · 9 comments
Open

R8 warnings #183

jakoss opened this issue Sep 24, 2019 · 9 comments

Comments

@jakoss
Copy link

jakoss commented Sep 24, 2019

I'm using hyperion in release builds with QA flavor. When building i get this warning from R8 phase:

AGPBI: {"kind":"warning","text":"The rule `-keep class * implements com.willowtreeapps.hyperion.plugin.v1.Plugin {\r\n  *;\r\n}` uses implements but actually matches extends.","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"The rule `-keep class * implements com.willowtreeapps.hyperion.plugin.v1.PluginModule {\r\n  *;\r\n}` uses implements but actually matches extends.","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"The rule `-keep class * implements com.willowtreeapps.hyperion.attr.collectors.TypedAttributeCollector {\r\n  <init>();\r\n}` uses implements but actually matches extends.","sources":[{}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"The rule `-keepclassmembers class * implements javax.net.ssl.SSLSocketFactory {\r\n  private final javax.net.ssl.SSLSocketFactory delegate;\r\n}` uses implements but actually matches extends.","sources":[{}],"tool":"R8"}
@LeoAndo
Copy link

LeoAndo commented Oct 23, 2019

@Kritarie @evant @Jawnnypoo

#183 (comment)

↑ I got the same warning.

Android Studio: 3.5.1
Grade : 3.4.1
R8 compiler_version: 1.4.94

@LeoAndo
Copy link

LeoAndo commented Oct 23, 2019

@Kritarie @evant @Jawnnypoo

the warning log did not disappear even when the proguard was set ↓.

-keep class * implements com.willowtreeapps.hyperion.plugin.v1.Plugin {
  *;
}
-keep class * implements com.willowtreeapps.hyperion.plugin.v1.PluginModule {
  *;
}
-keep class * implements com.willowtreeapps.hyperion.attr.collectors.TypedAttributeCollector {
  <init>();
}

@HBiSoft
Copy link

HBiSoft commented Dec 4, 2019

Gradle plugin >3.4.0 no longer uses ProGuard to perform compile-time code optimization. Instead, it works with R8. It seems like these warnings happen because R8 has more strict rules.

You can ignore these messages

@jakoss
Copy link
Author

jakoss commented Dec 4, 2019

I created this issue specifically because i know that warnings aren't there for fun and getting rid of them is just a good practise. I know i can ignore them, but i don't want to

@HBiSoft
Copy link

HBiSoft commented Dec 4, 2019

@NekroMancer

I created this issue specifically because ...

Exactly. This has nothing to do with this library. You created an issue on a library where the problem is with Gradle.

According to this issue report, it was fixed in Gradle 3.5.0-beta05.

Upgrade your Gradle version, I think the latest version is 3.5.2.

@jakoss
Copy link
Author

jakoss commented Dec 4, 2019

I'm using the newest gradle version, but that's not the point. You are talking about ignoring and supression of the warnings. And ok - if warnings cannot be prevented by R8 configuration change (and i'm not sure that they can't) then the library should have suppresion setup.

But you cannot tell me that every single library client should setup R8 warning supression code, it's pointless. If library have R8 setup then it should have supressions too.

As right know - using library is causing warnings. This to me is a bad behavior, and that's what i created issue for.

If warning ignoring/suppresion is "the right thing" here then i would be glad to hear that from library maintainers

@HBiSoft
Copy link

HBiSoft commented Dec 4, 2019

@NekroMancer

It's a few lines of -dontwarn in your proguard-rules and you are done.

But if you would like to wait for the library maintainer/owner to confirm this then you are welcome to do so.

I do agree that the library owner can add it to the library, but you can also do it yourself and submit a pull request..

@jakoss
Copy link
Author

jakoss commented Dec 4, 2019

You, i could. And i also can create a low-priority issue that may or may not be taken over. And that's what i did.

Look, i just gave a feedback to a library maintainers that the issue is here. I'm not blocked by this in any way. I'm not rushing them in any way. I just made a feedback.

@HBiSoft
Copy link

HBiSoft commented Dec 4, 2019

@NekroMancer
I understand. I was just giving my 2 cents with the hopes of helping someone at least.
Anyways, all the best.

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

3 participants