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:
parent
74f2d58b8b
commit
b8df11bc33
|
@ -15,20 +15,22 @@ import (
|
||||||
// be incomplete, but that's assumed to be okay because the eventual call
|
// be incomplete, but that's assumed to be okay because the eventual call
|
||||||
// to Decode will produce error diagnostics anyway.
|
// to Decode will produce error diagnostics anyway.
|
||||||
func Variables(body hcl.Body, spec Spec) []hcl.Traversal {
|
func Variables(body hcl.Body, spec Spec) []hcl.Traversal {
|
||||||
schema := ImpliedSchema(spec)
|
|
||||||
|
|
||||||
content, _, _ := body.PartialContent(schema)
|
|
||||||
|
|
||||||
var vars []hcl.Traversal
|
var vars []hcl.Traversal
|
||||||
|
schema := ImpliedSchema(spec)
|
||||||
|
content, _, _ := body.PartialContent(schema)
|
||||||
|
|
||||||
if vs, ok := spec.(specNeedingVariables); ok {
|
if vs, ok := spec.(specNeedingVariables); ok {
|
||||||
vars = append(vars, vs.variablesNeeded(content)...)
|
vars = append(vars, vs.variablesNeeded(content)...)
|
||||||
}
|
}
|
||||||
spec.visitSameBodyChildren(func(s Spec) {
|
|
||||||
|
var visitFn visitFunc
|
||||||
|
visitFn = func(s Spec) {
|
||||||
if vs, ok := s.(specNeedingVariables); ok {
|
if vs, ok := s.(specNeedingVariables); ok {
|
||||||
vars = append(vars, vs.variablesNeeded(content)...)
|
vars = append(vars, vs.variablesNeeded(content)...)
|
||||||
}
|
}
|
||||||
})
|
s.visitSameBodyChildren(visitFn)
|
||||||
|
}
|
||||||
|
spec.visitSameBodyChildren(visitFn)
|
||||||
|
|
||||||
return vars
|
return vars
|
||||||
}
|
}
|
||||||
|
|
|
@ -1891,68 +1891,68 @@
|
||||||
{
|
{
|
||||||
"checksumSHA1": "dJPromzLdd492RQjE/09klKRXGs=",
|
"checksumSHA1": "dJPromzLdd492RQjE/09klKRXGs=",
|
||||||
"path": "github.com/hashicorp/hcl2/ext/dynblock",
|
"path": "github.com/hashicorp/hcl2/ext/dynblock",
|
||||||
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
|
"revision": "36446359d27574bf110611001414da561731b62d",
|
||||||
"revisionTime": "2018-05-23T23:56:29Z"
|
"revisionTime": "2018-05-24T19:11:53Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "IAfC0Xri1iCRgbbiDBgs6ue8/Ic=",
|
"checksumSHA1": "IAfC0Xri1iCRgbbiDBgs6ue8/Ic=",
|
||||||
"path": "github.com/hashicorp/hcl2/ext/typeexpr",
|
"path": "github.com/hashicorp/hcl2/ext/typeexpr",
|
||||||
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
|
"revision": "36446359d27574bf110611001414da561731b62d",
|
||||||
"revisionTime": "2018-05-23T23:56:29Z"
|
"revisionTime": "2018-05-24T19:11:53Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "BRJaQcKriVKEirVC7YxBxPufQF0=",
|
"checksumSHA1": "BRJaQcKriVKEirVC7YxBxPufQF0=",
|
||||||
"path": "github.com/hashicorp/hcl2/gohcl",
|
"path": "github.com/hashicorp/hcl2/gohcl",
|
||||||
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
|
"revision": "36446359d27574bf110611001414da561731b62d",
|
||||||
"revisionTime": "2018-05-23T23:56:29Z"
|
"revisionTime": "2018-05-24T19:11:53Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "v1JCFNvhLqF3ErYcxkJJPboKO8c=",
|
"checksumSHA1": "v1JCFNvhLqF3ErYcxkJJPboKO8c=",
|
||||||
"path": "github.com/hashicorp/hcl2/hcl",
|
"path": "github.com/hashicorp/hcl2/hcl",
|
||||||
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
|
"revision": "36446359d27574bf110611001414da561731b62d",
|
||||||
"revisionTime": "2018-05-23T23:56:29Z"
|
"revisionTime": "2018-05-24T19:11:53Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "6H/LBmIYL/dNjKvlbB2hAsxm2rw=",
|
"checksumSHA1": "6H/LBmIYL/dNjKvlbB2hAsxm2rw=",
|
||||||
"path": "github.com/hashicorp/hcl2/hcl/hclsyntax",
|
"path": "github.com/hashicorp/hcl2/hcl/hclsyntax",
|
||||||
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
|
"revision": "36446359d27574bf110611001414da561731b62d",
|
||||||
"revisionTime": "2018-05-23T23:56:29Z"
|
"revisionTime": "2018-05-24T19:11:53Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "G40fCmu1bSWXv4Hw5JXwEUTVThk=",
|
"checksumSHA1": "G40fCmu1bSWXv4Hw5JXwEUTVThk=",
|
||||||
"path": "github.com/hashicorp/hcl2/hcl/json",
|
"path": "github.com/hashicorp/hcl2/hcl/json",
|
||||||
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
|
"revision": "36446359d27574bf110611001414da561731b62d",
|
||||||
"revisionTime": "2018-05-23T23:56:29Z"
|
"revisionTime": "2018-05-24T19:11:53Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "c3Lb2st15sopmoLrjLQp+XyaZjE=",
|
"checksumSHA1": "iIVMnRuvfOy/tJ1zE9rVcjD/01A=",
|
||||||
"path": "github.com/hashicorp/hcl2/hcldec",
|
"path": "github.com/hashicorp/hcl2/hcldec",
|
||||||
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
|
"revision": "36446359d27574bf110611001414da561731b62d",
|
||||||
"revisionTime": "2018-05-23T23:56:29Z"
|
"revisionTime": "2018-05-24T19:11:53Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "sySYF9Ew71VS/LfrG+s/0jK+1VQ=",
|
"checksumSHA1": "sySYF9Ew71VS/LfrG+s/0jK+1VQ=",
|
||||||
"path": "github.com/hashicorp/hcl2/hcled",
|
"path": "github.com/hashicorp/hcl2/hcled",
|
||||||
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
|
"revision": "36446359d27574bf110611001414da561731b62d",
|
||||||
"revisionTime": "2018-05-23T23:56:29Z"
|
"revisionTime": "2018-05-24T19:11:53Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "IzmftuG99BqNhbFGhxZaGwtiMtM=",
|
"checksumSHA1": "IzmftuG99BqNhbFGhxZaGwtiMtM=",
|
||||||
"path": "github.com/hashicorp/hcl2/hclparse",
|
"path": "github.com/hashicorp/hcl2/hclparse",
|
||||||
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
|
"revision": "36446359d27574bf110611001414da561731b62d",
|
||||||
"revisionTime": "2018-05-23T23:56:29Z"
|
"revisionTime": "2018-05-24T19:11:53Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "v5qx2XghQ+EtvFLa4a0Efjiwt9I=",
|
"checksumSHA1": "v5qx2XghQ+EtvFLa4a0Efjiwt9I=",
|
||||||
"path": "github.com/hashicorp/hcl2/hcltest",
|
"path": "github.com/hashicorp/hcl2/hcltest",
|
||||||
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
|
"revision": "36446359d27574bf110611001414da561731b62d",
|
||||||
"revisionTime": "2018-05-23T23:56:29Z"
|
"revisionTime": "2018-05-24T19:11:53Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "C82otWNczU2S3azjxsjdGH9zW+Y=",
|
"checksumSHA1": "C82otWNczU2S3azjxsjdGH9zW+Y=",
|
||||||
"path": "github.com/hashicorp/hcl2/hclwrite",
|
"path": "github.com/hashicorp/hcl2/hclwrite",
|
||||||
"revision": "81d22773002de532651a19acb91b4e1fe2b44cb2",
|
"revision": "36446359d27574bf110611001414da561731b62d",
|
||||||
"revisionTime": "2018-05-23T23:56:29Z"
|
"revisionTime": "2018-05-24T19:11:53Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "M09yxoBoCEtG7EcHR8aEWLzMMJc=",
|
"checksumSHA1": "M09yxoBoCEtG7EcHR8aEWLzMMJc=",
|
||||||
|
|
Loading…
Reference in New Issue