facebook / facebook/flow

Flow declarations requires server restart to fix library parse errors

Open
#2,789 3 comments 2 reactions 0 assignees View on GitHub
declarations
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Flow @0.34.0

Reproduce:
1- do anything that will cause a library parse error (typo, etc). Flow will return "unexpected token"
2- Fix said error, delete said line, do anything... flow will always return same error on same line

Example:
Working declare:
`declare var CONF : Object;`

Break declares:
`declare var CONF: Object;

declare class Error;`

Flow returns `Unexpected token ;: flow-decls/flow-declare.js:4`

Fix error:
`declare var CONF: Object;

declare class Error {

}`

Flow returns `Unexpected token ;: flow-decls/flow-declare.js:4`

Delete lines, leaving us with original:
`declare var CONF : Object;`

Flow returns `Unexpected token ;: flow-decls/flow-declare.js:4`

calling:
`$flow stop
$flow start`
eliminates error.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.