bazelbuild / intellij

IntelliJ plugin for Bazel projects
https://ij.bazel.build/
Apache License 2.0
752 stars 296 forks source link

Project sync fails with errors #445

Closed hsestupin closed 5 years ago

hsestupin commented 5 years ago

Actualy there are lots of identical errors which look like this:

ERROR: /Users/jetbrains/src/datalore/platform/widget/widget-to-dom/BUILD.bazel:53:1: in @intellij_aspect//:intellij_info_bundled.bzl%intellij_info_aspect aspect on filegroup rule //platform/widget/widget-to-dom:views_resources: 
Traceback (most recent call last):
    File "/Users/jetbrains/src/datalore/platform/widget/widget-to-dom/BUILD.bazel", line 53
        @intellij_aspect//:intellij_info_bundled.bzl%intellij_info_aspect(...)
    File "/private/var/tmp/_bazel_jetbrains/e439d9fcbe1875cf9922b11e6b2acfbc/external/intellij_aspect/intellij_info_bundled.bzl", line 38, in _aspect_impl
        intellij_info_aspect_impl(target, ctx, semantics)
    File "/private/var/tmp/_bazel_jetbrains/e439d9fcbe1875cf9922b11e6b2acfbc/external/intellij_aspect/intellij_info_impl.bzl", line 802, in intellij_info_aspect_impl
        update_set_in_dict(output_groups, "intellij-info-gene...", ...]))
    File "/private/var/tmp/_bazel_jetbrains/e439d9fcbe1875cf9922b11e6b2acfbc/external/intellij_aspect/intellij_info_impl.bzl", line 191, in update_set_in_dict
        input_dict.get(key, depset()) | other_set
`|` operator on a depset is forbidden. See https://docs.bazel.build/versions/master/skylark/depsets.html for recommendations. Use --incompatible_depset_union=false to temporarily disable this check.

Bazel version is: 0.18.1-homebrew Idea: 2018.2.4 Plugin: 2018.10.22.0.2

Is there any workaround for this?

brendandouglas commented 5 years ago

Looks like you'll need to add "--incompatible_depset_union=false" to your bazel flags (either your .bazelrc file, or the "build_flags" .bazelproject file), or downgrade to an earlier version of bazel.

jin commented 5 years ago

What @brendandouglas said. See https://github.com/bazelbuild/bazel/issues/5817 for more information on how to migrate their projects to use the new constructor.

laurentlb commented 5 years ago

incompatible_depset_union is still false by default.

From the error message, it seems like it was explicitly set to true (using either --incompatible_depset_union or --all_incompatible_changes).