bazel_rules_pex
bazel_rules_pex copied to clipboard
28.1 breaks pex?
It may have broken before this version but I was trying out using pex and it seems like its broken. This is me cloning master and seeing if it works.
Starting local Bazel server and connecting to it... ERROR: /home/tradergt/modules/bazel_rules_pex/pex/pex_rules.bzl:49:18: name 'FileType' 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: 3.955s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded)
Thanks for the report! So yeah, I think these rules will need some updates for bazel >= 0.27. I have not had time to work on Bazel-related stuff for a while because work has had me busy with so many other things, but I would be happy to merge fixes if you or someone else can contribute them.
I might have it pretty close but I cant figure out what I need to change this too..
native.http_file( name = 'pytest_whl', url = 'https://pypi.python.org/packages/8c/7d/f5d71f0e28af32388e07bd4ce0dbd2b3539693aadcae4403266173ec87fa/pytest-3.2.3-py2.py3-none-any.whl', sha256 = '81a25f36a97da3313e1125fce9e7bbbba565bc7fec3c5beb14c262ddab238ac1' )
native.http_file(name = "pytest_whl", url = "https:...", ...")
type 'struct' has no method http_file()
I cant find any example of what I need to change this too.
I think the http_file rule has been mode into a skylark module: https://docs.bazel.build/versions/master/repo/http.html
So you can get it back with
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file", "http_archive")
I had tried that but it did not work while it was still in that function. What did make it work is moving that function, essentially, to the workspace file itself. Which does not seem right to me but it works. Now I am on to this error and need to sort it:
import imp Could not find a version that satisfies the requirement pex (from versions: ) No matching distribution found for pex