variable "DESTDIR" {
default = ""
}
target "default" {
output = [DESTDIR]
}
$ docker buildx bake --print
#1 [internal] load local bake definitions
#1 reading docker-bake.hcl 81B / 81B done
#1 DONE 0.0s
docker-bake.hcl:6
--------------------
4 |
5 | target "default" {
6 | >>> output = [DESTDIR]
7 | }
8 |
--------------------
ERROR: docker-bake.hcl:6,12-13: Unsuitable value type; Unsuitable value: EOF
Done some debugging and seems related to changes in gohcl fork. This error is triggered at
|
srcVal, err = o.Convert(srcVal, convTy) |
|
if err != nil { |
|
diags = append(diags, &hcl.Diagnostic{ |
|
Severity: hcl.DiagError, |
|
Summary: "Unsuitable value type", |
|
Detail: fmt.Sprintf("Unsuitable value: %s", err.Error()), |
|
Subject: expr.StartRange().Ptr(), |
|
Context: expr.Range().Ptr(), |
|
}) |
|
return diags |
|
} |

As we are using our own decode options for implied types in
|
dec := gohcl.DecodeOptions{ImpliedType: ImpliedType} |
, the bug might be around:
https://github.com/docker/buildx/blob/master/bake/hclparser/type_implied.go
With previous release:
$ docker buildx bake --print
#1 [internal] load local bake definitions
#1 reading docker-bake.hcl 81B / 81B done
#1 DONE 0.0s
{
"target": {
"default": {
"context": ".",
"dockerfile": "Dockerfile"
}
}
}
Done some debugging and seems related to changes in
gohclfork. This error is triggered atbuildx/bake/hclparser/gohcl/decode.go
Lines 295 to 305 in 71c7889
As we are using our own decode options for implied types in
buildx/bake/hclparser/hclparser.go
Line 992 in 71c7889
With previous release: