Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow errors do not update on edit (in Windows?) #372

Open
robpc opened this issue Dec 17, 2019 · 3 comments
Open

Flow errors do not update on edit (in Windows?) #372

robpc opened this issue Dec 17, 2019 · 3 comments

Comments

@robpc
Copy link

robpc commented Dec 17, 2019

Problem

Flow errors do not update on edit (in Windows?)

Configuration

Flow Language Support Version: 1.5.0 (2019-09-09)

VSCode About

Version: 1.41.0 (user setup)
Commit: 9579eda04fdb3a9bba2750f15193e5fafe16b959
Date: 2019-12-11T18:37:42.077Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18362

Example

> mkdir vscode-test
> cd vscode-test
> npm init -y 
> echo "" > .flowconfig
> code .

Disabled the builting plugin TypeScript and JavaScript Language Features

./index.js

// @flow

const n = 5;

const f = (n: string) => n + 1

console.log(f(n));

Testing

I tested the above file by removing an adding the type to the function parameter. When adding the type it, the error would not appear until I saved. When removing it would not remove it until I saved.

I tried this with the bundled flow.

[Error - 11:15:12 AM - vscode-test\.flowconfig] Error loading flow using option 'useNPMPackagedFlow'
Pkg flow-bin not found in c:\Users\rpcan\project\vscode-test
[Error - 11:15:12 AM - vscode-test\.flowconfig] Error loading flow using option 'pathToFlow'
'flow' not found
[Info  - 11:15:12 AM - vscode-test\.flowconfig] Falling back to bundled flow.
[Info  - 11:15:12 AM - vscode-test\.flowconfig] Using flow 'C:\Users\rpcan\.vscode\extensions\flowtype.flow-for-vscode-1.5.0\node_modules\flow-bin\flow-win64-v0.107.0\flow.exe' (v0.107.0)
Launching Flow server for C:\Users\rpcan\project\vscode-test
Spawned flow server (pid=33612)
Logs will go to C:\Users\rpcan\AppData\Local\Temp\flow\CzCzBUserszBrpcanzBprojectzBvscode-test.log
Monitor logs will go to C:\Users\rpcan\AppData\Local\Temp\flow\CzCzBUserszBrpcanzBprojectzBvscode-test.monitor_log
[Info  - 11:15:13 AM] Starting Flow server

And with flow-bin

> npm install -D flow-bin

and the output

[Info  - 1:18:24 PM - vscode-test\.flowconfig] Found flow using option `useNPMPackagedFlow`
[Info  - 1:18:24 PM - vscode-test\.flowconfig] Using flow 'c:\Users\rpcan\project\vscode-test\node_modules\flow-bin\flow-win64-v0.114.0\flow.exe' (v0.114.0)
Launching Flow server for C:\Users\rpcan\project\vscode-test
Spawned flow server (pid=8332)
Logs will go to C:\Users\rpcan\AppData\Local\Temp\flow\CzCzBUserszBrpcanzBprojectzBvscode-test.log
Monitor logs will go to C:\Users\rpcan\AppData\Local\Temp\flow\CzCzBUserszBrpcanzBprojectzBvscode-test.monitor_log
[Info  - 1:18:26 PM] Starting Flow server

Given the simplicity of this example I feel like there is a strong possibility I must be doing something wrong, but I can't figure out what.

@robpc
Copy link
Author

robpc commented Jan 4, 2020

I have been still trying to get this to work and tried a couple things:

  1. unchecking useLSP in the extension settings, reloading the client, and checking it again gets it to work briefly but ends up with the "Server is busy" message eventually.
  2. tried removing the extension and restarting and then reinstalling, but didn't have any effect
  3. updated flow-bin to 0.115.0 with no effect.

@isral
Copy link

isral commented Sep 7, 2021

Encountered same problem.
I use default settings (run on edit checked).
I installed flow-bin to create .flowconfig: npm install -g flow-bin

Flow Language support v1.9.1
VS Code: 1.60.0 (system setup)
Node.js: 14.16.0
OS: Windows 10.0.19043

@vidongls
Copy link

Encountered same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants