aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google
diff options
context:
space:
mode:
authorGravatar Eric Dobson <endobson@google.com>2017-09-05 12:26:44 +0200
committerGravatar Yun Peng <pcloudy@google.com>2017-09-05 14:58:34 +0200
commit01ebfea41d10f3fd941ed345ff6a23aa002340c4 (patch)
treeb6dea797c6d2d774df29442b50d6b23493270eb7 /src/main/java/com/google
parent4ec7463a663a0be18d96a3b7a87dbcc79fbb6130 (diff)
Add closing paren to documentation on workspace rules.
Also moves parenthetical remark to a completely different sentence, as it seemed off where it was. Closes #3657. PiperOrigin-RevId: 167558504
Diffstat (limited to 'src/main/java/com/google')
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/NewGitRepositoryRule.java26
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/NewHttpArchiveRule.java66
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/repository/NewLocalRepositoryRule.java8
3 files changed, 50 insertions, 50 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/NewGitRepositoryRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/NewGitRepositoryRule.java
index 37246c5515..55e9bbb658 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/NewGitRepositoryRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/NewGitRepositoryRule.java
@@ -57,8 +57,8 @@ public class NewGitRepositoryRule implements RuleDefinition {
<p>Either build_file or build_file_content must be specified.</p>
<p>This attribute is a label relative to the main workspace. The file does not need to be
- named BUILD, but can be (something like BUILD.new-repo-name may work well for
- distinguishing it from the repository's actual BUILD files.</p>
+ named BUILD, but can be. (Something like BUILD.new-repo-name may work well for
+ distinguishing it from the repository's actual BUILD files.)</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("build_file", STRING))
/* <!-- #BLAZE_RULE(new_git_repository).ATTRIBUTE(build_file_content) -->
@@ -73,8 +73,8 @@ public class NewGitRepositoryRule implements RuleDefinition {
<p>Either workspace_file or workspace_file_content can be specified, but not both.</p>
<p>This attribute is a label relative to the main workspace. The file does not need to be
- named WORKSPACE, but can be (something like WORKSPACE.new-repo-name may work well for
- distinguishing it from the repository's actual WORKSPACE files.</p>
+ named WORKSPACE, but can be. (Something like WORKSPACE.new-repo-name may work well for
+ distinguishing it from the repository's actual WORKSPACE files.)</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("workspace_file", STRING))
/* <!-- #BLAZE_RULE(new_http_archive).ATTRIBUTE(workspace_file_content) -->
@@ -90,15 +90,15 @@ public class NewGitRepositoryRule implements RuleDefinition {
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("init_submodules", BOOLEAN).value(false))
/* <!-- #BLAZE_RULE(new_git_repository).ATTRIBUTE(sha256) -->
- The expected SHA-256 hash of the file downloaded. Specifying this forces the repository to
- be downloaded as a tarball. Currently, this is only supported for public GitHub
- repositories.
-
- <p>This must match the SHA-256 hash of the file downloaded. <em>It is a security risk to
- omit the SHA-256 as remote files can change.</em> At best omitting this field will make
- your build non-hermetic. It is optional to make development easier but should be set
- before shipping.</p>
- <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
+ The expected SHA-256 hash of the file downloaded. Specifying this forces the repository to
+ be downloaded as a tarball. Currently, this is only supported for public GitHub
+ repositories.
+
+ <p>This must match the SHA-256 hash of the file downloaded. <em>It is a security risk to
+ omit the SHA-256 as remote files can change.</em> At best omitting this field will make
+ your build non-hermetic. It is optional to make development easier but should be set
+ before shipping.</p>
+ <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("sha256", STRING))
.setWorkspaceOnly()
.build();
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/NewHttpArchiveRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/NewHttpArchiveRule.java
index e9c7b78461..97dd5d3a2c 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/NewHttpArchiveRule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/workspace/NewHttpArchiveRule.java
@@ -48,13 +48,13 @@ public class NewHttpArchiveRule implements RuleDefinition {
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("urls", STRING_LIST))
/* <!-- #BLAZE_RULE(new_http_archive).ATTRIBUTE(sha256) -->
- The expected SHA-256 hash of the file downloaded.
+ The expected SHA-256 hash of the file downloaded.
- <p>This must match the SHA-256 hash of the file downloaded. <em>It is a security risk to
- omit the SHA-256 as remote files can change.</em> At best omitting this field will make
- your build non-hermetic. It is optional to make development easier but should be set
- before shipping.</p>
- <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
+ <p>This must match the SHA-256 hash of the file downloaded. <em>It is a security risk to
+ omit the SHA-256 as remote files can change.</em> At best omitting this field will make
+ your build non-hermetic. It is optional to make development easier but should be set
+ before shipping.</p>
+ <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("sha256", STRING))
/* <!-- #BLAZE_RULE(new_http_archive).ATTRIBUTE(build_file) -->
The file to use as the BUILD file for this repository.
@@ -62,8 +62,8 @@ public class NewHttpArchiveRule implements RuleDefinition {
<p>Either build_file or build_file_content must be specified.</p>
<p>This attribute is a label relative to the main workspace. The file does not need to be
- named BUILD, but can be (something like BUILD.new-repo-name may work well for
- distinguishing it from the repository's actual BUILD files.</p>
+ named BUILD, but can be. (Something like BUILD.new-repo-name may work well for
+ distinguishing it from the repository's actual BUILD files.)</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("build_file", STRING))
/* <!-- #BLAZE_RULE(new_http_archive).ATTRIBUTE(build_file_content) -->
@@ -78,8 +78,8 @@ public class NewHttpArchiveRule implements RuleDefinition {
<p>Either workspace_file or workspace_file_content can be specified, but not both.</p>
<p>This attribute is a label relative to the main workspace. The file does not need to be
- named WORKSPACE, but can be (something like WORKSPACE.new-repo-name may work well for
- distinguishing it from the repository's actual WORKSPACE files.</p>
+ named WORKSPACE, but can be. (Something like WORKSPACE.new-repo-name may work well for
+ distinguishing it from the repository's actual WORKSPACE files.)</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("workspace_file", STRING))
/* <!-- #BLAZE_RULE(new_http_archive).ATTRIBUTE(workspace_file_content) -->
@@ -89,32 +89,32 @@ public class NewHttpArchiveRule implements RuleDefinition {
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("workspace_file_content", STRING))
/* <!-- #BLAZE_RULE(new_http_archive).ATTRIBUTE(type) -->
- The archive type of the downloaded file.
+ The archive type of the downloaded file.
- <p>By default, the archive type is determined from the file extension of the URL. If the
- file has no extension, you can explicitly specify one of the following: `"zip"`, `"jar"`,
- `"war"`, `"tar.gz"`, `"tgz"`, `"tar.xz"`, and `tar.bz2`</p>
- <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
+ <p>By default, the archive type is determined from the file extension of the URL. If the
+ file has no extension, you can explicitly specify one of the following: `"zip"`, `"jar"`,
+ `"war"`, `"tar.gz"`, `"tgz"`, `"tar.xz"`, and `tar.bz2`</p>
+ <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("type", STRING))
/* <!-- #BLAZE_RULE(new_http_archive).ATTRIBUTE(strip_prefix) -->
- A directory prefix to strip from the extracted files.
-
- <p>Many archives contain a top-level directory that contains all of the useful files in
- archive. Instead of needing to specify this prefix over and over in the
- <code>build_file</code>, this field can be used to strip it from all of the extracted
- files.</p>
-
- <p>For example, suppose you are using foo-lib-latest.zip, which contains the directory
- foo-lib-1.2.3/ under which there are src/, lib/, and test/ directories that contain the
- actual code you wish to build. Specify <code>strip_prefix = "foo-lib-1.2.3"</code> and
- your <code>build_file</code> will not have to account for this top-level directory.</p>
-
- <p>Note that if there are files outside of this directory, they will be discarded and
- inaccessible (e.g., a top-level license file). This includes files/directories that
- start with the prefix but are not in the directory (e.g., foo-lib-1.2.3.release-notes).
- If the specified prefix does not match a directory in the archive, Bazel will return an
- error.</p>
- <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
+ A directory prefix to strip from the extracted files.
+
+ <p>Many archives contain a top-level directory that contains all of the useful files in
+ archive. Instead of needing to specify this prefix over and over in the
+ <code>build_file</code>, this field can be used to strip it from all of the extracted
+ files.</p>
+
+ <p>For example, suppose you are using foo-lib-latest.zip, which contains the directory
+ foo-lib-1.2.3/ under which there are src/, lib/, and test/ directories that contain the
+ actual code you wish to build. Specify <code>strip_prefix = "foo-lib-1.2.3"</code> and
+ your <code>build_file</code> will not have to account for this top-level directory.</p>
+
+ <p>Note that if there are files outside of this directory, they will be discarded and
+ inaccessible (e.g., a top-level license file). This includes files/directories that
+ start with the prefix but are not in the directory (e.g., foo-lib-1.2.3.release-notes).
+ If the specified prefix does not match a directory in the archive, Bazel will return an
+ error.</p>
+ <!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("strip_prefix", STRING))
.setWorkspaceOnly()
.build();
diff --git a/src/main/java/com/google/devtools/build/lib/rules/repository/NewLocalRepositoryRule.java b/src/main/java/com/google/devtools/build/lib/rules/repository/NewLocalRepositoryRule.java
index 66f4608506..bee4534272 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/repository/NewLocalRepositoryRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/repository/NewLocalRepositoryRule.java
@@ -44,8 +44,8 @@ public class NewLocalRepositoryRule implements RuleDefinition {
<p>Either build_file or build_file_content must be specified.</p>
<p>This attribute is a label relative to the main workspace. The file does not need to be
- named BUILD, but can be (something like BUILD.new-repo-name may work well for
- distinguishing it from the repository's actual BUILD files.</p>
+ named BUILD, but can be. (Something like BUILD.new-repo-name may work well for
+ distinguishing it from the repository's actual BUILD files.)</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("build_file", STRING))
/* <!-- #BLAZE_RULE(new_local_repository).ATTRIBUTE(build_file_content) -->
@@ -60,8 +60,8 @@ public class NewLocalRepositoryRule implements RuleDefinition {
<p>Either workspace_file or workspace_file_content can be specified, but not both.</p>
<p>This attribute is a label relative to the main workspace. The file does not need to be
- named WORKSPACE, but can be (something like WORKSPACE.new-repo-name may work well for
- distinguishing it from the repository's actual WORKSPACE files.</p>
+ named WORKSPACE, but can be. (Something like WORKSPACE.new-repo-name may work well for
+ distinguishing it from the repository's actual WORKSPACE files.)</p>
<!-- #END_BLAZE_RULE.ATTRIBUTE --> */
.add(attr("workspace_file", STRING))
/* <!-- #BLAZE_RULE(new_http_archive).ATTRIBUTE(workspace_file_content) -->