-
Notifications
You must be signed in to change notification settings - Fork 112
[LSP] Add multi config & vscode multi-root workspace support #315
Conversation
vscode (>=1.30.0) already using node 8. So no point of transforming code using node 6. other changes - remove regenerator-runtime (node 8 supports async/await)
Client (closes flow#302, flow#308, flow#253, flow#228, flow#201, flow#195, flow#189, flow#184, flow#165, flow#81) - add multi flowconfig support - add vscode multi-root workspace support - client is now lazily created if flowconfig found - fix document selector. New implementation will handle following cases - Single workspace with multiple flowconfig - Multiple workspace with multiple flowconfig Get Flow-Bin - improve|fix logic to find flow-bin (fixes flow#282, flow#240, flow#209) - fix flow bundled with plugin not working issue: we are using .bin/flow but vscode never includes .bin in plugin package - add logs while finding flow-bin to debug issues - plugin now doesn't check for node (closes flow#290) - pathToFlow: value is normalized and .cmd is added so same value can be used for linux, osx & win Error handling (closes flow#200) - [feat] improve error handling. - [feat] Show action in errors so that user can recover from error without restarting vscode Commands - [feat] Add commands - Toggle coverage - Show client status - Restart Client - Log Client Debug Info - Show output channel Status Widget Include more info in status widget to help user know what this plugin is using - [feat] include flow version - [feat] add flow info section in widget tooltip which includes - path to .flowconfig - flow version - path to "flow" binary Settings - flow.coverageSeverity to control type coverage diagnostic severity - flow.useBundledFlow control use of flow bundled with this plugin - flow.trace.server log communication between vscode and flow lsp - flow.logLevel control log level of plugin logs
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Whoa this is so cool! I need to find some time to take a look at it. @orta have you seen this? |
Is it possible to know if this PR will be merged in the coming days ? Not being able to handle multi root workspaces in VSCode is a strong limitation for somebody (like me) who plans to use Flow. As far as I can see, it is even probably a strong limitation for using flow itself as most people use VSCode today. Il like the "flow" approach about static type checking. I would really like to give it a chance, but I must admit that not being able to use it in VSCode with a multi root project could be a justification to switch to Typescript (at least it doesn't help me to argue against colleagues at work). That's why I would really appreciate if |
Yeah, I missed this - dang. That's a lot of work! Ok, looking now |
Alright, so nothing stands out in the code - and I've given it 10m with the dev build inside the Jest codebase just clicking around and nothing seems to be broken. So I'm game to ship this, nice work @Mayank1791989 |
Cool, so this is now shipped as |
Great news ! Thank you very much ! |
thanks @Mayank1791989!
my
so when I run yarn install from the two packages the modules are actually put in In VScode I still get a bunch of errors such I am not sure how to setup the
and many others but nothing seem to work... To recap, this is the three
hope you can help me understand this, thanks in advance! |
@kuus The issue you are facing is the limitation of flow, there is nothing we can do in this plugin. Have you tried flow-mono-cli It basically creates symlinks of node_modules which are hoisted to top level folder (and as flow supports symlinks it will fix your missing modules errors). |
Is there a case where using |
Client
New implementation will handle following cases
for it. (fixes shouldn't you disable flow bin check when no .flowconfig is present? #253)
(fixes #302, #308, #253, #228, #201, #195, #189, #184, #165, #81)
Resolve Flow-Bin
issue: we are using .bin/flow but vscode never includes .bin in plugin package (see issue)
node
executable available #290)flow.pathToFlow
: value is normalized and .cmd is added if required so same value can be used for linux, osx & win.Error handling (fixes #200)
Commands
Status Bar Widget
Include more info in status widget to help user know what this plugin is using
Vscode settings
flow.coverageSeverity
to control type coverage diagnostic severityflow.useBundledFlow
enable|disable use of flow bundled with this pluginflow.lazyMode
: to add flow lazyMode supportflow.trace.server
log communication between vscode and flow lspflow.logLevel
control log level of plugin logsDocs
Build | Tools
Other Changes