New issue
Advanced search Search tips

Issue 898251 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Nov 21
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocked on:
issue 874854



Sign in to add a comment

Java incomplete direct classpaths

Project Member Reported by smaier@chromium.org, Oct 23

Issue description

There are a number of indirect dependencies that have crept in since we switched to ErrorProne (which allows indirect deps). Additionally, there are some classes we include which depend on something, but we never use and is thus ProGuarded away.

However, R8 is being worked on, and we have some errors while building tests:

Warning: Missing class: org.easymock.IArgumentMatcher
Warning: Missing class: org.jmock.core.Constraint
Warning: Missing class: android.test.InstrumentationTestCase
Warning: Missing class: java.lang.ClassValue
Warning: Missing class: android.test.InstrumentationTestRunner
Error: Compilation can't be completed because some library classes are missing.

We should introduce a classpath validation tool and fix out validation errors.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 23

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/clank/internal/apps/+/f4b38ca9c073050bada9e7198d839348ec277e7b

commit f4b38ca9c073050bada9e7198d839348ec277e7b
Author: Sam Maier <smaier@chromium.org>
Date: Tue Oct 23 20:31:09 2018

Project Member

Comment 2 by bugdroid1@chromium.org, Oct 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fa64cabdfe9096d3c91561878c49050dafc85a2d

commit fa64cabdfe9096d3c91561878c49050dafc85a2d
Author: Sam Maier <smaier@chromium.org>
Date: Wed Oct 24 22:12:21 2018

Webview: making implicit dependencies direct dependencies

Bug:  898251 
Change-Id: Iad2680ad461007baa99aff5da0b0b6cabcaf88e6
Reviewed-on: https://chromium-review.googlesource.com/c/1298357
Reviewed-by: Richard Coles <torne@chromium.org>
Commit-Queue: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602484}
[modify] https://crrev.com/fa64cabdfe9096d3c91561878c49050dafc85a2d/android_webview/BUILD.gn
[modify] https://crrev.com/fa64cabdfe9096d3c91561878c49050dafc85a2d/android_webview/support_library/BUILD.gn

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 25

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0d1b607a5de0bc38e1a8021ccf16ac20a89cdee4

commit 0d1b607a5de0bc38e1a8021ccf16ac20a89cdee4
Author: Sam Maier <smaier@chromium.org>
Date: Thu Oct 25 14:40:17 2018

Android: Add missing java deps

Targets should be listing all deps that they depend upon directly,
rather than only indirectly through other deps. This will soon
be a compile error.

TBR=adding deps already in use

Bug:  898251 
Change-Id: I37b93c2dd29df4c1c923f503623990d6a529eefa
Reviewed-on: https://chromium-review.googlesource.com/c/1298325
Commit-Queue: Sam Maier <smaier@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602702}
[modify] https://crrev.com/0d1b607a5de0bc38e1a8021ccf16ac20a89cdee4/base/BUILD.gn
[modify] https://crrev.com/0d1b607a5de0bc38e1a8021ccf16ac20a89cdee4/chrome/android/BUILD.gn
[modify] https://crrev.com/0d1b607a5de0bc38e1a8021ccf16ac20a89cdee4/components/background_task_scheduler/BUILD.gn
[modify] https://crrev.com/0d1b607a5de0bc38e1a8021ccf16ac20a89cdee4/components/cronet/android/BUILD.gn
[modify] https://crrev.com/0d1b607a5de0bc38e1a8021ccf16ac20a89cdee4/components/embedder_support/android/BUILD.gn
[modify] https://crrev.com/0d1b607a5de0bc38e1a8021ccf16ac20a89cdee4/components/payments/content/android/BUILD.gn
[modify] https://crrev.com/0d1b607a5de0bc38e1a8021ccf16ac20a89cdee4/components/signin/core/browser/android/BUILD.gn
[modify] https://crrev.com/0d1b607a5de0bc38e1a8021ccf16ac20a89cdee4/content/public/android/BUILD.gn
[modify] https://crrev.com/0d1b607a5de0bc38e1a8021ccf16ac20a89cdee4/content/public/common/BUILD.gn
[modify] https://crrev.com/0d1b607a5de0bc38e1a8021ccf16ac20a89cdee4/content/shell/android/BUILD.gn
[modify] https://crrev.com/0d1b607a5de0bc38e1a8021ccf16ac20a89cdee4/services/BUILD.gn
[modify] https://crrev.com/0d1b607a5de0bc38e1a8021ccf16ac20a89cdee4/services/service_manager/public/java/BUILD.gn

Nice, once you disallow indirect deps, you'll fix  issue 874854  too. Will assign that one to you, Sam.
Blockedon: 874854
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 25

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4c342467a1b658a638df41b67c3a04adf7ebb6a7

commit 4c342467a1b658a638df41b67c3a04adf7ebb6a7
Author: Sam Maier <smaier@chromium.org>
Date: Thu Oct 25 18:33:42 2018

Android: Add missing java deps in //third_party

Targets should be listing all deps that they depend upon directly,
rather than only indirectly through other deps. This will soon
be a compile error.

TBR=third_party deps being made explicit

Bug:  898251 
Change-Id: If32dfdc46faf782775407d6e2304329647b69bad
Reviewed-on: https://chromium-review.googlesource.com/c/1298342
Reviewed-by: Sam Maier <smaier@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Commit-Queue: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602807}
[modify] https://crrev.com/4c342467a1b658a638df41b67c3a04adf7ebb6a7/third_party/accessibility_test_framework/BUILD.gn
[modify] https://crrev.com/4c342467a1b658a638df41b67c3a04adf7ebb6a7/third_party/accessibility_test_framework/README.chromium
[add] https://crrev.com/4c342467a1b658a638df41b67c3a04adf7ebb6a7/third_party/accessibility_test_framework/proguard.flags
[modify] https://crrev.com/4c342467a1b658a638df41b67c3a04adf7ebb6a7/third_party/android_support_test_runner/BUILD.gn
[modify] https://crrev.com/4c342467a1b658a638df41b67c3a04adf7ebb6a7/third_party/espresso/BUILD.gn
[modify] https://crrev.com/4c342467a1b658a638df41b67c3a04adf7ebb6a7/third_party/google-truth/BUILD.gn
[modify] https://crrev.com/4c342467a1b658a638df41b67c3a04adf7ebb6a7/third_party/gvr-android-sdk/BUILD.gn
[modify] https://crrev.com/4c342467a1b658a638df41b67c3a04adf7ebb6a7/third_party/hamcrest/BUILD.gn
[modify] https://crrev.com/4c342467a1b658a638df41b67c3a04adf7ebb6a7/third_party/hamcrest/cipd.yaml
[modify] https://crrev.com/4c342467a1b658a638df41b67c3a04adf7ebb6a7/third_party/robolectric/BUILD.gn
[modify] https://crrev.com/4c342467a1b658a638df41b67c3a04adf7ebb6a7/third_party/ub-uiautomator/BUILD.gn

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/12368f3e465b7935b88ae1ccb57c61f06267dc53

commit 12368f3e465b7935b88ae1ccb57c61f06267dc53
Author: Sam Maier <smaier@chromium.org>
Date: Fri Oct 26 19:25:36 2018

Bytecode rewriter validating direct class path

This also suppresses issues brought up by the checks that aren't easily
fixable.
Timing without change on chrome_java:
real	0m3.142s
user	0m7.278s
sys	0m0.563s

Timing with change on chrome_java:
real	0m3.429s
user	0m8.035s
sys	0m0.687s


TBR=trivial third_party changes

Bug:  898251 ,  874854 
Change-Id: Ifcb10f260e80a542ab26a470bb53426e1404e9f0
Reviewed-on: https://chromium-review.googlesource.com/c/1297233
Commit-Queue: Sam Maier <smaier@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603164}
[modify] https://crrev.com/12368f3e465b7935b88ae1ccb57c61f06267dc53/build/android/bytecode/BUILD.gn
[modify] https://crrev.com/12368f3e465b7935b88ae1ccb57c61f06267dc53/build/android/bytecode/java/org/chromium/bytecode/ByteCodeProcessor.java
[add] https://crrev.com/12368f3e465b7935b88ae1ccb57c61f06267dc53/build/android/bytecode/java/org/chromium/bytecode/ClassPathValidator.java
[modify] https://crrev.com/12368f3e465b7935b88ae1ccb57c61f06267dc53/build/android/gyp/bytecode_processor.py
[modify] https://crrev.com/12368f3e465b7935b88ae1ccb57c61f06267dc53/build/config/android/internal_rules.gni
[modify] https://crrev.com/12368f3e465b7935b88ae1ccb57c61f06267dc53/third_party/accessibility_test_framework/BUILD.gn
[modify] https://crrev.com/12368f3e465b7935b88ae1ccb57c61f06267dc53/third_party/espresso/BUILD.gn
[modify] https://crrev.com/12368f3e465b7935b88ae1ccb57c61f06267dc53/third_party/google-truth/BUILD.gn
[modify] https://crrev.com/12368f3e465b7935b88ae1ccb57c61f06267dc53/third_party/netty4/BUILD.gn
[modify] https://crrev.com/12368f3e465b7935b88ae1ccb57c61f06267dc53/tools/android/errorprone_plugin/BUILD.gn

Project Member

Comment 8 by bugdroid1@chromium.org, Nov 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/23876e96eb64f193da3e8934a86eb8d4b89a60f4

commit 23876e96eb64f193da3e8934a86eb8d4b89a60f4
Author: Sam Maier <smaier@chromium.org>
Date: Tue Nov 06 15:54:07 2018

Android: making system library deps apply transitively

Bug:  898251 
Change-Id: Iaaffb966d4cd3da6563bcc321b7db201b124292c
Reviewed-on: https://chromium-review.googlesource.com/c/1312341
Commit-Queue: Sam Maier <smaier@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605691}
[modify] https://crrev.com/23876e96eb64f193da3e8934a86eb8d4b89a60f4/build/android/gyp/write_build_config.py
[modify] https://crrev.com/23876e96eb64f193da3e8934a86eb8d4b89a60f4/build/config/android/rules.gni
[modify] https://crrev.com/23876e96eb64f193da3e8934a86eb8d4b89a60f4/build/secondary/third_party/android_tools/BUILD.gn

Project Member

Comment 9 by bugdroid1@chromium.org, Nov 6

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/clank/internal/apps/+/b6358b03dcc3773ffdf541dd475cf7e5b6bc0161

commit b6358b03dcc3773ffdf541dd475cf7e5b6bc0161
Author: Sam Maier <smaier@chromium.org>
Date: Tue Nov 06 16:46:14 2018

Project Member

Comment 10 by bugdroid1@chromium.org, Nov 8

Status: Verified (was: Started)
This is done as far as it can be done, without pulling in new third party code just to fix some other third party dependencies.

Sign in to add a comment