Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/compose/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"os"
"strings"

"github.com/compose-spec/compose-go/v2/cli"
"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/cli"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli/command"
cliopts "github.com/docker/cli/opts"
"github.com/spf13/cobra"
Expand Down
20 changes: 13 additions & 7 deletions cmd/compose/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ import (
"strings"
"syscall"

"github.com/compose-spec/compose-go/v2/cli"
"github.com/compose-spec/compose-go/v2/dotenv"
"github.com/compose-spec/compose-go/v2/loader"
composepaths "github.com/compose-spec/compose-go/v2/paths"
"github.com/compose-spec/compose-go/v2/types"
composegoutils "github.com/compose-spec/compose-go/v2/utils"
"github.com/compose-spec/compose-go/v3/cli"
"github.com/compose-spec/compose-go/v3/dotenv"
"github.com/compose-spec/compose-go/v3/loader"
composepaths "github.com/compose-spec/compose-go/v3/paths"
"github.com/compose-spec/compose-go/v3/types"
composegoutils "github.com/compose-spec/compose-go/v3/utils"
dockercli "github.com/docker/cli/cli"
"github.com/docker/cli/cli-plugins/metadata"
"github.com/docker/cli/cli/command"
Expand Down Expand Up @@ -317,7 +317,13 @@ func (o *ProjectOptions) ToProject(ctx context.Context, dockerCli command.Cli, b
case "extends":
metrics.CountExtends++
case "include":
paths := metadata["path"].(types.StringList)
var paths []string
switch p := metadata["path"].(type) {
case []string:
paths = p
case types.StringList:
paths = p
}
for _, path := range paths {
var isRemote bool
for _, r := range remotes {
Expand Down
2 changes: 1 addition & 1 deletion cmd/compose/compose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package compose
import (
"testing"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"gotest.tools/v3/assert"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/compose/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import (
"sort"
"strings"

"github.com/compose-spec/compose-go/v2/cli"
"github.com/compose-spec/compose-go/v2/template"
"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/cli"
"github.com/compose-spec/compose-go/v3/template"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
"go.yaml.in/yaml/v4"
Expand Down
2 changes: 1 addition & 1 deletion cmd/compose/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strings"
"time"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli/command"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cmd/compose/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"os"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion cmd/compose/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"os"
"time"

"github.com/compose-spec/compose-go/v2/cli"
"github.com/compose-spec/compose-go/v3/cli"
"github.com/docker/cli/cli-plugins/hooks"
"github.com/docker/cli/cli-plugins/metadata"
"github.com/spf13/cobra"
Expand Down
6 changes: 3 additions & 3 deletions cmd/compose/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"strings"
"text/tabwriter"

"github.com/compose-spec/compose-go/v2/cli"
"github.com/compose-spec/compose-go/v2/template"
"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/cli"
"github.com/compose-spec/compose-go/v3/template"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli/command"

"github.com/docker/compose/v5/cmd/display"
Expand Down
2 changes: 1 addition & 1 deletion cmd/compose/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"strings"
"testing"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli/streams"
"go.uber.org/mock/gomock"
"gotest.tools/v3/assert"
Expand Down
4 changes: 2 additions & 2 deletions cmd/compose/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"fmt"
"os"

"github.com/compose-spec/compose-go/v2/cli"
"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/cli"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli/command"
"github.com/morikuni/aec"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cmd/compose/pullOptions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package compose
import (
"testing"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"gotest.tools/v3/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/compose/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package compose
import (
"context"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"

Expand Down
8 changes: 4 additions & 4 deletions cmd/compose/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"os"
"strings"

composecli "github.com/compose-spec/compose-go/v2/cli"
"github.com/compose-spec/compose-go/v2/dotenv"
"github.com/compose-spec/compose-go/v2/format"
"github.com/compose-spec/compose-go/v2/types"
composecli "github.com/compose-spec/compose-go/v3/cli"
"github.com/compose-spec/compose-go/v3/dotenv"
"github.com/compose-spec/compose-go/v3/format"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/opts"
Expand Down
2 changes: 1 addition & 1 deletion cmd/compose/scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strconv"
"strings"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"

Expand Down
2 changes: 1 addition & 1 deletion cmd/compose/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strings"
"time"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli/command"
xprogress "github.com/moby/buildkit/util/progress/progressui"
"github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion cmd/compose/up_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package compose
import (
"testing"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"gotest.tools/v3/assert"

"github.com/docker/compose/v5/pkg/api"
Expand Down
2 changes: 1 addition & 1 deletion cmd/compose/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"fmt"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli/command"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cmd/formatter/shortcut.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"time"

"github.com/buger/goterm"
"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/eiannone/keyboard"
"github.com/skratchdot/open-golang/open"

Expand Down
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/Microsoft/go-winio v0.6.2
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
github.com/buger/goterm v1.0.4
github.com/compose-spec/compose-go/v2 v2.11.0
github.com/compose-spec/compose-go/v3 v3.0.0-00010101000000-000000000000
github.com/containerd/console v1.0.5
github.com/containerd/containerd/v2 v2.2.3
github.com/containerd/errdefs v1.0.0
Expand Down Expand Up @@ -155,3 +155,6 @@ exclude (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
)

// Test compose-spec/compose-go#874 (v3 yaml.Node-based loader)
replace github.com/compose-spec/compose-go/v3 => github.com/ndeloof/compose-go/v3 v3.0.0-20260520203259-be243038d95d
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ github.com/cloudflare/circl v1.6.3 h1:9GPOhQGF9MCYUeXyMYlqTR6a5gTrgR/fBLXvUgtVcg
github.com/cloudflare/circl v1.6.3/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4=
github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb h1:EDmT6Q9Zs+SbUoc7Ik9EfrFqcylYqgPZ9ANSbTAntnE=
github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb/go.mod h1:ZjrT6AXHbDs86ZSdt/osfBi5qfexBrKUdONk989Wnk4=
github.com/compose-spec/compose-go/v2 v2.11.0 h1:xoq/ootgIL6TsHmbJHrkuh7+bzjhPV3NHftHRPPyVXM=
github.com/compose-spec/compose-go/v2 v2.11.0/go.mod h1:ZU6zlcweCZKyiB7BVfCizQT9XmkEIMFE+PRZydVcsZg=
github.com/containerd/cgroups/v3 v3.1.3 h1:eUNflyMddm18+yrDmZPn3jI7C5hJ9ahABE5q6dyLYXQ=
github.com/containerd/cgroups/v3 v3.1.3/go.mod h1:PKZ2AcWmSBsY/tJUVhtS/rluX0b1uq1GmPO1ElCmbOw=
github.com/containerd/console v1.0.5 h1:R0ymNeydRqH2DmakFNdmjR2k0t7UPuiOV/N/27/qqsc=
Expand Down Expand Up @@ -274,6 +272,8 @@ github.com/morikuni/aec v1.1.0 h1:vBBl0pUnvi/Je71dsRrhMBtreIqNMYErSAbEeb8jrXQ=
github.com/morikuni/aec v1.1.0/go.mod h1:xDRgiq/iw5l+zkao76YTKzKttOp2cwPEne25HDkJnBw=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/ndeloof/compose-go/v3 v3.0.0-20260520203259-be243038d95d h1:M7N1bFY3Bo9xAQXcITR+mBS/BxWQR2bg8Nit3rAQ6WQ=
github.com/ndeloof/compose-go/v3 v3.0.0-20260520203259-be243038d95d/go.mod h1:T2nHQNgm3/qlnFZYTkVqiJbiGlwUK/ksjhkZCOLrJvg=
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
github.com/oklog/ulid/v2 v2.1.1 h1:suPZ4ARWLOJLegGFiZZ1dFAkqzhMjL3J1TzI+5wHz8s=
github.com/oklog/ulid/v2 v2.1.1/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ=
Expand Down
2 changes: 1 addition & 1 deletion internal/tracing/attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strings"
"time"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/moby/moby/api/types/container"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
Expand Down
2 changes: 1 addition & 1 deletion internal/tracing/attributes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package tracing
import (
"testing"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"gotest.tools/v3/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"strings"
"time"

"github.com/compose-spec/compose-go/v2/cli"
"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/cli"
"github.com/compose-spec/compose-go/v3/types"
"github.com/containerd/platforms"
"github.com/docker/cli/opts"
"github.com/moby/moby/api/types/container"
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package api
import (
"testing"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"gotest.tools/v3/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/bridge/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"runtime"
"strconv"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/containerd/errdefs"
"github.com/docker/cli/cli/command"
cli "github.com/docker/cli/cli/command/container"
Expand Down
2 changes: 1 addition & 1 deletion pkg/compose/apiSocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"fmt"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli/config/configfile"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/compose/attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"io"
"strings"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/moby/moby/api/pkg/stdcopy"
containerType "github.com/moby/moby/api/types/container"
"github.com/moby/moby/client"
Expand Down
2 changes: 1 addition & 1 deletion pkg/compose/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"
"time"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/containerd/platforms"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion pkg/compose/build_bake.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"slices"
"strings"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/containerd/console"
"github.com/containerd/errdefs"
"github.com/docker/cli/cli-plugins/manager"
Expand Down
2 changes: 1 addition & 1 deletion pkg/compose/build_classic.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"path/filepath"
"strings"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command/image/build"
"github.com/moby/go-archive"
Expand Down
2 changes: 1 addition & 1 deletion pkg/compose/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"slices"
"testing"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"gotest.tools/v3/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/compose/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"strings"
"sync"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/buildx/store/storeutil"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/config/configfile"
Expand Down
2 changes: 1 addition & 1 deletion pkg/compose/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"sort"
"strconv"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/client"
"golang.org/x/sync/errgroup"
Expand Down
2 changes: 1 addition & 1 deletion pkg/compose/convergence.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"sync"
"time"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/containerd/platforms"
"github.com/moby/moby/api/types/container"
mmount "github.com/moby/moby/api/types/mount"
Expand Down
2 changes: 1 addition & 1 deletion pkg/compose/convergence_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"strings"
"testing"

"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/types"
"github.com/docker/cli/cli/config/configfile"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/moby/moby/api/types/container"
Expand Down
2 changes: 1 addition & 1 deletion pkg/compose/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"time"

compose "github.com/compose-spec/compose-go/v2/types"
compose "github.com/compose-spec/compose-go/v3/types"
"github.com/moby/moby/api/types/container"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/compose/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import (
"strconv"
"strings"

"github.com/compose-spec/compose-go/v2/paths"
"github.com/compose-spec/compose-go/v2/types"
"github.com/compose-spec/compose-go/v3/paths"
"github.com/compose-spec/compose-go/v3/types"
"github.com/containerd/errdefs"
"github.com/moby/moby/api/types/blkiodev"
"github.com/moby/moby/api/types/container"
Expand Down
Loading
Loading