benley / bazel_rules_pex

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

name 'set' is not defined #72

Closed zanes2016 closed 6 years ago

zanes2016 commented 6 years ago

I get the following error when pex_repositories() is called:

# bazel build ...
ERROR: /root/.cache/bazel/_bazel_root/6f6133ece88806ce1513398e26791cf1/external/io_bazel_rules_pex/pex/pex_rules.bzl:60:18: name 'set' is not defined
ERROR: error loading package '': Extension 'pex/pex_rules.bzl' has errors
ERROR: error loading package '': Extension 'pex/pex_rules.bzl' has errors
INFO: Elapsed time: 0.917s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

Environment

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:    16.04
Codename:   xenial

Bazel Version

# bazel version
Build label: 0.15.2
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Jul 17 12:22:40 2018 (1531830160)
Build timestamp: 1531830160
Build timestamp as int: 1531830160

WORKSPACE

git_repository(
    name = "io_bazel_rules_pex",
    remote = "https://github.com/benley/bazel_rules_pex.git",
    tag = "0.3.0",
)
load("@io_bazel_rules_pex//pex:pex_rules.bzl", "pex_repositories")
pex_repositories()
benley commented 6 years ago

Whoops, this is something that's fixed in the master branch but there hasn't been a release in a really long time. If you point your git_repository at the latest commit you will likely have better luck.

And I really need to get a new release out. I'll do it soon.

zanes2016 commented 6 years ago

Thanks @benley It works with the following

WORKSPACE

git_repository(
    name = "io_bazel_rules_pex",
    remote = "https://github.com/benley/bazel_rules_pex.git",
    commit = "7e6890ff5f806dcc3790b86e4acfed9ad3a82ee7",
)
load("@io_bazel_rules_pex//pex:pex_rules.bzl", "pex_repositories")
pex_repositories()