@@ -14,7 +14,7 @@ import (
1414 gateway "github.com/moby/buildkit/frontend/gateway/client"
1515 "github.com/moby/buildkit/util/flightcontrol"
1616 "github.com/moby/buildkit/util/tracing"
17- specs "github.com/opencontainers/image-spec/specs-go/v1"
17+ ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
1818 "github.com/pkg/errors"
1919 "go.opentelemetry.io/otel/trace"
2020 "golang.org/x/sync/errgroup"
@@ -23,7 +23,7 @@ import (
2323type resolvedNode struct {
2424 resolver * nodeResolver
2525 driverIndex int
26- platforms []specs .Platform
26+ platforms []ocispecs .Platform
2727}
2828
2929func (dp resolvedNode ) Node () builder.Node {
@@ -46,7 +46,7 @@ func (dp resolvedNode) BuildOpts(ctx context.Context) (gateway.BuildOpts, error)
4646 return opts [0 ], nil
4747}
4848
49- type matchMaker func (specs .Platform ) platforms.MatchComparer
49+ type matchMaker func (ocispecs .Platform ) platforms.MatchComparer
5050
5151type cachedGroup [T any ] struct {
5252 g flightcontrol.Group [T ]
@@ -112,7 +112,7 @@ func (r *nodeResolver) Resolve(ctx context.Context, opt map[string]Options, pw p
112112 return nil , err
113113 }
114114 eg , egCtx := errgroup .WithContext (ctx )
115- workers := make ([][]specs .Platform , len (clients ))
115+ workers := make ([][]ocispecs .Platform , len (clients ))
116116 for i , c := range clients {
117117 i , c := i , c
118118 if c == nil {
@@ -124,7 +124,7 @@ func (r *nodeResolver) Resolve(ctx context.Context, opt map[string]Options, pw p
124124 return errors .Wrap (err , "listing workers" )
125125 }
126126
127- ps := make (map [string ]specs .Platform , len (ww ))
127+ ps := make (map [string ]ocispecs .Platform , len (ww ))
128128 for _ , w := range ww {
129129 for _ , p := range w .Platforms {
130130 pk := platforms .Format (platforms .Normalize (p ))
@@ -145,7 +145,7 @@ func (r *nodeResolver) Resolve(ctx context.Context, opt map[string]Options, pw p
145145 // (this time we don't care about imperfect matches)
146146 nodes = map [string ][]* resolvedNode {}
147147 for k , opt := range opt {
148- node , _ , err := r .resolve (ctx , opt .Platforms , pw , platforms .Only , func (idx int , n builder.Node ) []specs .Platform {
148+ node , _ , err := r .resolve (ctx , opt .Platforms , pw , platforms .Only , func (idx int , n builder.Node ) []ocispecs .Platform {
149149 return workers [idx ]
150150 })
151151 if err != nil {
@@ -173,7 +173,7 @@ func (r *nodeResolver) Resolve(ctx context.Context, opt map[string]Options, pw p
173173 return nodes , nil
174174}
175175
176- func (r * nodeResolver ) resolve (ctx context.Context , ps []specs .Platform , pw progress.Writer , matcher matchMaker , additional func (idx int , n builder.Node ) []specs .Platform ) ([]* resolvedNode , bool , error ) {
176+ func (r * nodeResolver ) resolve (ctx context.Context , ps []ocispecs .Platform , pw progress.Writer , matcher matchMaker , additional func (idx int , n builder.Node ) []ocispecs .Platform ) ([]* resolvedNode , bool , error ) {
177177 if len (r .nodes ) == 0 {
178178 return nil , true , nil
179179 }
@@ -203,7 +203,7 @@ func (r *nodeResolver) resolve(ctx context.Context, ps []specs.Platform, pw prog
203203 driverIndex : idx ,
204204 }
205205 if len (ps ) > 0 {
206- node .platforms = []specs .Platform {ps [i ]}
206+ node .platforms = []ocispecs .Platform {ps [i ]}
207207 }
208208 nodes = append (nodes , node )
209209 }
@@ -216,9 +216,9 @@ func (r *nodeResolver) resolve(ctx context.Context, ps []specs.Platform, pw prog
216216 return nodes , perfect , nil
217217}
218218
219- func (r * nodeResolver ) get (p specs .Platform , matcher matchMaker , additionalPlatforms func (int , builder.Node ) []specs .Platform ) int {
219+ func (r * nodeResolver ) get (p ocispecs .Platform , matcher matchMaker , additionalPlatforms func (int , builder.Node ) []ocispecs .Platform ) int {
220220 best := - 1
221- bestPlatform := specs .Platform {}
221+ bestPlatform := ocispecs .Platform {}
222222 for i , node := range r .nodes {
223223 platforms := node .Platforms
224224 if additionalPlatforms != nil {
0 commit comments