Conversation
191873b to
3d628de
Compare
| go 1.23 | ||
|
|
||
| toolchain go1.23.7 |
There was a problem hiding this comment.
| module github.com/docker/buildx | ||
|
|
||
| go 1.22.0 | ||
| go 1.23 |
There was a problem hiding this comment.
Hum lint seems to fail because gopls rules apply to version from go.mod: https://github.com/docker/buildx/actions/runs/13858143332/job/38779661844?pr=3064#step:4:519
> [gopls-analyze 3/3] RUN --mount=target=. --mount=target=/root/.cache,type=cache,id=lint-cache-${TARGETNAME}-darwin/amd64 --mount=target=/gopls-analyzers,from=gopls,source=/out <<EOF (set -ex...):
124.1 controller/pb/export.go:30:4: Replace m[k]=v loop with maps.Copy
125.7 # github.com/docker/buildx/store
125.7 # [github.com/docker/buildx/store]
125.7 store/nodegroup.go:97:5: Replace m[k]=v loop with maps.Copy
125.7 store/nodegroup.go:151:3: Replace m[k]=v loop with maps.Clone
126.0 # github.com/docker/buildx/util/imagetools
126.0 # [github.com/docker/buildx/util/imagetools]
126.0 util/imagetools/create.go:111:5: Replace m[k]=v loop with maps.Copy
126.0 util/imagetools/loader.go:131:4: Replace m[k]=v loop with maps.Clone
126.0 util/imagetools/loader.go:134:4: Replace m[k]=v loop with maps.Copy
Whereas for golangci-lint we enforce it to avoid this issue:
Lines 4 to 6 in 00fdcd3
@tonistiigi Might just be a matter of setting GOVERSION env in
buildx/hack/dockerfiles/lint.Dockerfile
Line 76 in 00fdcd3
| github.com/Microsoft/go-winio v0.6.2 | ||
| github.com/aws/aws-sdk-go-v2/config v1.27.27 | ||
| github.com/compose-spec/compose-go/v2 v2.4.8 | ||
| github.com/compose-spec/compose-go/v2 v2.4.9 |
There was a problem hiding this comment.
I think PR title is wrong and should be bump compose-go to v2.4.9 😅
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
3d628de to
3e037bb
Compare
3e037bb to
f2e5bec
Compare
|
pushed extra commit to fix go.mod and lint issues |
|
|
||
| func validateCompose(dt []byte, envs map[string]string) error { | ||
| _, err := loader.Load(composetypes.ConfigDetails{ | ||
| _, err := loader.LoadWithContext(context.Background(), composetypes.ConfigDetails{ |
There was a problem hiding this comment.
Don't we have a better context for this that we could pass in?
| for k, v := range n.DriverOpts { | ||
| driverOpts[k] = v | ||
| } | ||
| driverOpts := maps.Clone(n.DriverOpts) |
There was a problem hiding this comment.
This is not 100% the same as it could leave driverOpts nil.
Note that modernize --fix does these updates automatically.
| for k, v := range mfst.manifest.Annotations { | ||
| annotations[k] = v | ||
| } | ||
| annotations := maps.Clone(mfst.desc.Annotations) |
There was a problem hiding this comment.
Interesting that suggested fix was maps.Clone: https://github.com/docker/buildx/actions/runs/13858143332/job/38779661844#step:4:528
126.0 util/imagetools/loader.go:131:4: Replace m[k]=v loop with maps.Clone
But modernize --fix does a maps.Copy.
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
f2e5bec to
212d598
Compare
No description provided.