benley / bazel_rules_pex

Python PEX rules for Bazel
Apache License 2.0
39 stars 36 forks source link

pex_binary 0.3.0 broken with bazel 0.6 #46

Closed hwright closed 7 years ago

hwright commented 7 years ago

Testing the current release branch from bazel against the existing pex_binary release gives:

$ bazel build :application
ERROR: /Users/hwright/duolingo/duolingo-eta/BUILD:5:1: in pex_binary rule //:application: 
Traceback (most recent call last):
    File "/Users/hwright/duolingo/duolingo-eta/BUILD", line 5
        pex_binary(name = 'application')
    File "/private/var/tmp/_bazel_hwright/084f6c55936b2ad3dbdc77bbb4b384b1/external/io_bazel_rules_pex/pex/pex_rules.bzl", line 142, in _pex_binary_impl
        set(ctx.files.srcs)
The `set` constructor for depsets is deprecated and will be removed. Please use the `depset` constructor instead. You can temporarily enable the deprecated `set` constructor by passing the flag --incompatible_disallow_set_constructor=false.
ERROR: Analysis of target '//:application' failed; build aborted.
INFO: Elapsed time: 25.144s
$

There is, of course, a trivial workaround in the error message, but the rules themselves should be upgraded.

benley commented 7 years ago

Thanks for the report - I'll get this fixed shortly. Haven't had a chance to test things with bazel 0.6 yet.

qzmfranklin commented 6 years ago

Hi,

I got a similar error with bazel 0.11.1 on Ubuntu 16.04.4:

ERROR: /home/zhongming/.cache/bazel/_bazel_zhongming/e99eb4b42291f3e78ff260c740d00d52/external/io_bazel_rules_pex/pex/pex_rules.bzl:60:18: The function 'set' has been removed in favor of 'depset', please use the latter. You can temporarily refer to the old 'set' constructor from unexecuted code by using --incompatible_disallow_uncalled_set_constructor=false

Would like to see this fixed.

qzmfranklin commented 6 years ago

OK, I tried the latest master e2746c5c4ed70f7a56b724eec733a3fb32239b77, it worked with bazel 0.11.1.

Could someone update the README.md, which still has the tag 0.3.0?