Skip to content

Commit

Permalink
Move --distdir out of experimental status
Browse files Browse the repository at this point in the history
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: bazelbuild#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 3c9cd82
[2] https://github.com/gentoo/gentoo/blob/7379cdb578b0c070c846c3fa9f71470e2c5d1320/sci-libs/tensorflow/tensorflow-1.8.0-r1.ebuild#L168

Change-Id: I536238f9bdbad6b4f7222b4f6a1464d70d9f3be3
PiperOrigin-RevId: 199637265
  • Loading branch information
aehlig authored and George Gensure committed Aug 2, 2018
1 parent 74fa9d4 commit 5a4c3bc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion scripts/bootstrap/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions src/test/shell/bazel/external_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down Expand Up @@ -1399,7 +1399,7 @@ genrule(
EOF

bazel clean --expunge
bazel build --experimental_distdir="../distfiles" //:local \
bazel build --distdir="../distfiles" //:local \
|| fail "expected success"
}

Expand Down

0 comments on commit 5a4c3bc

Please sign in to comment.