With this in WORKSPACE:
new_git_repository(
name = "hiccup",
commit = "53057de9799b27d5d0ddfe865fdac6e7a141d896",
build_file_content = """
load("//build_tools/clojure:clojure.bzl", "clojure")
clojure(
name = "src",
namespace = "src.hiccup.core",
)""",
remote = "https://github.com/weavejester/hiccup.git",
)
as it says, bzl rule should be loaded from a local repository //build_tools/clojure:clojure.bzl
However, when called, the rule is looked upon in remote new_git_repository repository:
andy@laptop:~/repo/build_tools/clojure/tests$ bazel run :two
ERROR: /home/andy/repo/build_tools/clojure/tests/BUILD:9:1: error loading package '@hiccup//': Extension file not found. Unable to load package for '@hiccup//build_tools/clojure:clojure.bzl': BUILD file not found on package path and referenced by '//build_tools/clojure/tests:two'.
ERROR: Analysis of target '//build_tools/clojure/tests:two' failed; build aborted.
INFO: Elapsed time: 0.157s
ERROR: Build failed. Not running target.
here is //build_tools/clojure/tests
load("//build_tools/clojure:clojure.bzl", "clojure")
clojure(
name = "one",
)
clojure(
name = "two",
deps = [
"@hiccup//:src",
":one_library",
],
)
Environment info
With this in WORKSPACE:
as it says,
bzlrule should be loaded from a local repository//build_tools/clojure:clojure.bzlHowever, when called, the rule is looked upon in remote
new_git_repositoryrepository:here is
//build_tools/clojure/testsEnvironment info
Operating System:
Linux laptop 3.16.0-4-amd64 Update the Readme to give a short description of bazel. #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux
Bazel version (output of
bazel info release):release 0.4.2