Use Flow server for local development (#2245)

Summary:
`flow check` runs a complete Flow check.
This is good for CI, but it means every re-check after edit is as slow as first check.

I'm changing local `yarn flow` to use a Flow server instead. This should speed up rechecks locally somewhat. Still won't save us from large recheck cycles, but at least we're not starting from a clean slate every time.

I'm adding `yarn flow-ci` with old behavior for the CI.

Finally, I replaced `--merge-timeout` with an equivalent recently added config option. This ensures it's respected both for the server and for the full check. Without it, the server dies.
Pull Request resolved: https://github.com/facebook/prepack/pull/2245

Differential Revision: D8891234

Pulled By: gaearon

fbshipit-source-id: 2c309a1718ed00ca5839cb3a586386e3e779f029
This commit is contained in:
Dan Abramov 2018-07-18 06:25:26 -07:00 committed by Facebook Github Bot
parent 6e60644e12
commit bdbce00f53
3 changed files with 4 additions and 2 deletions

View File

@ -92,5 +92,5 @@ jobs:
command: |
yarn prettier-ci
yarn lint
yarn flow
yarn flow-ci
yarn depcheck

View File

@ -16,6 +16,7 @@ babel.config.js
flow-libs
[options]
merge_timeout=0
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable

View File

@ -29,7 +29,8 @@
"build-prepack": "babel src --out-dir lib --source-maps",
"watch": "babel src scripts --out-dir lib --watch --source-maps --verbose",
"lint": "eslint src scripts",
"flow": "flow version; flow check --merge-timeout 0",
"flow": "flow",
"flow-ci": "flow version; flow check",
"test-residual": "babel-node scripts/test-residual.js",
"test-residual-with-coverage": "./node_modules/.bin/istanbul cover ./lib/test-residual.js --dir coverage.residual && ./node_modules/.bin/remap-istanbul -i coverage.residual/coverage.json -o coverage-sourcemapped.residual -t html",
"test-serializer": "babel-node --stack_trace_limit=200 --stack_size=10000 scripts/test-runner.js",