-
Notifications
You must be signed in to change notification settings - Fork 44
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
Clean up build warnings #35
Conversation
reflect/src/main/java/dagger/reflect/ComponentInvocationHandler.java
Outdated
Show resolved
Hide resolved
9230378
to
bf291c4
Compare
I've merged e62ad1b and 4f75ada. I'm still thinking about the others. I think bf2 might be obsoleted by a change I'm about to make to bindings and I need to think about 0c4 more. I'm all for more of the error-prone warnings but I'm a bit skeptical of the java ones. Maybe we can turn it on until they annoy me. |
0c4e911 is unlikely to produce anything other than unchecked, rawtypes and deprecation, which all would be visible in IDEA anyway as warnings, so quick to notice and usually very easy to fix. If "unlikely" is not good enough, it's always an option to flip it around from |
bf291c4
to
cb097d5
Compare
Rebased and fixed all of the current warnings. This unfixable warning from AGP:
and this Errorprone warning which is fixed in #156
|
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.
Mostly looks good. Just some nits.
reflect/src/main/java/dagger/reflect/UnlinkedMapOfLazyBinding.java
Outdated
Show resolved
Hide resolved
reflect/src/main/java/dagger/reflect/UnlinkedMapOfValueBinding.java
Outdated
Show resolved
Hide resolved
reflect/src/main/java/dagger/reflect/ReflectiveJustInTimeLookupFactory.java
Outdated
Show resolved
Hide resolved
Fixes :integration-tests:android:javaPreCompileCodegenDebugUnitTest "Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the testAnnotationProcessor configuration. See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details."
…ault. Fixes :integration-tests:upstream:compileTestJava "Cycles.java:35: error: unmappable character for encoding Cp1252"
cb097d5
to
a524045
Compare
…hich is what the link() returns The two objects in Map<Object, Provider<Object>> would be K and V anyway (as seen in LinkedMapOfValueBinding). Changed covariant return type to match interface declaration and all other implementations of this interface.
When Scope constructs these objects it gives it the right key.
a524045
to
1efaa52
Compare
Double-force-pushed to resolve the conflict (deleted file in another PR) and see the code review changes: |
@@ -13,11 +13,10 @@ | |||
} | |||
|
|||
@Override | |||
public LinkedBinding<Map<Object, Provider<Object>>> link(Linker linker, Scope scope) { |
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 is unfortunate. Not that I expect anyone to ever see these types, and they're erased anyway, but it at least forces a bit of safety into the method. Doing LinkedBinding<Map<?, Provider<?>>>
doesn't work?
'-Xlint:-processing', | ||
// hide warning: MethodParameters attribute introduced in version 52.0 class files is ignored in version 51.0 class files | ||
'-Xlint:-classfile', | ||
// hide warning: auxiliary class C in full/path/to/C.java should not be accessed from outside its own source file |
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.
What triggers all of these? I'm less interested in the description since that can be Googled but more interested in what causes them and why it's safe to ignore. Similar to an @Ignore
for a test. The 'processing' one has a good justification but not these last two.
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.
All 3 are the warning messages, not explanation. I'll research and explain them in the context of this project.
I've merged and cherry-picked about 7 or 8 of the commits in this PR. |
ok, thanks; will rebase and continue to discuss the rest |
Only two relevant commits remain:
Closing this until the project becomes active again. |
... and prevent future ones.
Didn't want to go straight for adding
-Werror
, because it may clobber local hacking; but I think on CI the commands should include-Pstrict.compilation=true
.