Clean up TODOs.
In this commit:
* buildenv.sh: restore its state to that as of
commit 511c35b46cead500d4e76706e0a709e50995ceba
* CommonCommandOptions.java: remove a deprecated
no-op flag
* WindowsPathFragment.java: implement an
ASCII-only isLetter function, use that instead
of Character.isLetter, because the latter
returns true for some Unicode characters too
* bazel_bootstrap_distfile_test: remove logging
that we no longer need, since the bugfix for
issue #3618 will be pushed to GitHub later today
Change-Id: Ibda70219e974f0c47bc82addc647d8951f4bd701
PiperOrigin-RevId: 171498977
diff --git a/scripts/bootstrap/buildenv.sh b/scripts/bootstrap/buildenv.sh
index cbb1365..9301483 100755
--- a/scripts/bootstrap/buildenv.sh
+++ b/scripts/bootstrap/buildenv.sh
@@ -161,9 +161,7 @@
local DIR="$(mktemp -d "${tmp%%/}/bazel_XXXXXXXX")"
mkdir -p "${DIR}"
local DIRBASE=$(basename "${DIR}")
- # TODO(laszlocsomor): Remove the "[ -n ... ] && echo ... ;" part from the
- # following command after we fixed https://github.com/bazelbuild/bazel/issues/3618.
- eval "cleanup_tempdir_${DIRBASE}() { [ -n \"\$TEST_TMPDIR\" ] && echo \"DEBUG[$0 (\$(date))] deleting ($DIR)\" ; rm -rf '${DIR}' >&/dev/null || true ; }"
+ eval "cleanup_tempdir_${DIRBASE}() { rm -rf '${DIR}' >&/dev/null || true ; }"
atexit cleanup_tempdir_${DIRBASE}
NEW_TMPDIR="${DIR}"
}
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
index 0800367..492cef9 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
@@ -154,20 +154,6 @@
)
public List<Map.Entry<String, String>> clientEnv;
- @Deprecated
- @Option(
- name = "ignore_client_env",
- defaultValue = "false",
- documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- metadataTags = {OptionMetadataTag.HIDDEN, OptionMetadataTag.DEPRECATED},
- effectTags = {OptionEffectTag.NO_OP},
- deprecationWarning = "Deprecated, no-op.",
- help = "Deprecated, no-op."
- )
- // TODO(laszlocsomor, dslomov) 2017-03-07: remove this flag after 2017-06-01 (~3 months from now)
- // and all of its occurrences.
- public boolean ignoreClientEnv;
-
@Option(
name = "client_cwd",
defaultValue = "",
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/WindowsPathFragment.java b/src/main/java/com/google/devtools/build/lib/vfs/WindowsPathFragment.java
index 4f94535..695282f 100644
--- a/src/main/java/com/google/devtools/build/lib/vfs/WindowsPathFragment.java
+++ b/src/main/java/com/google/devtools/build/lib/vfs/WindowsPathFragment.java
@@ -56,11 +56,14 @@
// primary separator char and do not use this.
private static final char EXTRA_SEPARATOR_CHAR = '\\';
+ private static boolean isDriveLetter(char c) {
+ return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
+ }
+
@Override
PathFragment create(String path) {
- // TODO(laszlocsomor): Character#isLetter returns true for some non ASCII characters.
char driveLetter =
- path.length() >= 2 && path.charAt(1) == ':' && Character.isLetter(path.charAt(0))
+ path.length() >= 2 && path.charAt(1) == ':' && isDriveLetter(path.charAt(0))
? Character.toUpperCase(path.charAt(0))
: '\0';
if (driveLetter != '\0') {
diff --git a/src/main/native/BUILD b/src/main/native/BUILD
index ad60099..b2f6536 100644
--- a/src/main/native/BUILD
+++ b/src/main/native/BUILD
@@ -85,9 +85,6 @@
visibility = ["//src:__pkg__"],
)
-# TODO(laszlocsomor): move the common parts needed both by the Windows JNI lib
-# and the Bazel client into a separate library, and only copy those to the
-# embedded tools folder.
filegroup(
name = "embedded_tools",
srcs = glob(["*.cc"]) + glob(["*.h"]) + [
diff --git a/src/test/shell/bazel/bazel_bootstrap_distfile_test.sh b/src/test/shell/bazel/bazel_bootstrap_distfile_test.sh
index 62a7ceb..2820eaa 100755
--- a/src/test/shell/bazel/bazel_bootstrap_distfile_test.sh
+++ b/src/test/shell/bazel/bazel_bootstrap_distfile_test.sh
@@ -30,43 +30,17 @@
source $(rlocation io_bazel/src/test/shell/integration_test_setup.sh) \
|| { echo "integration_test_setup.sh not found!" >&2; exit 1; }
-function log_progress() {
- # TODO(laszlocsomor): remove this method after we fixed
- # https://github.com/bazelbuild/bazel/issues/3618. I added this method only to
- # catch that bug.
- echo "DEBUG[$(basename "$0") $(date)] test_bootstrap, $@"
-}
-
function test_bootstrap() {
local olddir=$(pwd)
WRKDIR=$(mktemp -d ${TEST_TMPDIR}/bazelbootstrap.XXXXXXXX)
- log_progress "WRKDIR=($WRKDIR)"
- log_progress "TMP=(${TMP:-})"
- log_progress "TEMP=(${TEMP:-})"
- log_progress "TMPDIR=(${TMPDIR:-})"
- log_progress "TEST_TMPDIR=(${TEST_TMPDIR:-})"
- log_progress "DISTFILE=(${DISTFILE:-})"
mkdir -p "${WRKDIR}" || fail "Could not create workdir"
trap "rm -rf \"$WRKDIR\"" EXIT
cd "${WRKDIR}" || fail "Could not change to work directory"
unzip -q "${DISTFILE}"
- log_progress "unzipped DISTFILE"
find . -type f -exec chmod u+w {} \;
- log_progress "running compile.sh"
./compile.sh || fail "Expected to be able to bootstrap bazel"
- log_progress "done running compile.sh, WRKDIR contains this many files: $(find "$WRKDIR" -type f | wc -l || echo "(command failed)")"
- log_progress "running bazel info install_base"
- # TODO(laszlocsomor): remove the "bazel info install_base" call at the same
- # time as removing log_progress, i.e. after we fixed
- # https://github.com/bazelbuild/bazel/issues/3618
- ./output/bazel info install_base || fail "Generated bazel not working"
- log_progress "done running bazel info install_base, WRKDIR contains this many files: $(find "$WRKDIR" -type f | wc -l || echo "(command failed)")"
- log_progress "running bazel info version"
./output/bazel version || fail "Generated bazel not working"
- log_progress "done running bazel version, WRKDIR contains this many files: $(find "$WRKDIR" -type f | wc -l || echo "(command failed)")"
- log_progress "running bazel shutdown"
./output/bazel shutdown
- log_progress "done running bazel shutdown"
cd "${olddir}"
}