benley / bazel_rules_pex

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

Bazel 0.10 fails with Extension file not found #65

Closed flaub closed 6 years ago

flaub commented 6 years ago

I'm on macos trying to pull in bazel_rules_pex. It was working before 0.10, but after upgrading, I get an error like:

ERROR: /Users/flaub/src/vertex/work1-imac/private/vision/web/BUILD:59:1: every rule of type pex_binary implicitly depends upon the target '@io_bazel_rules_pex//pex:pex_wrapper', but this target could not be found because of: error loading package '@io_bazel_rules_pex//pex': Extension file not found. Unable to load package for '//pex:pex_rules.bzl': BUILD file not found on package path
ERROR: Analysis of target '//vision/web:demo.pex' failed; build aborted: error loading package '@io_bazel_rules_pex//pex': Extension file not found. Unable to load package for '//pex:pex_rules.bzl': BUILD file not found on package path

My WORKSPACE has this in it:

http_archive(
    name = "io_bazel_rules_pex",
    sha256 = "4e068ab38589b2baf22d2c6c58b7cb3004d14191bc4f9fdb0baed4275520943f",
    strip_prefix = "bazel_rules_pex-e2746c5c4ed70f7a56b724eec733a3fb32239b77",
    url = "https://github.com/benley/bazel_rules_pex/archive/e2746c5c4ed70f7a56b724eec733a3fb32239b77.zip",
)

load("@io_bazel_rules_pex//pex:pex_rules.bzl", "pex_repositories")

pex_repositories()

After some digging, it appears that the bazel_prelude defined in the io_bazel_rules_pex workspace is somehow effecting my workspace. So I removed the prelude from io_bazel_rules_pex and now it seems to work.

benley commented 6 years ago

Fixed by #66, hopefully