WrongConstant lint warning is produced using GN but not with gyp |
|||
Issue description
There are some lint errors generated. We need to investigate and fix them.
[2229/5747] ACTION //components/cronet/android:cronet_api__lint(//build/toolchain/android:arm)
../../../../../../tmp/tmpARzXkk/0/BidirectionalStream.java:186 Must be one of: Builder.STREAM_PRIORITY_IDLE, Builder.STREAM_PRIORITY_LOWEST, Builder.STREAM_PRIORITY_LOW, Builder.STREAM_PRIORITY_MEDIUM, Builder.STREAM_PRIORITY_HIGHEST: WrongConstant [warning]
mRequestHeaders, mPriority, mDisableAutoFlush);
~~~~~~~~~
../../../../../../tmp/tmpARzXkk/0/BidirectionalStream.java:186 Must be one of: Builder.STREAM_PRIORITY_IDLE, Builder.STREAM_PRIORITY_LOWEST, Builder.STREAM_PRIORITY_LOW, Builder.STREAM_PRIORITY_MEDIUM, Builder.STREAM_PRIORITY_HIGHEST: WrongConstant [warning]
mRequestHeaders, mPriority, mDisableAutoFlush);
~~~~~~~~~
Lint found 1 new issues.
- For full explanation, please refer to out/Release/gen/components/cronet/android/cronet_api__lint/result.xml
- For more information about lint and how to fix lint issues, please refer to https://chromium.googlesource.com/chromium/src/+/master/build/android/docs/lint.md
,
May 27 2016
Sure. We saw something similar in issue 605296.
,
May 27 2016
I think this is basically https://code.google.com/p/android/issues/detail?id=182179. We can work around it for now by either: - suppressing the warning - bumping the RetentionPolicy on these two annotations up from SOURCE to CLASS. I'll upload a CL that does the former. Re the gyp/gn difference: the gyp invocation didn't have the android support annotation jar in its classpath, so AFAICT it didn't recognize or attempt to do anything with @IntDef. The gn invocation does.
,
May 27 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/25fbe7b5f5705b3b6f58a542749cc1435769bdcc commit 25fbe7b5f5705b3b6f58a542749cc1435769bdcc Author: jbudorick <jbudorick@chromium.org> Date: Fri May 27 18:15:14 2016 [cronet] Temporarily suppress WrongConstant lint warning in two places. BUG= 615045 Review-Url: https://codereview.chromium.org/2016413002 Cr-Commit-Position: refs/heads/master@{#396514} [modify] https://crrev.com/25fbe7b5f5705b3b6f58a542749cc1435769bdcc/components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java [modify] https://crrev.com/25fbe7b5f5705b3b6f58a542749cc1435769bdcc/components/cronet/android/api/src/org/chromium/net/CronetEngine.java
,
May 27 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by xunji...@chromium.org
, May 27 2016Summary: WrongConstant lint warning is produced using GN but not with gyp (was: Lint errors in BidirectionalStream.java)