Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Plugin doesn't work in a Monorepo environment #302

Closed
dnepro opened this issue Jan 2, 2019 · 5 comments · Fixed by #315
Closed

Plugin doesn't work in a Monorepo environment #302

dnepro opened this issue Jan 2, 2019 · 5 comments · Fixed by #315

Comments

@dnepro
Copy link

dnepro commented Jan 2, 2019

Hello everybody,

First off thank you very much 👍

But i've got a problem working with it in a typical lerna project with packages where only some packages make use of flow and therefore i don't have a root-level ".flowconfig", is there some possibility to allow such an environment to work?

And for instance i make heavy use of module.name_mapper which i don't know if it would work from a root-level config.

If you need more info or some demo repository, let me know :)

Thanks in advance!

@noppa
Copy link

noppa commented Jan 2, 2019

See #301
Currently, you need to set "flow.useLSP": false in your settings if you don't have a root level flowconfig file.

@trashstack
Copy link

@noppa Thanks for linking to that issue. I've just run into this as well and was stuck on some older issues that didn't have that context when I googled.

Do you happen to know what the impact of turning off that setting has on the extension? Does it change any of the functionality or is it purely an implementation detail?

From reading the issues it seems like support for non-root config files might not be on the cards until flow-for-vscode has switched over to using LSP support in Flow itself. Do you know if that's actually being worked on or if it's being tracked anywhere?

Apologies for deluging you with questions but it seemed like you might have a bit more context on this. Thank you regardless.

@Mayank1791989
Copy link
Contributor

From reading the issues it seems like support for non-root config files might not be on the cards until flow-for-vscode has switched over to using LSP support in Flow itself. Do you know if that's actually being worked on or if it's being tracked anywhere?

Hi, @ManThursday v1.0 already started using native flow lsp instead of flow-language-server. The support for multi-config and non-root config will be added soon.

Do you happen to know what the impact of turning off that setting has on the extension? Does it change any of the functionality or is it purely an implementation detail?

Rename and server progress will not work. Also, lsp mode better handles flow processes. I would recommend lsp mode if your config is in root dir.

@Mayank1791989
Copy link
Contributor

@dnepro Please share some demo repository.

@trashstack
Copy link

@Mayank1791989 Thanks very much. We'd like to have different flow configs in each package so this will help us make a call on the best way to work around this for now.

Mayank1791989 added a commit to Mayank1791989/flow-for-vscode that referenced this issue Feb 16, 2019
Client (closes flow#302, flow#304, 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
Mayank1791989 added a commit to Mayank1791989/flow-for-vscode that referenced this issue Feb 18, 2019
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
@orta orta closed this as completed in #315 Feb 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants