govendor fetch github.com/hashicorp/hcl2/...

This includes an upstream fix to the hcldec.Variables function that fixes
its behavior when dealing with specs that contain DefaultSpec, and other
similar wrapper specs.
This commit is contained in:
Martin Atkins 2018-05-24 12:14:06 -07:00
parent 74f2d58b8b
commit b8df11bc33
2 changed files with 31 additions and 29 deletions

View File

@ -15,20 +15,22 @@ import (
// be incomplete, but that's assumed to be okay because the eventual call
// to Decode will produce error diagnostics anyway.
func Variables(body hcl.Body, spec Spec) []hcl.Traversal {
schema := ImpliedSchema(spec)
content, _, _ := body.PartialContent(schema)
var vars []hcl.Traversal
schema := ImpliedSchema(spec)
content, _, _ := body.PartialContent(schema)
if vs, ok := spec.(specNeedingVariables); ok {
vars = append(vars, vs.variablesNeeded(content)...)
}
spec.visitSameBodyChildren(func(s Spec) {
var visitFn visitFunc
visitFn = func(s Spec) {
if vs, ok := s.(specNeedingVariables); ok {
vars = append(vars, vs.variablesNeeded(content)...)
}
})
s.visitSameBodyChildren(visitFn)
}
spec.visitSameBodyChildren(visitFn)
return vars
}

46
vendor/vendor.json vendored
View File

@ -1891,68 +1891,68 @@
{
"checksumSHA1": "dJPromzLdd492RQjE/09klKRXGs=",
"path": "github.com/hashicorp/hcl2/ext/dynblock",
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
"revisionTime": "2018-05-23T23:56:29Z"
"revision": "36446359d27574bf110611001414da561731b62d",
"revisionTime": "2018-05-24T19:11:53Z"
},
{
"checksumSHA1": "IAfC0Xri1iCRgbbiDBgs6ue8/Ic=",
"path": "github.com/hashicorp/hcl2/ext/typeexpr",
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
"revisionTime": "2018-05-23T23:56:29Z"
"revision": "36446359d27574bf110611001414da561731b62d",
"revisionTime": "2018-05-24T19:11:53Z"
},
{
"checksumSHA1": "BRJaQcKriVKEirVC7YxBxPufQF0=",
"path": "github.com/hashicorp/hcl2/gohcl",
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
"revisionTime": "2018-05-23T23:56:29Z"
"revision": "36446359d27574bf110611001414da561731b62d",
"revisionTime": "2018-05-24T19:11:53Z"
},
{
"checksumSHA1": "v1JCFNvhLqF3ErYcxkJJPboKO8c=",
"path": "github.com/hashicorp/hcl2/hcl",
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
"revisionTime": "2018-05-23T23:56:29Z"
"revision": "36446359d27574bf110611001414da561731b62d",
"revisionTime": "2018-05-24T19:11:53Z"
},
{
"checksumSHA1": "6H/LBmIYL/dNjKvlbB2hAsxm2rw=",
"path": "github.com/hashicorp/hcl2/hcl/hclsyntax",
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
"revisionTime": "2018-05-23T23:56:29Z"
"revision": "36446359d27574bf110611001414da561731b62d",
"revisionTime": "2018-05-24T19:11:53Z"
},
{
"checksumSHA1": "G40fCmu1bSWXv4Hw5JXwEUTVThk=",
"path": "github.com/hashicorp/hcl2/hcl/json",
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
"revisionTime": "2018-05-23T23:56:29Z"
"revision": "36446359d27574bf110611001414da561731b62d",
"revisionTime": "2018-05-24T19:11:53Z"
},
{
"checksumSHA1": "c3Lb2st15sopmoLrjLQp+XyaZjE=",
"checksumSHA1": "iIVMnRuvfOy/tJ1zE9rVcjD/01A=",
"path": "github.com/hashicorp/hcl2/hcldec",
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
"revisionTime": "2018-05-23T23:56:29Z"
"revision": "36446359d27574bf110611001414da561731b62d",
"revisionTime": "2018-05-24T19:11:53Z"
},
{
"checksumSHA1": "sySYF9Ew71VS/LfrG+s/0jK+1VQ=",
"path": "github.com/hashicorp/hcl2/hcled",
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
"revisionTime": "2018-05-23T23:56:29Z"
"revision": "36446359d27574bf110611001414da561731b62d",
"revisionTime": "2018-05-24T19:11:53Z"
},
{
"checksumSHA1": "IzmftuG99BqNhbFGhxZaGwtiMtM=",
"path": "github.com/hashicorp/hcl2/hclparse",
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
"revisionTime": "2018-05-23T23:56:29Z"
"revision": "36446359d27574bf110611001414da561731b62d",
"revisionTime": "2018-05-24T19:11:53Z"
},
{
"checksumSHA1": "v5qx2XghQ+EtvFLa4a0Efjiwt9I=",
"path": "github.com/hashicorp/hcl2/hcltest",
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
"revisionTime": "2018-05-23T23:56:29Z"
"revision": "36446359d27574bf110611001414da561731b62d",
"revisionTime": "2018-05-24T19:11:53Z"
},
{
"checksumSHA1": "C82otWNczU2S3azjxsjdGH9zW+Y=",
"path": "github.com/hashicorp/hcl2/hclwrite",
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
"revisionTime": "2018-05-23T23:56:29Z"
"revision": "36446359d27574bf110611001414da561731b62d",
"revisionTime": "2018-05-24T19:11:53Z"
},
{
"checksumSHA1": "M09yxoBoCEtG7EcHR8aEWLzMMJc=",