Skip to content

Commit b0a9851

Browse files
authored
Remove deprecated rules (#3538)
These rules should have been removed in 0.39 release but were not.
1 parent d2a3cf2 commit b0a9851

File tree

23 files changed

+0
-1105
lines changed

23 files changed

+0
-1105
lines changed

.bazelci/presubmit.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ tasks:
278278
- "-//tests/core/coverage:issue3017_test"
279279
- "-//tests/core/cross:proto_test"
280280
- "-//tests/core/go_binary:go_default_test"
281-
- "-//tests/extras/go_embed_data:go_default_test"
282281
- "-//tests/core/go_path:go_path"
283282
- "-//tests/core/go_path:go_path_test"
284283
- "-//tests/core/go_path/pkg/lib:embed_test"

README.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ Go rules for Bazel_
4040
.. _go_binary: docs/go/core/rules.md#go_binary
4141
.. _go_context: go/toolchains.rst#go_context
4242
.. _go_download_sdk: go/toolchains.rst#go_download_sdk
43-
.. _go_embed_data: docs/go/extras/extras.md#go_embed_data
4443
.. _go_host_sdk: go/toolchains.rst#go_host_sdk
4544
.. _go_library: docs/go/core/rules.md#go_library
4645
.. _go_local_sdk: go/toolchains.rst#go_local_sdk
@@ -174,8 +173,6 @@ Documentation
174173

175174
* `Extra rules <docs/go/extras/extras.md>`_
176175

177-
* `go_embed_data`_
178-
179176
* `nogo build-time static analysis`_
180177
* `Build modes <go/modes.rst>`_
181178

WORKSPACE

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
2222

2323
protobuf_deps()
2424

25-
load("@io_bazel_rules_go//extras:embed_data_deps.bzl", "go_embed_data_dependencies")
26-
27-
go_embed_data_dependencies()
28-
2925
# Used by //tests:buildifier_test.
3026
http_archive(
3127
name = "com_github_bazelbuild_buildtools",

docs/go/extras/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ bzl_library(
1010
srcs = ["extras.bzl"],
1111
visibility = ["//visibility:public"],
1212
deps = [
13-
"//extras:embed_data",
1413
"//extras:gomock",
1514
],
1615
)

docs/go/extras/extras.bzl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ to make life a little easier.
1111
## Contents
1212
- [gazelle](#gazelle)
1313
- [gomock](#gomock)
14-
- [go_embed_data](#go_embed_data)
1514
1615
## Additional resources
1716
- [gazelle rule]
@@ -28,8 +27,5 @@ This rule has moved. See [gazelle rule] in the Gazelle repository.
2827
"""
2928

3029
load("//extras:gomock.bzl", _gomock = "gomock")
31-
load("//extras:embed_data.bzl", _go_embed_data = "go_embed_data")
3230

3331
gomock = _gomock
34-
35-
go_embed_data = _go_embed_data

docs/go/extras/extras.md

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ to make life a little easier.
1313
## Contents
1414
- [gazelle](#gazelle)
1515
- [gomock](#gomock)
16-
- [go_embed_data](#go_embed_data)
1716

1817
## Additional resources
1918
- [gazelle rule]
@@ -29,50 +28,6 @@ This rule has moved. See [gazelle rule] in the Gazelle repository.
2928

3029

3130

32-
33-
34-
35-
<a id="#go_embed_data"></a>
36-
37-
## go_embed_data
38-
39-
<pre>
40-
go_embed_data(<a href="#go_embed_data-name">name</a>, <a href="#go_embed_data-flatten">flatten</a>, <a href="#go_embed_data-package">package</a>, <a href="#go_embed_data-src">src</a>, <a href="#go_embed_data-srcs">srcs</a>, <a href="#go_embed_data-string">string</a>, <a href="#go_embed_data-unpack">unpack</a>, <a href="#go_embed_data-var">var</a>)
41-
</pre>
42-
43-
**Deprecated**: Will be removed in rules_go 0.39.
44-
45-
`go_embed_data` generates a .go file that contains data from a file or a
46-
list of files. It should be consumed in the srcs list of one of the
47-
[core go rules].
48-
49-
Before using `go_embed_data`, you must add the following snippet to your
50-
WORKSPACE:
51-
52-
``` bzl
53-
load("@io_bazel_rules_go//extras:embed_data_deps.bzl", "go_embed_data_dependencies")
54-
55-
go_embed_data_dependencies()
56-
```
57-
58-
`go_embed_data` accepts the attributes listed below.
59-
60-
61-
### **Attributes**
62-
63-
64-
| Name | Description | Type | Mandatory | Default |
65-
| :------------- | :------------- | :------------- | :------------- | :------------- |
66-
| <a id="go_embed_data-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
67-
| <a id="go_embed_data-flatten"></a>flatten | If <code>True</code> and <code>srcs</code> is used, map keys are file base names instead of relative paths. | Boolean | optional | False |
68-
| <a id="go_embed_data-package"></a>package | Go package name for the generated .go file. | String | optional | "" |
69-
| <a id="go_embed_data-src"></a>src | A single file to embed. This cannot be used at the same time as <code>srcs</code>. The generated file will have a variable of type <code>[]byte</code> or <code>string</code> with the contents of this file. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | None |
70-
| <a id="go_embed_data-srcs"></a>srcs | A list of files to embed. This cannot be used at the same time as <code>src</code>. The generated file will have a variable of type <code>map[string][]byte</code> or <code>map[string]string</code> with the contents of each file. The map keys are relative paths of the files from the repository root. Keys for files in external repositories will be prefixed with <code>"external/repo/"</code> where "repo" is the name of the external repository. | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | [] |
71-
| <a id="go_embed_data-string"></a>string | If <code>True</code>, the embedded data will be stored as <code>string</code> instead of <code>[]byte</code>. | Boolean | optional | False |
72-
| <a id="go_embed_data-unpack"></a>unpack | If <code>True</code>, sources are treated as archives and their contents will be stored. Supported formats are <code>.zip</code> and <code>.tar</code> | Boolean | optional | False |
73-
| <a id="go_embed_data-var"></a>var | Name of the variable that will contain the embedded data. | String | optional | "Data" |
74-
75-
7631
<a id="gomock"></a>
7732

7833
## gomock

extras/BUILD.bazel

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,6 @@ filegroup(
1313
visibility = ["//visibility:public"],
1414
)
1515

16-
bzl_library(
17-
name = "bindata",
18-
srcs = ["bindata.bzl"],
19-
visibility = ["//visibility:public"],
20-
deps = ["@io_bazel_rules_go//go:def"],
21-
)
22-
23-
bzl_library(
24-
name = "embed_data",
25-
srcs = ["embed_data.bzl"],
26-
visibility = ["//visibility:public"],
27-
deps = [
28-
"//go/private:context",
29-
"//go/private:go_toolchain",
30-
],
31-
)
32-
33-
bzl_library(
34-
name = "embed_data_deps",
35-
srcs = ["embed_data_deps.bzl"],
36-
visibility = ["//visibility:public"],
37-
# Don't list dependency on @bazel_tools//tools/build_defs/repo.bzl
38-
deps = [], # keep
39-
)
40-
4116
bzl_library(
4217
name = "gomock",
4318
srcs = ["gomock.bzl"],

extras/bindata.bzl

Lines changed: 0 additions & 87 deletions
This file was deleted.

extras/embed_data.bzl

Lines changed: 0 additions & 146 deletions
This file was deleted.

0 commit comments

Comments
 (0)