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

Copy internal packages from Terraform v1.0 #1141

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

wata727
Copy link
Member

@wata727 wata727 commented Jun 27, 2021

Fixes #937

This PR is the first step in removing dependencies on Terraform's internal packages from TFLint.

First, copy packages required by TFLint to github.com/terraform-linters/tflint/terraform from Terraform v1.0. This includes some redundant code, but I'll ignore it here as it focuses on removing dependencies without changing the TFLint's interface.

This copy adds the following packages:

Not all the code in the package has been copied, it contains only the minimum files needed to build.

These packages are huge and it's hard to keep everything as maintained as the Terraform core team. I then remove as much apparently redundant code as possible (for example, GraphBuilder isn't needed to simulate Terraform Language semantics) and slim down the copied packages.

In addition, we should be able to minimize the required packages by changing some interfaces. See #937 (comment) for details.

The copied code does not include tests, but I plan to add it as needed as we make changes in the future.

@wata727 wata727 force-pushed the copy_internal_packages_from_terraform branch from 9b1bd1d to 32d3b29 Compare June 28, 2021 14:59
@wata727 wata727 merged commit 10c6c15 into master Jul 1, 2021
@wata727 wata727 deleted the copy_internal_packages_from_terraform branch July 1, 2021 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support Terraform 1.0
1 participant