Skip to content

Commit abe7374

Browse files
hanwendslomov
authored andcommitted
Fix bazel_go_example_test. Changes:
* The go_prefix should be declared in the toplevel BUILD file as //:go_prefix, rather than //external:go_prefix. * Run set_up from the test methods. * Update references to Darwin. Tested: bazel test src/test/shell/bazel/bazel_go_example_test -- Change-Id: I89b2f5920100d27abdbc093437c7c051a24fad1e Reviewed-on: https://bazel-review.googlesource.com/#/c/2561 MOS_MIGRATED_REVID=110762730
1 parent a40e8a0 commit abe7374

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ The rules should be considered experimental. They support:
2121

2222
They currently do not support (in order of importance):
2323

24-
* Darwin
2524
* `//+build` tags
2625
* auto generated BUILD files.
2726
* C/C++ interoperation (cgo, swig etc.)
@@ -70,7 +69,7 @@ They currently do not support (in order of importance):
7069

7170
* In this case, import the library as `github.com/joe/project/lib`.
7271
* For vendored libraries, you may depend on
73-
`//lib/vendor/github.com/user/project:go_default_library`. Vendored
72+
`//lib/vendor/github.com/user/project:go_default_library`. Vendored
7473
libraries should have BUILD files like normal libraries.
7574
* To declare a test,
7675

def.bzl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ go_library_attrs = {
334334
),
335335
"go_prefix": attr.label(
336336
providers = ["go_prefix"],
337-
default = Label("//external:go_prefix"),
337+
default = Label("//:go_prefix"),
338338
allow_files = False,
339339
cfg = HOST_CFG,
340340
),
@@ -380,12 +380,7 @@ go_test = rule(
380380
test = True,
381381
)
382382

383-
# TODO(bazel-team): support darwin
384383
def go_repositories():
385-
native.bind(name = "go_prefix",
386-
actual = "//:go_prefix",
387-
)
388-
389384
native.new_http_archive(
390385
name= "golang-linux-amd64",
391386
url = "https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz",

0 commit comments

Comments
 (0)