From bb93abf5ca24cf3d24159fed0532871b055e5ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ramos?= Date: Mon, 29 Oct 2018 08:44:02 -0700 Subject: [PATCH] Fix checkout_code: Remove Metro cache check (#21998) Summary: This was a specific check that was prone to break at some point. That time has come. Removing it as it is not providing any useful signal. Pull Request resolved: https://github.com/facebook/react-native/pull/21998 Differential Revision: D12823839 Pulled By: hramos fbshipit-source-id: e870670d7803af78c4559052613ea364ce1478df --- .circleci/config.yml | 1 - scripts/circleci/check_cache.sh | 30 ------------------------------ 2 files changed, 31 deletions(-) delete mode 100755 scripts/circleci/check_cache.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 7f94a6138c8..89fe32f77d4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -197,7 +197,6 @@ aliases: name: Sanity checks command: | ./scripts/circleci/check_license.sh - ./scripts/circleci/check_cache.sh ./scripts/circleci/validate_yarn_lockfile.sh when: always diff --git a/scripts/circleci/check_cache.sh b/scripts/circleci/check_cache.sh deleted file mode 100755 index a0378b4005c..00000000000 --- a/scripts/circleci/check_cache.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -set -e - -# Make sure we don't accidentally restore a cache that contains the Metro -# filename issue that was fixed in Metro 0.25, originally introduced in -# D6752278. Once fixed, this was causing sporadic failures in the iOS -# and tvOS workflows as the issue persisted in the cached node_modules -# -# The filename issue can be summarized as follows: -# A version of Metro was published to npm with HmrClient.js and -# HmrClient.js.flow files, while the repo contains HMRClient.js and -# HMRClient.js.flow. This was due to a case issue in the publisher's -# host machine. -# The issue this is checking for is manifested by the presence of all -# of the following files: HmrClient.js, HMRClient.js, HmrClient.js.flow, -# HMRClient.js.flow. - -EXPECTED='1' -ACTUAL=$(ls node_modules/metro/src/lib/bundle-modules/*.js | xargs | awk '{print tolower($0)}' | tr ' ' '\n' | grep hmrclient.js | wc -l | tr -d '[:space:]') - -if [ "$EXPECTED" != "$ACTUAL" ]; then - echo "HmrClient.js crept into the cache?" - echo $(ls node_modules/metro/src/lib/bundle-modules/H*lient.js) - exit 1 -fi