diff --git a/docs/go/extras/extras.md b/docs/go/extras/extras.md index 1548b19fff..8a6b984ebe 100644 --- a/docs/go/extras/extras.md +++ b/docs/go/extras/extras.md @@ -40,6 +40,8 @@ This rule has moved. See [gazelle rule] in the Gazelle repository. go_embed_data(name, flatten, package, src, srcs, string, unpack, var) +**Deprecated**: Will be removed in rules_go 0.39. + `go_embed_data` generates a .go file that contains data from a file or a list of files. It should be consumed in the srcs list of one of the [core go rules]. diff --git a/extras/bindata.bzl b/extras/bindata.bzl index c0e0e4f8fe..06cd054c6f 100644 --- a/extras/bindata.bzl +++ b/extras/bindata.bzl @@ -24,6 +24,7 @@ load( ) def _bindata_impl(ctx): + print("Embedding is now better handled by using rules_go's built-in embedding functionality (https://github.com/bazelbuild/rules_go/blob/master/docs/go/core/rules.md#go_library-embedsrcs). The `bindata` rule is deprecated and will be removed in rules_go version 0.39.") go = go_context(ctx) out = go.declare_file(go, ext = ".go") arguments = ctx.actions.args() diff --git a/extras/embed_data.bzl b/extras/embed_data.bzl index 700701d4ae..212c4d50cc 100644 --- a/extras/embed_data.bzl +++ b/extras/embed_data.bzl @@ -21,7 +21,9 @@ load( "GO_TOOLCHAIN", ) -_DOC = """`go_embed_data` generates a .go file that contains data from a file or a +_DOC = """**Deprecated**: Will be removed in rules_go 0.39. + +`go_embed_data` generates a .go file that contains data from a file or a list of files. It should be consumed in the srcs list of one of the [core go rules]. @@ -38,7 +40,7 @@ go_embed_data_dependencies() """ def _go_embed_data_impl(ctx): - print("Embedding is now better handled by using rules_go's built in https://github.com/bazelbuild/rules_go/blob/master/docs/go/core/embedding.md functionality. The `bindata` rule is deprecated and will be removed in rules_go version 0.35.") + print("Embedding is now better handled by using rules_go's built-in embedding functionality (https://github.com/bazelbuild/rules_go/blob/master/docs/go/core/rules.md#go_library-embedsrcs). The `go_embed_data` rule is deprecated and will be removed in rules_go version 0.39.") go = go_context(ctx) if ctx.attr.src and ctx.attr.srcs: diff --git a/extras/embed_data_deps.bzl b/extras/embed_data_deps.bzl index 0e0acf3150..1e2d6e8844 100644 --- a/extras/embed_data_deps.bzl +++ b/extras/embed_data_deps.bzl @@ -20,6 +20,8 @@ load( ) def go_embed_data_dependencies(): + print("Embedding is now better handled by using rules_go's built-in embedding functionality (https://github.com/bazelbuild/rules_go/blob/master/docs/go/core/rules.md#go_library-embedsrcs). The `go_embed_data_dependencies` macro is deprecated and will be removed in rules_go version 0.39.") + if "com_github_kevinburke_go_bindata" not in native.existing_rules(): git_repository( name = "com_github_kevinburke_go_bindata",