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

cmd/inspect-module: A command to aid with debugging root module discovery #225

Closed
radeksimko opened this issue Jul 10, 2020 · 1 comment · Fixed by #231
Closed

cmd/inspect-module: A command to aid with debugging root module discovery #225

radeksimko opened this issue Jul 10, 2020 · 1 comment · Fixed by #231
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@radeksimko
Copy link
Member

radeksimko commented Jul 10, 2020

Current Version

0.4.1

Use-cases

The server has a capability to walk through some complex hierarchies to understand where to find plugin cache (i.e. schema data) and how to match it with files being open in order to provide relevant completion candidates.

Because complexity may vary and reasons for why root module isn't discovered are many it's expectable that there will be a time period when we have to work with users to tweak the discovery & matching logic.

Providing all the feedback (reasons why root module was not discovered) is not always practical or possible at runtime, unless we would flood users with messages. Obtaining this kind of information from the logs is not trivial either, especially when users only share snippets of their logs.

We need a way of communicating the complexity of hierarchy of root modules easily.

Attempted Solutions

tree output + logs + verbal description of dependencies

Proposal

Introduce terraform-ls inspect-module [path] command which will mostly just do what the server would do on initialize, but synchronously

  • walk through the [path]
  • attempt to discover all root modules
  • discover module manifest
  • discover plugin cache
  • parse module manifest
  • discover Terraform executable
  • discover Terraform version
  • discover compatible parser
  • obtain schema

and finally present all this in some consumable/share-able form that user can just paste into a gist or something.

@radeksimko radeksimko added the enhancement New feature or request label Jul 10, 2020
@radeksimko radeksimko changed the title cmd/inspect: A command to aid with debugging root module discovery cmd/debug: A command to aid with debugging root module discovery Jul 13, 2020
@radeksimko radeksimko added this to the v0.6.0 milestone Jul 13, 2020
@radeksimko radeksimko changed the title cmd/debug: A command to aid with debugging root module discovery cmd/inspect-module: A command to aid with debugging root module discovery Jul 13, 2020
@radeksimko radeksimko self-assigned this Jul 23, 2020
@ghost
Copy link

ghost commented Aug 23, 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 23, 2020
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

Successfully merging a pull request may close this issue.

1 participant