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

Add vscode option to suppress vscode toast notification for "No root module found, functionality may be limited" #207

Closed
sephross opened this issue Jul 3, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@sephross
Copy link

sephross commented Jul 3, 2020

Use-cases

Add option to suppress this vscode toast notification. Not all users are running terraform on their local machine, or may be in a repo containing many modules and initializing terraform in each one is not reasonable due to variable dependencies etc. In such scenarios this warning is endlessly distracting.

Attempted Solutions

Running terraform init across many projects or modules in the same repo may not be manageable or reasonable.

Proposal

Add option to suppress this warning, or reduce it to one time per module.

@sephross sephross added the enhancement New feature or request label Jul 3, 2020
@radeksimko
Copy link
Member

I think that reducing the message to once per module would make sense. 👍

As mentioned in another thread though the warning has a reason. The language server won't do much without a root module. The only functionality available without schema is auto-formatting and most language features are likely going to require init because they need data from the providers, which are only available when init-ed.

On the positive note we do plan to investigate some ways of obtaining the schema from the registry, to provide a decent UX for those users who don't want to init or it's not practical for them to do it, see #193

@radeksimko radeksimko added the good first issue Good for newcomers label Jul 6, 2020
@sephross
Copy link
Author

sephross commented Jul 9, 2020

The language server won't do much without a root module. The only functionality available without schema is auto-formatting

Definitely understand and appreciate this. For our own use, the text colour and formatter are the only things we've come to depend on with the vscode extension since the version 1 extension didn't have complete support for 0.12 from the beginning.

Another solution may be to simply separate out the non-LS functionality from the current vscode extension into its own vscode HCL formatting extension and subsequently avoid issues with LS detection all together.

@radeksimko
Copy link
Member

That's useful context. Thank you.

I have done some refactoring in the related area (queued for the upcoming release) which made certain edge cases better exposed, so we can now think more clearly about how, when and whether to surface certain errors.

I described most of these in #218

I'm still not fully convinced I would want the server to entirely ignore all the conditions described there, but I do understand that the current way of surfacing it is too simple/naive. I would therefore appreciate your feedback there.

@dmikalova
Copy link

Please let us just turn off the notifications, or put documentation on the plugin page and the readmes at the root of the repo on what needs to be done to correctly configure that.

@woz5999
Copy link

woz5999 commented Dec 28, 2020

i agree with @dmikalova @sephross

i care much more about not getting constantly nagged than i am about having access to all the LS features. just let me turn these notifications off.

@i255d
Copy link

i255d commented Feb 2, 2021

So, how do we turn it off in VSCode?

@radeksimko radeksimko removed the good first issue Good for newcomers label Feb 16, 2021
@ayk33
Copy link

ayk33 commented Feb 16, 2021

Is there a way to disable the notifications? They get pretty spammy..

@radeksimko
Copy link
Member

Hi folks,
The issue is not addressed yet, but we have a plan for addressing it and I'm just merging all the issues with the same root cause, such as this one, into a single issue: #424

Thank you for your understanding and patience.

@ghost
Copy link

ghost commented Mar 27, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the context necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Mar 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants