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

tflint: Sending expression nodes as a text representation #24

Merged
merged 1 commit into from
Jun 13, 2020

Conversation

wata727
Copy link
Member

@wata727 wata727 commented May 24, 2020

See also hashicorp/hcl#332

Currently, sending and receiving expression nodes via gob in the plugin system. However, this approach has two problems:

  • Cannot support JSON syntax because json.expression is not exported
  • Since it depends on the internal representation of the HCL package, changing this breaks plugin's compatibility.

After discussing this issue, I got the advice that it's best to use text representation for sending and receiving.

Following the advice, this PR changes that it sends and receives text instead of expression and it to be parsed as an expression by the plugin and host respectively.

Unfortunately, there is no expression-based JSON parsing API in HCL today. I'm opening a PR to add this function, but this pull request is pending until it is merged. See hashicorp/hcl#381

@wata727 wata727 force-pushed the text_transmission_over_rpc branch from 906c586 to 74f4303 Compare June 13, 2020 12:53
@wata727 wata727 marked this pull request as ready for review June 13, 2020 12:54
@wata727
Copy link
Member Author

wata727 commented Jun 13, 2020

In favor of publishing, I have temporarily dropped support for JSON configuration syntax. I will open an issue later.

@wata727 wata727 merged commit a1fcc54 into master Jun 13, 2020
@wata727 wata727 deleted the text_transmission_over_rpc branch June 13, 2020 12:59
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.

1 participant