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

[HPR-1108] Add compile time check for go-cty #186

Merged
merged 2 commits into from
Jun 15, 2023

Commits on Jun 13, 2023

  1. Add compile time check for go-cty

    In v1.11.0, the go-cty package dropped support for encoding/gob. Gob support is used
    by the SDK to serialize HCL2 object specs over the wire. If a plugin or Packer upgrades
    their version of zclconf/go-cty to one that does not contain Gob support the plugin will build
    but crash when trying to run a build on an HCL2 template. By adding this check, a consumer of the SDK
    will fail to compile if they are using an unsupported version of go-cty. This check is being added
    as a guard to prevent Packer SDK consumers from becoming out of sync with unsupported go-cty versions.
    
    ```
    ~> go get github.com/hashicorp/go-cty v1.13.0
    ~> make dev
    rpc/cty_encode.go:15:24 cannot use cty.Value{} (value of type cty.Value) as type gob.GobEncoder
    ```
    nywilken committed Jun 13, 2023
    Configuration menu
    Copy the full SHA
    a4e1587 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2023

  1. Move check into rpc/init

    * Add link to GitHub Issue
    nywilken committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    83e4627 View commit details
    Browse the repository at this point in the history