@@ -29,6 +29,7 @@ import (
2929 "github.com/docker/cli/cli/command"
3030 "github.com/spf13/cobra"
3131
32+ "github.com/docker/compose/v2/internal/tracing"
3233 "github.com/docker/compose/v2/pkg/api"
3334 "github.com/docker/compose/v2/pkg/compose"
3435)
@@ -50,7 +51,7 @@ type configOptions struct {
5051 noConsistency bool
5152}
5253
53- func (o * configOptions ) ToProject (ctx context.Context , dockerCli command.Cli , services []string , po ... cli.ProjectOptionsFn ) (* types.Project , error ) {
54+ func (o * configOptions ) ToProject (ctx context.Context , dockerCli command.Cli , services []string , po ... cli.ProjectOptionsFn ) (* types.Project , tracing. Metrics , error ) {
5455 po = append (po ,
5556 cli .WithInterpolation (! o .noInterpolate ),
5657 cli .WithResolvedPaths (! o .noResolvePath ),
@@ -124,7 +125,7 @@ func configCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service
124125
125126func runConfig (ctx context.Context , dockerCli command.Cli , backend api.Service , opts configOptions , services []string ) error {
126127 var content []byte
127- project , err := opts .ToProject (ctx , dockerCli , services )
128+ project , _ , err := opts .ToProject (ctx , dockerCli , services )
128129 if err != nil {
129130 return err
130131 }
@@ -154,7 +155,7 @@ func runConfig(ctx context.Context, dockerCli command.Cli, backend api.Service,
154155}
155156
156157func runServices (ctx context.Context , dockerCli command.Cli , opts configOptions ) error {
157- project , err := opts .ToProject (ctx , dockerCli , nil , cli .WithoutEnvironmentResolution )
158+ project , _ , err := opts .ToProject (ctx , dockerCli , nil , cli .WithoutEnvironmentResolution )
158159 if err != nil {
159160 return err
160161 }
@@ -166,7 +167,7 @@ func runServices(ctx context.Context, dockerCli command.Cli, opts configOptions)
166167}
167168
168169func runVolumes (ctx context.Context , dockerCli command.Cli , opts configOptions ) error {
169- project , err := opts .ToProject (ctx , dockerCli , nil , cli .WithoutEnvironmentResolution )
170+ project , _ , err := opts .ToProject (ctx , dockerCli , nil , cli .WithoutEnvironmentResolution )
170171 if err != nil {
171172 return err
172173 }
@@ -181,7 +182,7 @@ func runHash(ctx context.Context, dockerCli command.Cli, opts configOptions) err
181182 if opts .hash != "*" {
182183 services = append (services , strings .Split (opts .hash , "," )... )
183184 }
184- project , err := opts .ToProject (ctx , dockerCli , nil , cli .WithoutEnvironmentResolution )
185+ project , _ , err := opts .ToProject (ctx , dockerCli , nil , cli .WithoutEnvironmentResolution )
185186 if err != nil {
186187 return err
187188 }
@@ -217,7 +218,7 @@ func runHash(ctx context.Context, dockerCli command.Cli, opts configOptions) err
217218
218219func runProfiles (ctx context.Context , dockerCli command.Cli , opts configOptions , services []string ) error {
219220 set := map [string ]struct {}{}
220- project , err := opts .ToProject (ctx , dockerCli , services , cli .WithoutEnvironmentResolution )
221+ project , _ , err := opts .ToProject (ctx , dockerCli , services , cli .WithoutEnvironmentResolution )
221222 if err != nil {
222223 return err
223224 }
@@ -238,7 +239,7 @@ func runProfiles(ctx context.Context, dockerCli command.Cli, opts configOptions,
238239}
239240
240241func runConfigImages (ctx context.Context , dockerCli command.Cli , opts configOptions , services []string ) error {
241- project , err := opts .ToProject (ctx , dockerCli , services , cli .WithoutEnvironmentResolution )
242+ project , _ , err := opts .ToProject (ctx , dockerCli , services , cli .WithoutEnvironmentResolution )
242243 if err != nil {
243244 return err
244245 }
0 commit comments