Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information