From a38ec3d7a493c5497016d4d1b4e05b89cf5d6f65 Mon Sep 17 00:00:00 2001 From: Panagiotis Vekris Date: Mon, 4 Jan 2021 21:05:07 -0800 Subject: [PATCH] pin "classic" roots to v0.140 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: In Flow v0.143 types-first will become the only supported mode in Flow. As such the `types_first` configuration option will become invalid. To prevent breaking roots that have `types_first=false` set and are **unversioned**, this diff pins their version to v0.140, which is the last released version in fbsource. ## Repro First compute the list of all `.flowconfig`s: ``` zbgf '.flowconfig$' | grep -v '^fbsource/fbcode/flow' | grep -v 'Binary file' | awk -F':' '{ print $1 }' | sort -u > all-flowconfigs.txt ``` Compute `.flowconfig`s that don’t have a version: ``` zbgs -f '\.flowconfig' '[version]' | grep -v '^fbsource/fbcode/flow' | grep -v 'Binary file' | awk -F':' '{ print $1 }' | sort -u > versioned-flowconfigs.txt comm -23 all-flowconfigs.txt versioned-flowconfigs.txt > unversioned-flowconfigs.txt ``` Compute `.flowconfig`s that have `types_first=false`: ``` zbgr -f '\.flowconfig' '^types_first=false$' | grep -v '^fbsource/fbcode/flow' | grep -v 'Binary file' | awk -F':' '{ print $1 }' | sort -u > types_first-false-flowconfigs.txt ``` **and** no pinned version: ``` comm -12 unversioned-flowconfigs.txt types_first-false-flowconfigs.txt | grep 'fbsource' > pin-version-flowconfigs.txt ``` Update the `.flowconfig`s: ``` cat ~/scratch/flowconfigs/pin-version-flowconfigs-fbsource.txt | xargs -I{} bash -c 'printf "\n[version]\n^0.140.0\n" >> {}' ``` Reviewed By: mroch Differential Revision: D25771452 fbshipit-source-id: 876d6310e4e1aafb81d3ef3051f4e9e9e838a633 --- javascript/.flowconfig | 3 +++ website/.flowconfig | 3 +++ 2 files changed, 6 insertions(+) diff --git a/javascript/.flowconfig b/javascript/.flowconfig index 6a0c16ae..6bd402f8 100644 --- a/javascript/.flowconfig +++ b/javascript/.flowconfig @@ -10,3 +10,6 @@ types_first=false [strict] + +[version] +^0.140.0 diff --git a/website/.flowconfig b/website/.flowconfig index 6a0c16ae..6bd402f8 100644 --- a/website/.flowconfig +++ b/website/.flowconfig @@ -10,3 +10,6 @@ types_first=false [strict] + +[version] +^0.140.0