Skip to content
This repository was archived by the owner on Jun 5, 2021. It is now read-only.
This repository was archived by the owner on Jun 5, 2021. It is now read-only.

Cannot iterate over a depset in Bazel 0.27 #58

@apt-itude

Description

@apt-itude

Starting in Bazel 0.27, depsets will no longer be iterable without passing the --incompatible_depset_is_not_iterable=false flag (see bazelbuild/bazel#5816).

This results errors such as the following:

ERROR: /Users/athompson/code/bazel-javascript/examples/react-app-javascript/src/BUILD.bazel:5:1: in js_library rule //src:src: Traceback (most recent call last):	File "/Users/athompson/code/bazel-javascript/examples/react-app-javascript/src/BUILD.bazel", line 5	js_library(name = 'src')	File "/private/var/tmp/_bazel_athompson/b5cf6c1c8373f2d1d578c3715ed88e15/external/bazel_javascript/internal/js_library/rule.bzl", line 71, in _js_library_impl	_js_library_create_full_src(ctx, internal_deps, npm_packages)	File "/private/var/tmp/_bazel_athompson/b5cf6c1c8373f2d1d578c3715ed88e15/external/bazel_javascript/internal/js_library/rule.bzl", line 99, in _js_library_create_full_src	ctx.actions.run(inputs = (([ctx.attr._internal_p...), <4 more arguments>)	File "/private/var/tmp/_bazel_athompson/b5cf6c1c8373f2d1d578c3715ed88e15/external/bazel_javascript/internal/js_library/rule.bzl", line 104, in ctx.actions.run	[d[JsLibraryInfo].compiled_javascript_dir for d in internal_deps] type 'depset' is not iterable. Use the `to_list()` method to get a list. Use --incompatible_depset_is_not_iterable=false to temporarily disable this check. ERROR: Analysis of target '//src:src' failed; build aborted: Analysis of target '//src:src' failed; build aborted``` 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions