0

envoy: v1.7.0 The following rule

load("@envoy//bazel:repositories.bzl", "envoy_dependencies")
envoy_dependencies(repository="@envoy", skip_targets=["io_bazel_rules_go"])
local_repository(
    name = "io_bazel_rules_go",
    path = "/root/io_bazel_rules_go",
)

is giving me error :

ERROR: xxx/WORKSPACE:47:1: unexpected keyword 'repository' in call to envoy_dependencies(path = "@envoy_deps//", skip_targets = [])
ERROR: Error evaluating WORKSPACE file
ERROR: error loading package '': Encountered error while reading extension file 'bazel/repositories.bzl': no such package '@envoy_api//bazel': error loading package 'external': Could not load //external package
ERROR: error loading package '': Encountered error while reading extension file 'bazel/repositories.bzl': no such package '@envoy_api//bazel': error loading package 'external': Could not load //external package
INFO: Elapsed time: 6.944s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

Any input on how to skip the build of io_bazel_rules_go will be useful.

R_SS
  • 317
  • 5
  • 21

1 Answers1

0

The first error message is the relevant one, you can ignore the others:

ERROR: xxx/WORKSPACE:47:1: unexpected keyword 'repository' in call to envoy_dependencies(path = "@envoy_deps//", skip_targets = [])

This tells us that envoy_dependencies has no attribute called repository, and the signature shows there is path instead.

You can check it yourself in the rule's implementation: https://github.com/envoyproxy/envoy/blob/3f59fb5c0f6554f8b3f2e73ab4c1437a63d42668/bazel/repositories.bzl#L182

László
  • 3,973
  • 1
  • 13
  • 26
  • yes.. The older envoy had that option but not the current one. Still how one can skip the fork and build of `io_bazel_rules_go ` and tell it to use the repo that I already have in the host. – R_SS Jul 10 '18 at 06:57