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

textDocument/didOpen: Enrich warning message #205

Merged
merged 1 commit into from
Jul 6, 2020
Merged

Conversation

radeksimko
Copy link
Member

This is in reaction to https://discuss.hashicorp.com/t/no-root-module-found/10944

It's likely this will generate more pressure to resolving #128 but it would at least get people closer to the point where it works (assuming they setup auth wrapper or use local state) and make the message more actionable.

@radeksimko radeksimko added this to the v0.4.2 milestone Jul 3, 2020
@eskp
Copy link

eskp commented Jul 6, 2020

Can we disable this message? There might be no need for terraform init

@radeksimko
Copy link
Member Author

radeksimko commented Jul 6, 2020

I think that adding an option to opt-in to ignoring these messages would be fine, but I'd like to be sure that everyone understand the implications before doing it.

The server cannot do much (basically nothing other than auto-formatting) without initialized root module. It can't access the schema, hence it can't use the schema in completion, later hovering, or any other future features.

Additionally since 0.4.0 the server does attempt to find the root module within the whole hierarchy and already reflects the fact that modules may not be init-ed on their own, but e.g. from a parent directory, which references that module. So this message in particular should rarely be a false negative and if it is then we'd like to know about it.

@radeksimko radeksimko merged commit 6ad9609 into master Jul 6, 2020
@radeksimko radeksimko deleted the enrich-warn-msg branch July 6, 2020 19:49
@radeksimko radeksimko modified the milestones: v0.4.2, v0.5.0 Jul 10, 2020
@ghost
Copy link

ghost commented Aug 5, 2020

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 and limited conversation to collaborators Aug 5, 2020
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 this pull request may close these issues.

3 participants