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
As of bazel 0.20, it appears that new_http_archive is deprecated in favor of http_archive from the http.bzl starlark extensions. The error message says its a drop in replacement, but this isn't quite true.
Here's the error message with a plain build with bazel 0.20
Switching to http.bzl and http_archive gives a different error:
$ bazel build absl:app
INFO: Invocation ID: 97b201ea-ebd5-4d02-8f8f-dae99b4b2458
INFO: Build options have changed, discarding analysis cache.
ERROR: /usr/local/google/home/rlevasseur/absl-gob/PyAbseilCommonLibraries/absl/flags/BUILD:5:1: no such package '@six_archive//': Traceback (most recent call last):
File "/usr/local/google/home/rlevasseur/.cache/bazel/_bazel_rlevasseur/beec95bc32223bdd257f4689504738ee/external/bazel_tools/tools/build_defs/repo/http.bzl", line 56
workspace_and_buildfile(ctx)
File "/usr/local/google/home/rlevasseur/.cache/bazel/_bazel_rlevasseur/beec95bc32223bdd257f4689504738ee/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 60, in workspace_and_buildfile
ctx.symlink(ctx.attr.build_file, "BUILD.bazel")
Not a regular file: /usr/local/google/home/rlevasseur/absl-gob/PyAbseilCommonLibraries/external/third_party/six.BUILD and referenced by '//absl/flags:flags'
ERROR: Analysis of target '//absl:app' failed; build aborted: no such package '@six_archive//': Traceback (most recent call last):
File "/usr/local/google/home/rlevasseur/.cache/bazel/_bazel_rlevasseur/beec95bc32223bdd257f4689504738ee/external/bazel_tools/tools/build_defs/repo/http.bzl", line 56
workspace_and_buildfile(ctx)
File "/usr/local/google/home/rlevasseur/.cache/bazel/_bazel_rlevasseur/beec95bc32223bdd257f4689504738ee/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 60, in workspace_and_buildfile
ctx.symlink(ctx.attr.build_file, "BUILD.bazel")
Not a regular file: /usr/local/google/home/rlevasseur/absl-gob/PyAbseilCommonLibraries/external/third_party/six.BUILD
INFO: Elapsed time: 0.371s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (7 packages loaded, 38 targets configured)
Fetching @six_archive; fetching
Searching around, this looks to be related to maybe this: bazelbuild/bazel#6225
Basically, its not quite a drop-in replacement.
Unfortunately, I wasn't able to get it to work with e.g. build_file="@//:third_party/six.BUILD (as mentioned in the above issue), I think because the "third_party" directory doesn't have a BUILD file (the error it gives refers to being unable to find the bazel package). I can get it to work using build_file_content, though, so I might just use that instead.
The text was updated successfully, but these errors were encountered:
As of bazel 0.20, it appears that new_http_archive is deprecated in favor of http_archive from the http.bzl starlark extensions. The error message says its a drop in replacement, but this isn't quite true.
Here's the error message with a plain build with bazel 0.20
Switching to http.bzl and http_archive gives a different error:
Searching around, this looks to be related to maybe this: bazelbuild/bazel#6225
Basically, its not quite a drop-in replacement.
Unfortunately, I wasn't able to get it to work with e.g.
build_file="@//:third_party/six.BUILD
(as mentioned in the above issue), I think because the "third_party" directory doesn't have a BUILD file (the error it gives refers to being unable to find the bazel package). I can get it to work using build_file_content, though, so I might just use that instead.The text was updated successfully, but these errors were encountered: