aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2018-06-07 08:18:00 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-06-07 08:19:22 -0700
commitd59570358b8fbbd6595c20d3169369df4a7989bb (patch)
treed606a69cfaa6e21d6fa84b88c5b8fbdd4202fa81
parent71d0f6ca22419d928078ba3eb6fecfc80043e018 (diff)
Move --distdir out of experimental status
The option --experimental_distdir has been introduced 4 months ago and was completely unproblematic ever since. Moreover, it is now used productively, both in our own bootstrapping process[1], as well as in external packaging of projects using bazel[2]. So make this option non-experimental. We still keep the old name as an alternative to not break existing uses. Related: #5175. RELNOTES: The --distdir option is no longer experimental. This option allows to specify additional directories to look for files before trying to fetch them from the network. Files from any of the distdirs are only used if a checksum for the file is specified and both, the filename and the checksum, match. [1] Commit 3c9cd82b847f3ece8ec04b2029bd5e8ad0eb7502 [2] https://github.com/gentoo/gentoo/blob/7379cdb578b0c070c846c3fa9f71470e2c5d1320/sci-libs/tensorflow/tensorflow-1.8.0-r1.ebuild#L168 Change-Id: I536238f9bdbad6b4f7222b4f6a1464d70d9f3be3 PiperOrigin-RevId: 199637265
-rwxr-xr-xscripts/bootstrap/bootstrap.sh2
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java22
-rwxr-xr-xsrc/test/shell/bazel/external_integration_test.sh4
3 files changed, 14 insertions, 14 deletions
diff --git a/scripts/bootstrap/bootstrap.sh b/scripts/bootstrap/bootstrap.sh
index 260e6ddc61..4a86dae13d 100755
--- a/scripts/bootstrap/bootstrap.sh
+++ b/scripts/bootstrap/bootstrap.sh
@@ -37,7 +37,7 @@ _BAZEL_ARGS="--java_toolchain=//src/java_tools/buildjar:bootstrap_toolchain \
--nojava_header_compilation \
--strategy=Javac=worker --worker_quit_after_build --ignore_unsupported_sandboxing \
--compilation_mode=opt \
- --experimental_distdir=derived/distdir \
+ --distdir=derived/distdir \
${EXTRA_BAZEL_ARGS:-}"
if [ -z "${BAZEL-}" ]; then
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java
index 6e9954ddfd..d3ced966e2 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java
@@ -47,17 +47,17 @@ public class RepositoryOptions extends OptionsBase {
public PathFragment experimentalRepositoryCache;
@Option(
- name = "experimental_distdir",
- defaultValue = "null",
- allowMultiple = true,
- documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS,
- effectTags = {OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION},
- metadataTags = {OptionMetadataTag.EXPERIMENTAL},
- converter = OptionsUtils.PathFragmentConverter.class,
- help =
- "Additional places to search for archives before accessing the network "
- + "to download them."
- )
+ name = "distdir",
+ oldName = "experimental_distdir",
+ defaultValue = "null",
+ allowMultiple = true,
+ documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS,
+ effectTags = {OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION},
+ metadataTags = {OptionMetadataTag.EXPERIMENTAL},
+ converter = OptionsUtils.PathFragmentConverter.class,
+ help =
+ "Additional places to search for archives before accessing the network "
+ + "to download them.")
public List<PathFragment> experimentalDistdir;
@Option(
diff --git a/src/test/shell/bazel/external_integration_test.sh b/src/test/shell/bazel/external_integration_test.sh
index 6557f851f3..5c93100e64 100755
--- a/src/test/shell/bazel/external_integration_test.sh
+++ b/src/test/shell/bazel/external_integration_test.sh
@@ -1355,7 +1355,7 @@ genrule(
EOF
bazel clean --expunge
- bazel build --experimental_distdir="${WRKDIR}/distfiles" //:local \
+ bazel build --distdir="${WRKDIR}/distfiles" //:local \
|| fail "expected success"
}
@@ -1399,7 +1399,7 @@ genrule(
EOF
bazel clean --expunge
- bazel build --experimental_distdir="../distfiles" //:local \
+ bazel build --distdir="../distfiles" //:local \
|| fail "expected success"
}