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 module reader to enable module dependent variables #58

Merged
merged 6 commits into from
Jul 22, 2021

Conversation

Nepomuceno
Copy link
Contributor

This Pr it is part of a larger PR it order to add variable auto completion for modules in the terraform language server. hashicorp/terraform-ls#93
a complementary implementation in the language server side can be found at
hashicorp/terraform-ls#551

Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for my in-line comments (most of which are minor) this looks good!

Can you also add a new test to schema/schema_merge_test.go which exercises the new codepath? i.e. has a simple mock implementation of the ModuleReader interface (can be literally hard-coded return values) and checks that the module block has the expected schema?

Thanks!

schema/schema_merge.go Outdated Show resolved Hide resolved
schema/schema_merge.go Outdated Show resolved Hide resolved
schema/schema_merge.go Outdated Show resolved Hide resolved
schema/schema_merge.go Outdated Show resolved Hide resolved
schema/schema_merge.go Outdated Show resolved Hide resolved
schema/schema_merge.go Outdated Show resolved Hide resolved
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I think this is ready for merging, but before doing so I'd like to also see hashicorp/terraform-ls#551 modified to leverage this PR - so we're sure that everything fits well together.

@Nepomuceno
Copy link
Contributor Author

LGTM, I think this is ready for merging, but before doing so I'd like to also see hashicorp/terraform-ls#551 modified to leverage this PR - so we're sure that everything fits well together.

Working on that now just wanted to make sure this interface would not change.

@radeksimko radeksimko merged commit 2c53a31 into hashicorp:main Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants