diff options
author | Klaus Aehlig <aehlig@google.com> | 2018-05-30 05:17:58 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-05-30 05:18:58 -0700 |
commit | 99a7c444bdccb07beb457fb11c47214da2601d33 (patch) | |
tree | 78a8ece1c7601c563226d4b5e88bdb00a6a6a816 /site | |
parent | 5b1ce4d5d7568ecacf02c63c30a9cc7ce7ef24d3 (diff) |
Provide more details on the transition to Skylark {git,http}_repository
In the description of incompatible changes, provide more information on the how
to transition to the Skylark versions of the deprecated native rules.
Change-Id: I30c6ee6560a4aed0d6d8356b00e6c1afec460f22
PiperOrigin-RevId: 198544104
Diffstat (limited to 'site')
-rw-r--r-- | site/docs/skylark/backward-compatibility.md | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/site/docs/skylark/backward-compatibility.md b/site/docs/skylark/backward-compatibility.md index d6a753fe76..f6fe1e51f8 100644 --- a/site/docs/skylark/backward-compatibility.md +++ b/site/docs/skylark/backward-compatibility.md @@ -241,13 +241,18 @@ This flag disables certain deprecated resource fields on ### Remove native git repository -When set, the native `git_repository` rule is disabled. The Skylark version +When set, the native `git_repository` and `new_git_repository` rules are +disabled. The Skylark versions ```python -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") +load("@bazel_tools//tools/build_defs/repo:git.bzl", + "git_repository", "new_git_repository") ``` -should be used instead. +should be used instead. These are drop-in replacements of the corresponding +native rules, however with the additional requirement that all label arguments +be provided as a fully qualified label (usually starting with `@//`), +for example: `build_file = "@//third_party:repo.BUILD"`. * Flag: `--incompatible_remove_native_git_repository` * Default: `false` @@ -255,13 +260,20 @@ should be used instead. ### Remove native http archive -When set, the native `http_archive` rule is disabled. The skylark version +When set, the native `http_archive` and all related rules are disabled. +The Skylark version ```python load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") ``` -should be used instead. +should be used instead. This is a drop-in replacement, however with the +additional requirement that all label arguments be provided as +fully qualified labels (usually starting with `@//`). The Skylark `http_archive` +is also a drop-in replacement for the native `new_http_archive` (with +the same proviso). `http.bzl` also +provides `http_jar` and `http_file` (the latter only supports the `urls` +parameter, not `url`). * Flag: `--incompatible_remove_native_http_archive` * Default: `false` |