You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ bazel build //docs/...
INFO: Found 8 targets...
ERROR: /home/mattmoor/rules_docker/docs/BUILD:82:1: Generating Skylark doc for docs-html (13 files) failed: Process exited with status 1 [sandboxed].
Traceback (most recent call last):
File "/home/mattmoor/.cache/bazel/_bazel_mattmoor/5c340bb9d399314dffbfbc3c347e19fb/bazel-sandbox/8331154761733958341/execroot/rules_docker/bazel-out/host/bin/external/io_bazel_skydoc/skydoc/skydoc.runfiles/io_bazel_rules_docker/../io_bazel_skydoc/skydoc/main.py", line 330, in <module>
main(FLAGS(sys.argv))
File "/home/mattmoor/.cache/bazel/_bazel_mattmoor/5c340bb9d399314dffbfbc3c347e19fb/bazel-sandbox/8331154761733958341/execroot/rules_docker/bazel-out/host/bin/external/io_bazel_skydoc/skydoc/skydoc.runfiles/io_bazel_rules_docker/../io_bazel_skydoc/skydoc/main.py", line 308, in main
rule_doc_extractor.parse_bzl(bzl_file, load_symbols)
File "/home/mattmoor/.cache/bazel/_bazel_mattmoor/5c340bb9d399314dffbfbc3c347e19fb/bazel-sandbox/8331154761733958341/execroot/rules_docker/bazel-out/host/bin/external/io_bazel_skydoc/skydoc/skydoc.runfiles/io_bazel_skydoc/skydoc/rule_extractor.py", line 227, in parse_bzl
self._process_skylark(bzl_file, load_symbols)
File "/home/mattmoor/.cache/bazel/_bazel_mattmoor/5c340bb9d399314dffbfbc3c347e19fb/bazel-sandbox/8331154761733958341/execroot/rules_docker/bazel-out/host/bin/external/io_bazel_skydoc/skydoc/skydoc.runfiles/io_bazel_skydoc/skydoc/rule_extractor.py", line 99, in _process_skylark
exec(compiled) in global_stubs, skylark_locals
File "docker/build.bzl", line 275, in <module>
} + _hash_tools + _layer_tools,
TypeError: unsupported operand type(s) for +: 'dict' and 'str'
Use --strategy=Skydoc=standalone to disable sandboxing for the failing actions.
INFO: Elapsed time: 1.089s, Critical Path: 0.39s
I've updated my repro branch to HEAD, and the issue persists. I verified that my repro is on the latest release of the skydoc and sass repos.
I'd put documenting certain parts of the repo (e.g. contrib) on hold in an effort to move to skydoc, which is blocked on this issue. However, I keep getting requests for things that exist, but aren't yet documented, so if we can't get this resolved soon, I think I'm going to have to document things the old way. :(
Activity
mattmoor commentedon Jun 30, 2017
@damienmg I'm hitting the following trying to use skydoc.
I pushed the repro to the skydoc branch on my fork.
damienmg commentedon Jul 3, 2017
/cc @davidzchen for Skydoc
mattmoor commentedon Jul 10, 2017
@davidzchen what's going on?
mattmoor commentedon Aug 13, 2017
I've updated my repro branch to HEAD, and the issue persists. I verified that my repro is on the latest release of the skydoc and sass repos.
I'd put documenting certain parts of the repo (e.g.
contrib) on hold in an effort to move to skydoc, which is blocked on this issue. However, I keep getting requests for things that exist, but aren't yet documented, so if we can't get this resolved soon, I think I'm going to have to document things the old way. :(Ping @davidzchen .
FYI @ulfjack .
davidzchen commentedon Aug 21, 2017
Sorry for the wait.
The reason why you are getting this error is because Skydoc evaluates Skylark code as Python, and Python does not support the
+operator for dictionaries. The way to work around this is to combine the dictionaries using a way that is supported by Python, for example: https://github.com/bazelbuild/rules_rust/blob/master/rust/rust.bzl#L672AFAIU, we do have plans to disallow
+for dictionaries in Skylark so that Skylark is a proper subset of Python: bazelbuild/bazel#1086mattmoor commentedon Aug 21, 2017
Thanks, I will try that out and see if it unblocks me.
mattmoor commentedon Aug 21, 2017
I have pushed an update that rewrites to use
dict(foo.items() + bar.items() + baz.items())and there is a new error:It looks like the load of the
dictfrom another.bzlfile is being interpreted as a string.mattmoor commentedon Aug 22, 2017
This is blocked on: bazelbuild/skydoc#21