Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map_each must be a function that accepts a single positional argument #11

Closed
fcorange opened this issue Oct 20, 2020 · 1 comment
Closed

Comments

@fcorange
Copy link

Getting below error when following README.md to setup a project:

ERROR: /.../external/dbx_build_tools/build_tools/BUILD:68:1: in dbx_py_binary rule @dbx_build_tools//build_tools:bzl:
Traceback (most recent call last):
File "/.../external/dbx_build_tools/build_tools/BUILD", line 68
dbx_py_binary(name = 'bzl')
File "/.../external/dbx_build_tools/build_tools/py/py.bzl", line 610, in _dbx_py_binary_impl
dbx_py_binary_base_impl(ctx, <1 more arguments>)
File "/.../external/dbx_build_tools/build_tools/py/py.bzl", line 659, in dbx_py_binary_base_impl
emit_py_binary(ctx, main = main, <10 more arguments>)
File "/.../external/dbx_build_tools/build_tools/py/common.bzl", line 416, in emit_py_binary
conflict_args.add_all(<2 more arguments>)
map_each must be a function that accepts a single positional argument

Env:
Ubuntu 16.04.6 (docker image running on Mac)
Bazel 2.1.1

It seems to be related to this change: e95b030

I switched to its parent commit in http_archive and all worked fine:

http_archive(
name = "dbx_build_tools",
urls = ["https://github.com/dropbox/dbx_build_tools/archive/c599cbe093c813ced631aa7bd6a5b12a69840f1b.tar.gz"],
strip_prefix = "dbx_build_tools-c599cbe093c813ced631aa7bd6a5b12a69840f1b",
sha256 = '9b5ebf16589c9f55a3976def46a0a8d600015b99717421542a2a36086ae4eb06',
)

@armooo
Copy link
Contributor

armooo commented Oct 20, 2020

Args.for_each was updated in Bazel 3.4.0 to take an optional DirectoryExpander, https://docs.bazel.build/versions/3.4.0/skylark/lib/Args.html#add_all.map_each . We tend to stay with the newest releases and are currently testing this rule set on 3.7.0. This seems like another opportunity for us to improve the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants