aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/docs/external.md
diff options
context:
space:
mode:
authorGravatar Akira Baruah <akira.baruah@gmail.com>2017-11-23 02:12:58 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-11-23 02:15:09 -0800
commit61df7eeaf55dee34e30f29627a6f2539f5f6a9a5 (patch)
tree97c087a98b899ac45a3d09d44d5784aa34bbef73 /site/docs/external.md
parentaaad7e42e325a1cc84a43b797030b5964cb93ef5 (diff)
Use valid name for local_repository example in external project docs
Addresses #4018 Closes #4020. PiperOrigin-RevId: 176750087
Diffstat (limited to 'site/docs/external.md')
-rw-r--r--site/docs/external.md10
1 files changed, 6 insertions, 4 deletions
diff --git a/site/docs/external.md b/site/docs/external.md
index aa3037f7b4..652e72de32 100644
--- a/site/docs/external.md
+++ b/site/docs/external.md
@@ -71,13 +71,15 @@ BUILD files. You would add the following to `my_project/WORKSPACE`:
```python
local_repository(
- name = "coworkers-project",
+ name = "coworkers_project",
path = "/path/to/coworkers-project",
)
```
If your coworker has a target `//foo:bar`, your project can refer to it as
-`@coworkers-project//foo:bar`.
+`@coworkers_project//foo:bar`. External project names must be
+[valid workspace names](be/functions.html#workspace), so `_` (valid) is used to
+replace `-` (invalid) in the name `coworkers_project`.
<a name="non-bazel-projects"></a>
### Depending on non-Bazel projects
@@ -95,7 +97,7 @@ it generates. To do so, add the following to `my_project/WORKSPACE`:
```python
new_local_repository(
- name = "coworkers-project",
+ name = "coworkers_project",
path = "/path/to/coworkers-project",
build_file = "coworker.BUILD",
)
@@ -112,7 +114,7 @@ java_library(
)
```
-You can then depend on `@coworkers-project//:some-lib` from your project's BUILD
+You can then depend on `@coworkers_project//:some-lib` from your project's BUILD
files.
<a name="external-packages"></a>