Skip to content

Commit

Permalink
pin "classic" roots to v0.140
Browse files Browse the repository at this point in the history
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
panagosg7 authored and facebook-github-bot committed Jan 5, 2021
1 parent b043669 commit a38ec3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions javascript/.flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
types_first=false

[strict]

[version]
^0.140.0
3 changes: 3 additions & 0 deletions website/.flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
types_first=false

[strict]

[version]
^0.140.0

0 comments on commit a38ec3d

Please sign in to comment.