Skip to content

Turbine breaks ASWB IDE sync for projects using Robolectric (android_local_test) #13144

@jongerrish

Description

@jongerrish

Description of the problem / feature request:

Turbine breaks ASWB IDE sync for projects with Robolectric tests.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Using Android Studio w/ Blaze v4.0+ sync a project with an android_local_test rule.

What operating system are you running Bazel on?

Mac

What's the output of bazel info release?

development version

If bazel info release returns "development version" or "(@Non-Git)", tell us how you built Bazel.

Our internal fork based on v.4.0.0

What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?

[email protected]:Snapchat/bazel.git
2e15fa7e372a3118a09438624494b570e84c44d3
2e15fa7e372a3118a09438624494b570e84c44d3

Have you found anything relevant by searching the web?

I created this issue on the Robolectric tracker:
robolectric/robolectric#6242

Dagger seems to have stumbled on this issue and worked around it by pegging their Bazel version at v3.7.x:
google/dagger@1b5b075

This is the actual Turbine error check that fails:
google/turbine@8bbf4cb

This is the annotation that causes the problem:-
https://github.com/robolectric/robolectric/blob/master/annotations/src/main/java/org/robolectric/annotation/Config.java

I'm unsure why its reporting clinit as the missing attribute however.

Any other information, logs, or outputs that you want to share?

To reproduce from the command line you can just trigger the ASWB IDE aspect, this command is the smallest stripped down command that the IDE issues. Note that intellij-resolve-java is the key output group since this is what triggers Turbine. Note, that it is possible to build and run tests because Turbine isn't invoked for an android_local_test target in these cases. It's the aspect that triggers Turbine.

bazel build --aspects=@intellij_aspect//:intellij_info_bundled.bzl%intellij_info_aspect "--override_repository=intellij_aspect=/Users/jgerrish/Library/Application Support/Google/AndroidStudio4.1/plugins/aswb/aspect" --output_groups=intellij-resolve-java -- //foo/bar/baz:test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions