From d59570358b8fbbd6595c20d3169369df4a7989bb Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 7 Jun 2018 08:18:00 -0700 Subject: 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 --- scripts/bootstrap/bootstrap.sh | 2 +- .../lib/bazel/repository/RepositoryOptions.java | 22 +++++++++++----------- src/test/shell/bazel/external_integration_test.sh | 4 ++-- 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 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" } -- cgit v1.2.3