Skip to content

Latest commit

 

History

History
90 lines (68 loc) · 3.89 KB

deprecated.rst

File metadata and controls

90 lines (68 loc) · 3.89 KB

Deprecated functionality

Anything listed in here is functionality that is no longer supported, and will be removed in a future version. Where possible these functions will also nag you to remove them during the build.

The functionality of this was rolled into go_repository quite a while ago, it has been a straight alias for a few releases, so converting is guaranteed to work. We will be removing the alias in the near future.

There are two rules of the same name. This is specifically about the one in "@io_bazel_rules_go//proto:go_proto_library.bzl" which use mechanisms that are not longer supported and not as flexible as the one you load from "@io_bazel_rules_go//proto:def.bzl" which is documented here.

The new mechanism is very different from the old one, and converting is a non trivial task, but there are no features of the old system that are not supported by the new one.

The only significant issue you might hit during conversion is that you really need the option go_package stanza in your proto files now.

Use go_library with cgo = True instead.

All the functionality of cgo_library was subsumed by a normal go_library. There are no missing features that we know of, and converting is as simple as switching the rule to go_library and adding the cgo parameter with a value of True. As such there is no reason not to switch, and we will be deleting the rule in the very near future.

This is a compatability wrapper from before toolchain registration was separated from dependency loading. This was done because go_register_toolchains is a long term api that the user may want to interfere with or not call, whereas go_rules_dependencies is an API that you should always call but will one day be superseded by nested workspaces.

go_rules_dependencies()
go_register_toolchains()

This is a legacy from when the import path for a go_library was determined from the root go_prefix and the path from the workspace root. Now instead we have every single go_library know it's own import path. We currently maintain this rule for backwards compatability, but we expect to have it removed well before 1.0. See #721.

This declares the common prefix of the import path which is shared by all Go libraries in the repository. A go_prefix rule must be declared in the top-level BUILD file for any repository containing Go rules. This is used by the Bazel rules during compilation to map import paths to dependencies. See the |go_prefix_faq|_ for more information.

Name Type Default value
prefix string mandatory value
Global prefix used to fully qualify all Go targets.