-
Notifications
You must be signed in to change notification settings - Fork 47
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
hashicorp/packer-plugin-sdk incompatible with zclconf/go-cty v1.11.0 #131
Comments
This is confirmed to be an issue in the packer-sdk, but the discussion is occurring in zclconf/go-cty#134. |
For similar reasons HCL v2 cannot be updated past v2.14.1. |
All dependencies updated. Go version bumped to 1.18. HCLv2 fixed to v2.14.1 due to hashicorp/packer-plugin-sdk#131.
All dependencies updated. Go version bumped to 1.18. HCLv2 fixed to v2.14.1 due to hashicorp/packer-plugin-sdk#131.
Recent versions of the library cause Packer to crash at runtime, due to Packer's SDK relying on the `encoding/gob` library for wire serialization. See zclconf/go-cty#134 and hashicorp/packer-plugin-sdk#131 for context.
As folks on the thread may already know, encoding/gob support was removed from github.com/zclconf/[email protected]. The Packer plugin SDK relies on gob for supporting HCL2 templates. The removal of the encoding causes Packer to crash when using HCL2 templates. The team is working internally to find the best path forward, as a change to the wire protocol from gob will introduce a breaking change and plugin incompatibilities. We are working to notify plugin developers of the incompatible go-cty package and ask that all external plugins pin the versions of the following two packages to those used by the Packer plugin SDK. github.com/hashicorp/hcl/v2 v2.13.0 I'm closing this issue in favor of #135. Please feel free to reach out if you have any questions or suggestions. Cheers. |
Fixes build. Cannot use latest version of hashicorp/hcl or zclconf/go-cty due to hashicorp/packer-plugin-sdk#131 Use the versions suggested in that issue.
Overview of the Issue
If the package
github.com/zclconf/go-cty v1.11.0
is used with the Packer SDK, then an error is thrown. I am unsure if this is an error with Packer SDK orgo-cty
. If the error is with the other package, then please redirect me. I am opening this issue on both trackers.Reproduction Steps
Do anything with a Packer plugin built with go-cty v1.11.0 as this occurs immediately after Packer loads the plugin.
Packer Plugin SDK/go-cty versions
packer-sdk
0.3.1 and 0.3.2 both throw this error.go-cty
v1.10.0 works perfectly. v1.11.0 throws this error.Operating system and Environment details
go 1.18
Log Fragments and crash.log files
Additional Information
I suspect this is referencing the
cty.Type
from the<plugin>.hcl2spec.go
. If I attempt to regenerate that file withgo-cty
v1.11.0, then the following error is thrown:The text was updated successfully, but these errors were encountered: