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

Bump github.com/hashicorp/hcl/v2 from 2.14.0 to 2.16.2 #223

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 9, 2023

Bumps github.com/hashicorp/hcl/v2 from 2.14.0 to 2.16.2.

Release notes

Sourced from github.com/hashicorp/hcl/v2's releases.

v2.16.2

Bugs Fixed

  • ext/typeexpr: Verify type assumptions when applying default values, and ignore input values that do not match type assumptions. (#594)

v2.16.1

Bugs Fixed

  • hclsyntax: Report correct Range.End for FunctionCall with incomplete argument (#588)

v2.16.0

Enhancements

  • ext/typeexpr: Modify the Defaults functionality to implement additional flexibility. HCL will now upcast lists and sets into tuples, and maps into objects, when applying default values if the applied defaults cause the elements within a target collection to have differing types. Previously, this would have resulted in a panic, now HCL will return a modified overall type. (hashicorp/hcl#574)

    Users should return to the advice provided by v2.14.0, and apply the go-cty convert functionality after setting defaults on a given cty.Value, rather than before.

  • hclfmt: Avoid rewriting unchanged files. (hashicorp/hcl#576)

  • hclsyntax: Simplify the AST for certain string expressions. (hashicorp/hcl#584)

Bugs Fixed

v2.15.0

Bugs Fixed

  • ext/typeexpr: Skip null objects when applying defaults. This prevents crashes when null objects are creating inside collections, and stops incomplete objects being created with only optional attributes set. (#567)
  • ext/typeexpr: Ensure default values do not have optional metadata attached. This prevents crashes when default values are inserted into concrete go-cty values that have also been stripped of their optional metadata. (#568)

Enhancements

  • ext/typeexpr: With the go-cty upstream depenendency updated to v1.12.0, the Defaults struct and associated functions can apply additional and more flexible 'unsafe' conversions (examples include tuples into collections such as lists and sets, and additional safety around null and dynamic values). (#564)
  • ext/typeexpr: With the go-cty upstream depenendency updated to v1.12.0, users should now apply the go-cty convert functionality before setting defaults on a given cty.Value, rather than after, if they require a specific cty.Type. (#564)

v2.14.1

Bugs Fixed

  • ext/typeexpr: Type convert defaults for optional object attributes when applying them. This prevents crashes in certain cases when the objects in question are part of a collection. (#555)
Changelog

Sourced from github.com/hashicorp/hcl/v2's changelog.

v2.16.2 (March 9, 2023)

Bugs Fixed

  • ext/typeexpr: Verify type assumptions when applying default values, and ignore input values that do not match type assumptions. (#594)

v2.16.1 (February 13, 2023)

Bugs Fixed

  • hclsyntax: Report correct Range.End for FunctionCall with incomplete argument (#588)

v2.16.0 (January 30, 2023)

Enhancements

  • ext/typeexpr: Modify the Defaults functionality to implement additional flexibility. HCL will now upcast lists and sets into tuples, and maps into objects, when applying default values if the applied defaults cause the elements within a target collection to have differing types. Previously, this would have resulted in a panic, now HCL will return a modified overall type. (#574)

    Users should return to the advice provided by v2.14.0, and apply the go-cty convert functionality after setting defaults on a given cty.Value, rather than before.

  • hclfmt: Avoid rewriting unchanged files. (#576)

  • hclsyntax: Simplify the AST for certain string expressions. (#584)

Bugs Fixed

  • hclwrite: Fix data race in formatSpaces. (#511)

v2.15.0 (November 10, 2022)

Bugs Fixed

  • ext/typeexpr: Skip null objects when applying defaults. This prevents crashes when null objects are creating inside collections, and stops incomplete objects being created with only optional attributes set. (#567)
  • ext/typeexpr: Ensure default values do not have optional metadata attached. This prevents crashes when default values are inserted into concrete go-cty values that have also been stripped of their optional metadata. (#568)

Enhancements

  • ext/typeexpr: With the go-cty upstream depenendency updated to v1.12.0, the Defaults struct and associated functions can apply additional and more flexible 'unsafe' conversions (examples include tuples into collections such as lists and sets, and additional safety around null and dynamic values). (#564)
  • ext/typeexpr: With the go-cty upstream depenendency updated to v1.12.0, users should now apply the go-cty convert functionality before setting defaults on a given cty.Value, rather than after, if they require a specific cty.Type. (#564)

v2.14.1 (September 23, 2022)

Bugs Fixed

  • ext/typeexpr: Type convert defaults for optional object attributes when applying them. This prevents crashes in certain cases when the objects in question are part of a collection. (#555)
Commits
  • e54a196 Update CHANGELOG.md
  • ec21494 Update CHANGELOG.md
  • 9ebb152 Update CHANGELOG.md
  • 52a64bb Verify type assumptions when retrieving child default values (#594)
  • eb5a6ef Merge pull request #593 from RULCSoft/typo-fix
  • 695b1c1 Typo fix: Consecutive occurrences of 'the'
  • 4679383 [COMPLIANCE] Add Copyright and License Headers (#586)
  • a514df9 Update Changelog for 2.16.1
  • 67041cc Merge pull request #588 from hashicorp/b-fix-func-closetok-parsing
  • a3ce77c hclsyntax: Report correct Range.End for FunctionCall w/ incomplete arg
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Mar 9, 2023
@dependabot dependabot bot force-pushed the dependabot/go_modules/github.com/hashicorp/hcl/v2-2.16.2 branch 2 times, most recently from e9ac90a to f2e829d Compare April 3, 2023 17:30
@optik-aper
Copy link
Member

@dependabot rebase

@dependabot dependabot bot force-pushed the dependabot/go_modules/github.com/hashicorp/hcl/v2-2.16.2 branch from f2e829d to 5ac47bc Compare April 3, 2023 19:09
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Apr 3, 2023

Looks like this PR is already up-to-date with master! If you'd still like to recreate it from scratch, overwriting any edits, you can request @dependabot recreate.

@optik-aper
Copy link
Member

@dependabot recreate

@dependabot dependabot bot force-pushed the dependabot/go_modules/github.com/hashicorp/hcl/v2-2.16.2 branch from 5ac47bc to 03813ab Compare April 3, 2023 19:16
@optik-aper
Copy link
Member

Not working:

panic: ConfigSpec failed: gob: type cty.Type has no exported fields [recovered]
	panic: ConfigSpec failed: gob: type cty.Type has no exported fields

goroutine 1 [running]:
log.Panic({0xc000c1e7a0, 0xc000c1e7e0, 0xc000c1e810})
	/opt/hostedtoolcache/go/1.17.11/x64/src/log/log.go:354 +0x65
github.com/hashicorp/packer/packer.(*cmdBuilder).checkExit(0x90, {0x43e1e60, 0xc000395600}, 0x0)
	/home/runner/work/packer/packer/packer/cmd_builder.go:47 +0x7f
github.com/hashicorp/packer/packer.(*cmdBuilder).ConfigSpec.func1()
	/home/runner/work/packer/packer/packer/cmd_builder.go:19 +0x39
panic({0x43e1e60, 0xc000395600})
	/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/panic.go:1038 +0x215
github.com/hashicorp/packer-plugin-sdk/rpc.(*commonClient).ConfigSpec(0xc000416020)
	/home/runner/go/pkg/mod/github.com/hashicorp/packer-plugin-sdk@v0.3.1/rpc/common.go:44 +0x297
github.com/hashicorp/packer/packer.(*cmdBuilder).ConfigSpec(0x0)
	/home/runner/work/packer/packer/packer/cmd_builder.go:22 +0x65
github.com/hashicorp/packer/hcl2template.decodeHCL2Spec({0x5ce8d10, 0xc001062e70}, 0xc000c30060, {0x7f18ccb64a18, 0xc000c30060})
	/home/runner/work/packer/packer/hcl2template/decode.go:17 +0x39
github.com/hashicorp/packer/hcl2template.(*PackerConfig).startBuilder(0xc00082f2c0, {{{0xc00101ff87, 0x5}, {0xc00101ff8d, 0x6}}, {0x0, 0x0}, {0x5ce8d10, 0xc001062e70}}, 0xc00050f4a0)
	/home/runner/work/packer/packer/hcl2template/types.source.go:116 +0x2b7
github.com/hashicorp/packer/hcl2template.(*PackerConfig).GetBuilds(0xc00082f2c0, {{0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, 0x0, 0x0, {0x0, ...}, ...})
	/home/runner/work/packer/packer/hcl2template/types.packer_config.go:648 +0xf3d
github.com/hashicorp/packer/command.(*BuildCommand).RunContext(0xc000d28ae0, {0x5ce83e0, 0xc000d3c800}, 0xc0003555f0)
	/home/runner/work/packer/packer/command/build.go:182 +0x21e
github.com/hashicorp/packer/command.(*BuildCommand).Run(0xc000d28ae0, {0xc00006e1a0, 0x1, 0x1})
	/home/runner/work/packer/packer/command/build.go:40 +0xc5
github.com/mitchellh/cli.(*CLI).Run(0xc00039e640)
	/home/runner/go/pkg/mod/github.com/mitchellh/cli@v1.1.2/cli.go:262 +0x5f8
main.wrappedMain()
	/home/runner/work/packer/packer/main.go:262 +0xb28
main.realMain()
	/home/runner/work/packer/packer/main.go:49 +0xf3
main.main()
	/home/runner/work/packer/packer/main.go:35 +0x19

@optik-aper
Copy link
Member

Per the zclconf/go-cty#134 It sounds like packer is using deprecated functionality in go-cty module. We probably need to revert go-cty back to 1.10 in order to merge this.

@dependabot dependabot bot force-pushed the dependabot/go_modules/github.com/hashicorp/hcl/v2-2.16.2 branch from 03813ab to 0433bc4 Compare April 4, 2023 17:58
@optik-aper
Copy link
Member

@dependabot rebase

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Apr 4, 2023

Looks like this PR is already up-to-date with master! If you'd still like to recreate it from scratch, overwriting any edits, you can request @dependabot recreate.

@optik-aper
Copy link
Member

Go.mod differs from master, @dependabot recreate

@optik-aper optik-aper self-assigned this Apr 4, 2023
@dependabot dependabot bot force-pushed the dependabot/go_modules/github.com/hashicorp/hcl/v2-2.16.2 branch from 0433bc4 to ca409f3 Compare April 4, 2023 18:41
@optik-aper
Copy link
Member

I see, this hcl update also updates go-cty. I don't think this is working but will test from scratch to be sure.

Bumps [github.com/hashicorp/hcl/v2](https://github.com/hashicorp/hcl) from 2.14.0 to 2.16.2.
- [Release notes](https://github.com/hashicorp/hcl/releases)
- [Changelog](https://github.com/hashicorp/hcl/blob/main/CHANGELOG.md)
- [Commits](hashicorp/hcl@v2.14.0...v2.16.2)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/hcl/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/go_modules/github.com/hashicorp/hcl/v2-2.16.2 branch from ca409f3 to a6910ac Compare April 5, 2023 19:12
@optik-aper
Copy link
Member

Nope this isn't going to work until either hcl or go-cty changes their approach to encoding.

@dependabot ignore this minor release

@dependabot dependabot bot closed this Apr 5, 2023
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Apr 5, 2023

OK, I won't notify you about version 2.16.x again, unless you re-open this PR. 😢

@dependabot dependabot bot deleted the dependabot/go_modules/github.com/hashicorp/hcl/v2-2.16.2 branch April 5, 2023 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant