From 1f9599aba3bd5adecba0d112b9845f2943c8408a Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Mon, 27 Apr 2020 16:35:20 -0700 Subject: [PATCH 01/11] llb: move source mapping to llb metadata Signed-off-by: Tonis Tiigi --- client/llb/state.go | 10 + frontend/dockerfile/builder/build.go | 10 +- solver/errdefs/errdefs.pb.go | 160 +--- solver/errdefs/errdefs.proto | 19 +- solver/errdefs/generate.go | 2 +- solver/errdefs/source.go | 21 +- solver/pb/ops.pb.go | 1104 ++++++++++++++++++++++---- solver/pb/ops.proto | 19 + 8 files changed, 1036 insertions(+), 309 deletions(-) diff --git a/client/llb/state.go b/client/llb/state.go index 195cee3e..a237d12d 100644 --- a/client/llb/state.go +++ b/client/llb/state.go @@ -433,6 +433,10 @@ func mergeMetadata(m1, m2 pb.OpMetadata) pb.OpMetadata { m1.ExportCache = m2.ExportCache } + if m2.Source != nil { + m1.Source = m2.Source + } + for k := range m2.Caps { if m1.Caps == nil { m1.Caps = make(map[apicaps.CapID]bool, len(m2.Caps)) @@ -458,6 +462,12 @@ func WithDescription(m map[string]string) ConstraintsOpt { }) } +func WithSourceMapping(s *pb.Source) ConstraintsOpt { + return constraintsOptFunc(func(c *Constraints) { + c.Metadata.Source = s + }) +} + func WithCustomName(name string) ConstraintsOpt { return WithDescription(map[string]string{ "llb.customname": name, diff --git a/frontend/dockerfile/builder/build.go b/frontend/dockerfile/builder/build.go index d77a80c4..fca9c4bd 100644 --- a/frontend/dockerfile/builder/build.go +++ b/frontend/dockerfile/builder/build.go @@ -657,19 +657,19 @@ func scopeToSubDir(c *llb.State, fileop bool, dir string) *llb.State { } func wrapSource(err error, dt []byte, filename, local string, locations []parser.Range) error { - s := errdefs.Source{ + s := &pb.Source{ Data: dt, Filename: filename, Local: local, - Locations: make([]*errdefs.Range, 0, len(locations)), + Locations: make([]*pb.Range, 0, len(locations)), } for _, l := range locations { - s.Locations = append(s.Locations, &errdefs.Range{ - Start: &errdefs.Position{ + s.Locations = append(s.Locations, &pb.Range{ + Start: &pb.Position{ Line: int32(l.Start.Line), Character: int32(l.Start.Character), }, - End: &errdefs.Position{ + End: &pb.Position{ Line: int32(l.End.Line), Character: int32(l.End.Character), }, diff --git a/solver/errdefs/errdefs.pb.go b/solver/errdefs/errdefs.pb.go index abe03830..b6084aac 100644 --- a/solver/errdefs/errdefs.pb.go +++ b/solver/errdefs/errdefs.pb.go @@ -6,6 +6,7 @@ package errdefs import ( fmt "fmt" proto "github.com/golang/protobuf/proto" + pb "github.com/moby/buildkit/solver/pb" math "math" ) @@ -60,13 +61,10 @@ func (m *Vertex) GetDigest() string { } type Source struct { - Locations []*Range `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty"` - Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"` - Local string `protobuf:"bytes,3,opt,name=local,proto3" json:"local,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Source *pb.Source `protobuf:"bytes,1,opt,name=Source,proto3" json:"Source,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Source) Reset() { *m = Source{} } @@ -94,152 +92,30 @@ func (m *Source) XXX_DiscardUnknown() { var xxx_messageInfo_Source proto.InternalMessageInfo -func (m *Source) GetLocations() []*Range { +func (m *Source) GetSource() *pb.Source { if m != nil { - return m.Locations + return m.Source } return nil } -func (m *Source) GetFilename() string { - if m != nil { - return m.Filename - } - return "" -} - -func (m *Source) GetLocal() string { - if m != nil { - return m.Local - } - return "" -} - -func (m *Source) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -type Range struct { - Start *Position `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` - End *Position `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Range) Reset() { *m = Range{} } -func (m *Range) String() string { return proto.CompactTextString(m) } -func (*Range) ProtoMessage() {} -func (*Range) Descriptor() ([]byte, []int) { - return fileDescriptor_689dc58a5060aff5, []int{2} -} - -func (m *Range) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Range.Unmarshal(m, b) -} -func (m *Range) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Range.Marshal(b, m, deterministic) -} -func (m *Range) XXX_Merge(src proto.Message) { - xxx_messageInfo_Range.Merge(m, src) -} -func (m *Range) XXX_Size() int { - return xxx_messageInfo_Range.Size(m) -} -func (m *Range) XXX_DiscardUnknown() { - xxx_messageInfo_Range.DiscardUnknown(m) -} - -var xxx_messageInfo_Range proto.InternalMessageInfo - -func (m *Range) GetStart() *Position { - if m != nil { - return m.Start - } - return nil -} - -func (m *Range) GetEnd() *Position { - if m != nil { - return m.End - } - return nil -} - -type Position struct { - Line int32 `protobuf:"varint,1,opt,name=Line,proto3" json:"Line,omitempty"` - Character int32 `protobuf:"varint,2,opt,name=Character,proto3" json:"Character,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Position) Reset() { *m = Position{} } -func (m *Position) String() string { return proto.CompactTextString(m) } -func (*Position) ProtoMessage() {} -func (*Position) Descriptor() ([]byte, []int) { - return fileDescriptor_689dc58a5060aff5, []int{3} -} - -func (m *Position) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Position.Unmarshal(m, b) -} -func (m *Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Position.Marshal(b, m, deterministic) -} -func (m *Position) XXX_Merge(src proto.Message) { - xxx_messageInfo_Position.Merge(m, src) -} -func (m *Position) XXX_Size() int { - return xxx_messageInfo_Position.Size(m) -} -func (m *Position) XXX_DiscardUnknown() { - xxx_messageInfo_Position.DiscardUnknown(m) -} - -var xxx_messageInfo_Position proto.InternalMessageInfo - -func (m *Position) GetLine() int32 { - if m != nil { - return m.Line - } - return 0 -} - -func (m *Position) GetCharacter() int32 { - if m != nil { - return m.Character - } - return 0 -} - func init() { proto.RegisterType((*Vertex)(nil), "errdefs.Vertex") proto.RegisterType((*Source)(nil), "errdefs.Source") - proto.RegisterType((*Range)(nil), "errdefs.Range") - proto.RegisterType((*Position)(nil), "errdefs.Position") } func init() { proto.RegisterFile("errdefs.proto", fileDescriptor_689dc58a5060aff5) } var fileDescriptor_689dc58a5060aff5 = []byte{ - // 237 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xbb, 0x4b, 0x04, 0x31, - 0x10, 0xc6, 0x59, 0xf7, 0xb2, 0xde, 0xce, 0xa9, 0xe0, 0x20, 0x12, 0xc4, 0x62, 0x59, 0x0b, 0xb7, - 0x90, 0x2b, 0xce, 0xd6, 0xce, 0xd6, 0x42, 0x22, 0xda, 0xc7, 0xdd, 0xb9, 0x33, 0xb0, 0x26, 0x32, - 0x89, 0x60, 0xe1, 0x1f, 0x2f, 0x99, 0xbd, 0x47, 0x63, 0x37, 0xdf, 0x83, 0xdf, 0x17, 0x02, 0xa7, - 0xc4, 0x3c, 0xd0, 0x3a, 0x2e, 0xbf, 0x38, 0xa4, 0x80, 0xc7, 0x5b, 0xd9, 0x36, 0x50, 0xbd, 0x11, - 0x27, 0xfa, 0xc1, 0x4b, 0xa8, 0x06, 0xb7, 0xa1, 0x98, 0x74, 0xd1, 0x14, 0x5d, 0x6d, 0xb6, 0xaa, - 0xfd, 0x85, 0xea, 0x25, 0x7c, 0x73, 0x4f, 0x78, 0x07, 0xf5, 0x18, 0x7a, 0x9b, 0x5c, 0xf0, 0x51, - 0x17, 0x4d, 0xd9, 0x2d, 0x56, 0x67, 0xcb, 0x1d, 0xd7, 0x58, 0xbf, 0x21, 0x73, 0x28, 0xe0, 0x15, - 0xcc, 0xd7, 0x6e, 0x24, 0x6f, 0x3f, 0x49, 0x1f, 0x09, 0x71, 0xaf, 0xf1, 0x02, 0x54, 0x2e, 0x8e, - 0xba, 0x94, 0x60, 0x12, 0x88, 0x30, 0x1b, 0x6c, 0xb2, 0x7a, 0xd6, 0x14, 0xdd, 0x89, 0x91, 0xbb, - 0x7d, 0x05, 0x25, 0x64, 0xbc, 0x05, 0x15, 0x93, 0xe5, 0xe9, 0x75, 0x8b, 0xd5, 0xf9, 0x7e, 0xf8, - 0x39, 0x44, 0x97, 0x17, 0xcd, 0x94, 0xe3, 0x0d, 0x94, 0xe4, 0x07, 0x99, 0xfc, 0xb7, 0x96, 0xd3, - 0xf6, 0x01, 0xe6, 0x3b, 0x23, 0xcf, 0x3e, 0x39, 0x4f, 0x02, 0x56, 0x46, 0x6e, 0xbc, 0x86, 0xfa, - 0xf1, 0xc3, 0xb2, 0xed, 0x13, 0xb1, 0xa0, 0x94, 0x39, 0x18, 0xef, 0x95, 0x7c, 0xe2, 0xfd, 0x5f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x49, 0x7f, 0xe8, 0xa9, 0x55, 0x01, 0x00, 0x00, + // 145 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0x2d, 0x2a, 0x4a, + 0x49, 0x4d, 0x2b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x74, 0xd2, + 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x73, 0xf3, 0x93, 0x2a, 0xf5, 0x93, + 0x4a, 0x33, 0x73, 0x52, 0xb2, 0x33, 0x4b, 0xf4, 0x8b, 0xf3, 0x73, 0xca, 0x52, 0x8b, 0xf4, 0x0b, + 0x92, 0xf4, 0xf3, 0x0b, 0xa0, 0xda, 0x94, 0x14, 0xb8, 0xd8, 0xc2, 0x52, 0x8b, 0x4a, 0x52, 0x2b, + 0x84, 0xc4, 0xb8, 0xd8, 0x52, 0x32, 0xd3, 0x53, 0x8b, 0x4b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, + 0x83, 0xa0, 0x3c, 0x25, 0x1d, 0x2e, 0xb6, 0xe0, 0xfc, 0xd2, 0xa2, 0xe4, 0x54, 0x21, 0x25, 0x18, + 0x0b, 0xac, 0x82, 0xdb, 0x88, 0x4b, 0xaf, 0x20, 0x49, 0x0f, 0x22, 0x12, 0x04, 0x95, 0x49, 0x62, + 0x03, 0x1b, 0x6b, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x2e, 0x92, 0x6d, 0x9e, 0x00, 0x00, + 0x00, } diff --git a/solver/errdefs/errdefs.proto b/solver/errdefs/errdefs.proto index 951140c9..46b2c194 100644 --- a/solver/errdefs/errdefs.proto +++ b/solver/errdefs/errdefs.proto @@ -2,23 +2,12 @@ syntax = "proto3"; package errdefs; +import "github.com/moby/buildkit/solver/pb/ops.proto"; + message Vertex { string digest = 1; } message Source { - repeated Range locations = 1; - string filename = 2; - string local = 3; - bytes data = 4; -} - -message Range { - Position start = 1; - Position end = 2; -} - -message Position { - int32 Line = 1; - int32 Character = 2; -} + pb.Source Source = 1; +} \ No newline at end of file diff --git a/solver/errdefs/generate.go b/solver/errdefs/generate.go index 310f2ecd..5da07a5d 100644 --- a/solver/errdefs/generate.go +++ b/solver/errdefs/generate.go @@ -1,3 +1,3 @@ package errdefs -//go:generate protoc -I=. -I=../../vendor/ --go_out=. errdefs.proto +//go:generate protoc -I=. -I=../../vendor/ -I=../../../../../ --go_out=. errdefs.proto diff --git a/solver/errdefs/source.go b/solver/errdefs/source.go index 2e51eaa7..cd32dec1 100644 --- a/solver/errdefs/source.go +++ b/solver/errdefs/source.go @@ -5,15 +5,16 @@ import ( "io" "strings" + pb "github.com/moby/buildkit/solver/pb" "github.com/moby/buildkit/util/grpcerrors" "github.com/pkg/errors" ) -func WithSource(err error, src Source) error { +func WithSource(err error, src *pb.Source) error { if err == nil { return nil } - return &ErrorSource{Source: src, error: err} + return &ErrorSource{Source: Source{Source: src}, error: err} } type ErrorSource struct { @@ -44,9 +45,13 @@ func (s *Source) WrapError(err error) error { } func (s *Source) Print(w io.Writer) error { - lines := strings.Split(string(s.Data), "\n") + ss := s.Source + if ss == nil { + return nil + } + lines := strings.Split(string(ss.Data), "\n") - start, end, ok := getStartEndLine(s.Locations) + start, end, ok := getStartEndLine(ss.Locations) if !ok { return nil } @@ -79,10 +84,10 @@ func (s *Source) Print(w io.Writer) error { p++ } - fmt.Fprintf(w, "%s:%d\n--------------------\n", s.Filename, prepadStart) + fmt.Fprintf(w, "%s:%d\n--------------------\n", ss.Filename, prepadStart) for i := start; i <= end; i++ { pfx := " " - if containsLine(s.Locations, i) { + if containsLine(ss.Locations, i) { pfx = ">>>" } fmt.Fprintf(w, " %3d | %s %s\n", i, pfx, lines[i-1]) @@ -91,7 +96,7 @@ func (s *Source) Print(w io.Writer) error { return nil } -func containsLine(rr []*Range, l int) bool { +func containsLine(rr []*pb.Range, l int) bool { for _, r := range rr { var s, e int if r.Start == nil { @@ -111,7 +116,7 @@ func containsLine(rr []*Range, l int) bool { return false } -func getStartEndLine(rr []*Range) (start int, end int, ok bool) { +func getStartEndLine(rr []*pb.Range) (start int, end int, ok bool) { for _, r := range rr { if r.Start != nil { if !ok || start > int(r.Start.Line) { diff --git a/solver/pb/ops.pb.go b/solver/pb/ops.pb.go index bfab9e37..6183363f 100644 --- a/solver/pb/ops.pb.go +++ b/solver/pb/ops.pb.go @@ -995,6 +995,7 @@ type OpMetadata struct { // WorkerConstraint worker_constraint = 3; ExportCache *ExportCache `protobuf:"bytes,4,opt,name=export_cache,json=exportCache,proto3" json:"export_cache,omitempty"` Caps map[github_com_moby_buildkit_util_apicaps.CapID]bool `protobuf:"bytes,5,rep,name=caps,proto3,castkey=github.com/moby/buildkit/util/apicaps.CapID" json:"caps" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Source *Source `protobuf:"bytes,6,opt,name=source,proto3" json:"source,omitempty"` } func (m *OpMetadata) Reset() { *m = OpMetadata{} } @@ -1054,6 +1055,173 @@ func (m *OpMetadata) GetCaps() map[github_com_moby_buildkit_util_apicaps.CapID]b return nil } +func (m *OpMetadata) GetSource() *Source { + if m != nil { + return m.Source + } + return nil +} + +type Source struct { + Locations []*Range `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty"` + Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"` + Local string `protobuf:"bytes,3,opt,name=local,proto3" json:"local,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` +} + +func (m *Source) Reset() { *m = Source{} } +func (m *Source) String() string { return proto.CompactTextString(m) } +func (*Source) ProtoMessage() {} +func (*Source) Descriptor() ([]byte, []int) { + return fileDescriptor_8de16154b2733812, []int{13} +} +func (m *Source) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Source) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Source) XXX_Merge(src proto.Message) { + xxx_messageInfo_Source.Merge(m, src) +} +func (m *Source) XXX_Size() int { + return m.Size() +} +func (m *Source) XXX_DiscardUnknown() { + xxx_messageInfo_Source.DiscardUnknown(m) +} + +var xxx_messageInfo_Source proto.InternalMessageInfo + +func (m *Source) GetLocations() []*Range { + if m != nil { + return m.Locations + } + return nil +} + +func (m *Source) GetFilename() string { + if m != nil { + return m.Filename + } + return "" +} + +func (m *Source) GetLocal() string { + if m != nil { + return m.Local + } + return "" +} + +func (m *Source) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +type Range struct { + Start *Position `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` + End *Position `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` +} + +func (m *Range) Reset() { *m = Range{} } +func (m *Range) String() string { return proto.CompactTextString(m) } +func (*Range) ProtoMessage() {} +func (*Range) Descriptor() ([]byte, []int) { + return fileDescriptor_8de16154b2733812, []int{14} +} +func (m *Range) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Range) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Range) XXX_Merge(src proto.Message) { + xxx_messageInfo_Range.Merge(m, src) +} +func (m *Range) XXX_Size() int { + return m.Size() +} +func (m *Range) XXX_DiscardUnknown() { + xxx_messageInfo_Range.DiscardUnknown(m) +} + +var xxx_messageInfo_Range proto.InternalMessageInfo + +func (m *Range) GetStart() *Position { + if m != nil { + return m.Start + } + return nil +} + +func (m *Range) GetEnd() *Position { + if m != nil { + return m.End + } + return nil +} + +type Position struct { + Line int32 `protobuf:"varint,1,opt,name=Line,proto3" json:"Line,omitempty"` + Character int32 `protobuf:"varint,2,opt,name=Character,proto3" json:"Character,omitempty"` +} + +func (m *Position) Reset() { *m = Position{} } +func (m *Position) String() string { return proto.CompactTextString(m) } +func (*Position) ProtoMessage() {} +func (*Position) Descriptor() ([]byte, []int) { + return fileDescriptor_8de16154b2733812, []int{15} +} +func (m *Position) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Position) XXX_Merge(src proto.Message) { + xxx_messageInfo_Position.Merge(m, src) +} +func (m *Position) XXX_Size() int { + return m.Size() +} +func (m *Position) XXX_DiscardUnknown() { + xxx_messageInfo_Position.DiscardUnknown(m) +} + +var xxx_messageInfo_Position proto.InternalMessageInfo + +func (m *Position) GetLine() int32 { + if m != nil { + return m.Line + } + return 0 +} + +func (m *Position) GetCharacter() int32 { + if m != nil { + return m.Character + } + return 0 +} + type ExportCache struct { Value bool `protobuf:"varint,1,opt,name=Value,proto3" json:"Value,omitempty"` } @@ -1062,7 +1230,7 @@ func (m *ExportCache) Reset() { *m = ExportCache{} } func (m *ExportCache) String() string { return proto.CompactTextString(m) } func (*ExportCache) ProtoMessage() {} func (*ExportCache) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{13} + return fileDescriptor_8de16154b2733812, []int{16} } func (m *ExportCache) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1105,7 +1273,7 @@ func (m *ProxyEnv) Reset() { *m = ProxyEnv{} } func (m *ProxyEnv) String() string { return proto.CompactTextString(m) } func (*ProxyEnv) ProtoMessage() {} func (*ProxyEnv) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{14} + return fileDescriptor_8de16154b2733812, []int{17} } func (m *ProxyEnv) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1167,7 +1335,7 @@ func (m *WorkerConstraints) Reset() { *m = WorkerConstraints{} } func (m *WorkerConstraints) String() string { return proto.CompactTextString(m) } func (*WorkerConstraints) ProtoMessage() {} func (*WorkerConstraints) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{15} + return fileDescriptor_8de16154b2733812, []int{18} } func (m *WorkerConstraints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1212,7 +1380,7 @@ func (m *Definition) Reset() { *m = Definition{} } func (m *Definition) String() string { return proto.CompactTextString(m) } func (*Definition) ProtoMessage() {} func (*Definition) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{16} + return fileDescriptor_8de16154b2733812, []int{19} } func (m *Definition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1260,7 +1428,7 @@ func (m *HostIP) Reset() { *m = HostIP{} } func (m *HostIP) String() string { return proto.CompactTextString(m) } func (*HostIP) ProtoMessage() {} func (*HostIP) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{17} + return fileDescriptor_8de16154b2733812, []int{20} } func (m *HostIP) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1307,7 +1475,7 @@ func (m *FileOp) Reset() { *m = FileOp{} } func (m *FileOp) String() string { return proto.CompactTextString(m) } func (*FileOp) ProtoMessage() {} func (*FileOp) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{18} + return fileDescriptor_8de16154b2733812, []int{21} } func (m *FileOp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1355,7 +1523,7 @@ func (m *FileAction) Reset() { *m = FileAction{} } func (m *FileAction) String() string { return proto.CompactTextString(m) } func (*FileAction) ProtoMessage() {} func (*FileAction) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{19} + return fileDescriptor_8de16154b2733812, []int{22} } func (m *FileAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1478,7 +1646,7 @@ func (m *FileActionCopy) Reset() { *m = FileActionCopy{} } func (m *FileActionCopy) String() string { return proto.CompactTextString(m) } func (*FileActionCopy) ProtoMessage() {} func (*FileActionCopy) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{20} + return fileDescriptor_8de16154b2733812, []int{23} } func (m *FileActionCopy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1597,7 +1765,7 @@ func (m *FileActionMkFile) Reset() { *m = FileActionMkFile{} } func (m *FileActionMkFile) String() string { return proto.CompactTextString(m) } func (*FileActionMkFile) ProtoMessage() {} func (*FileActionMkFile) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{21} + return fileDescriptor_8de16154b2733812, []int{24} } func (m *FileActionMkFile) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1674,7 +1842,7 @@ func (m *FileActionMkDir) Reset() { *m = FileActionMkDir{} } func (m *FileActionMkDir) String() string { return proto.CompactTextString(m) } func (*FileActionMkDir) ProtoMessage() {} func (*FileActionMkDir) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{22} + return fileDescriptor_8de16154b2733812, []int{25} } func (m *FileActionMkDir) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1747,7 +1915,7 @@ func (m *FileActionRm) Reset() { *m = FileActionRm{} } func (m *FileActionRm) String() string { return proto.CompactTextString(m) } func (*FileActionRm) ProtoMessage() {} func (*FileActionRm) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{23} + return fileDescriptor_8de16154b2733812, []int{26} } func (m *FileActionRm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1802,7 +1970,7 @@ func (m *ChownOpt) Reset() { *m = ChownOpt{} } func (m *ChownOpt) String() string { return proto.CompactTextString(m) } func (*ChownOpt) ProtoMessage() {} func (*ChownOpt) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{24} + return fileDescriptor_8de16154b2733812, []int{27} } func (m *ChownOpt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1852,7 +2020,7 @@ func (m *UserOpt) Reset() { *m = UserOpt{} } func (m *UserOpt) String() string { return proto.CompactTextString(m) } func (*UserOpt) ProtoMessage() {} func (*UserOpt) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{25} + return fileDescriptor_8de16154b2733812, []int{28} } func (m *UserOpt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1931,7 +2099,7 @@ func (m *NamedUserOpt) Reset() { *m = NamedUserOpt{} } func (m *NamedUserOpt) String() string { return proto.CompactTextString(m) } func (*NamedUserOpt) ProtoMessage() {} func (*NamedUserOpt) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{26} + return fileDescriptor_8de16154b2733812, []int{29} } func (m *NamedUserOpt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1986,6 +2154,9 @@ func init() { proto.RegisterType((*OpMetadata)(nil), "pb.OpMetadata") proto.RegisterMapType((map[github_com_moby_buildkit_util_apicaps.CapID]bool)(nil), "pb.OpMetadata.CapsEntry") proto.RegisterMapType((map[string]string)(nil), "pb.OpMetadata.DescriptionEntry") + proto.RegisterType((*Source)(nil), "pb.Source") + proto.RegisterType((*Range)(nil), "pb.Range") + proto.RegisterType((*Position)(nil), "pb.Position") proto.RegisterType((*ExportCache)(nil), "pb.ExportCache") proto.RegisterType((*ProxyEnv)(nil), "pb.ProxyEnv") proto.RegisterType((*WorkerConstraints)(nil), "pb.WorkerConstraints") @@ -2006,131 +2177,138 @@ func init() { func init() { proto.RegisterFile("ops.proto", fileDescriptor_8de16154b2733812) } var fileDescriptor_8de16154b2733812 = []byte{ - // 1978 bytes of a gzipped FileDescriptorProto + // 2094 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x5f, 0x6f, 0x1b, 0xc7, - 0x11, 0xd7, 0x1d, 0xff, 0xde, 0x50, 0x92, 0xd9, 0x8d, 0x93, 0xb2, 0xaa, 0x2b, 0x29, 0x97, 0x34, - 0x90, 0x65, 0x5b, 0x02, 0x14, 0x20, 0x09, 0xf2, 0x50, 0x54, 0xfc, 0x63, 0x88, 0x49, 0x2c, 0x0a, - 0x4b, 0xdb, 0xe9, 0x9b, 0x71, 0xbc, 0x5b, 0x52, 0x07, 0xf2, 0x6e, 0x0f, 0x7b, 0x4b, 0x5b, 0x7c, - 0xe9, 0x83, 0x3f, 0x41, 0x80, 0x02, 0x7d, 0x6b, 0x81, 0xbe, 0x14, 0xe8, 0x87, 0xe8, 0x7b, 0x1e, - 0x83, 0xa2, 0x0f, 0x69, 0x1f, 0xd2, 0xc2, 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 0xee, 0x1f, 0x2d, 0xa8, 0xea, 0x1c, 0x20, 0xb7, 0xa0, 0x1c, 0x31, 0xe9, 0xa9, - 0xfd, 0x1b, 0x27, 0x75, 0xf4, 0xed, 0x03, 0x26, 0x3d, 0xaa, 0xb8, 0x98, 0x5e, 0x11, 0x9f, 0xa3, - 0xef, 0xed, 0x3c, 0xbd, 0x1e, 0x20, 0x87, 0x1a, 0x01, 0xf9, 0x25, 0xd4, 0x62, 0x26, 0x9f, 0x71, - 0x31, 0x55, 0x3e, 0xda, 0xd6, 0x41, 0x3f, 0x67, 0xf2, 0x01, 0x0f, 0x18, 0xcd, 0x64, 0xe4, 0x2e, - 0xd4, 0x53, 0xe6, 0xcf, 0x45, 0x28, 0x17, 0xca, 0x5f, 0xdb, 0x27, 0x4d, 0x95, 0x65, 0x86, 0xa7, - 0xc0, 0x4b, 0x84, 0xfb, 0x17, 0x0b, 0xca, 0x68, 0x06, 0x21, 0x50, 0xf6, 0xc4, 0x44, 0x67, 0xb7, - 0x43, 0x15, 0x4d, 0x9a, 0x50, 0x62, 0xf1, 0x53, 0x65, 0x91, 0x43, 0x91, 0x44, 0x8e, 0xff, 0x2c, - 0x30, 0x31, 0x42, 0x12, 0xd7, 0xcd, 0x53, 0x26, 0x4c, 0x68, 0x14, 0x4d, 0x6e, 0x83, 0x93, 0x08, - 0x7e, 0xb5, 0x78, 0x82, 0xab, 0x2b, 0x85, 0xc4, 0x43, 0x66, 0x2f, 0x7e, 0x4a, 0xeb, 0x89, 0xa1, - 0xc8, 0x21, 0x00, 0xbb, 0x92, 0xc2, 0x3b, 0xe3, 0xa9, 0x4c, 0x5b, 0x55, 0x75, 0x76, 0x95, 0xef, - 0xc8, 0xe8, 0x5f, 0xd0, 0x82, 0xd4, 0xfd, 0x9b, 0x0d, 0x15, 0xe5, 0x12, 0x72, 0x80, 0x11, 0x48, - 0xe6, 0x3a, 0x98, 0xa5, 0x36, 0x31, 0x11, 0x00, 0x15, 0xeb, 0x65, 0x00, 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17, 0x11, 0x28, 0xf0, 0x7f, 0x09, + 0xd5, 0x94, 0x81, 0x9b, 0x3d, 0x0e, 0x23, 0x93, 0x63, 0x25, 0xaa, 0x69, 0x1c, 0x93, 0x5a, 0x17, + 0x4c, 0xb2, 0x40, 0x71, 0xd3, 0xe8, 0x4a, 0x34, 0x63, 0xf8, 0x1f, 0x40, 0x2d, 0x97, 0x1f, 0x78, + 0x86, 0x67, 0xda, 0x59, 0x26, 0x4b, 0xcd, 0x87, 0xff, 0x15, 0x0e, 0x71, 0x69, 0x5f, 0xfe, 0x19, + 0xc0, 0x85, 0x52, 0xf1, 0x73, 0xdd, 0xa8, 0xad, 0xa3, 0x3d, 0xe4, 0x68, 0x04, 0xd9, 0x82, 0x1a, + 0x7e, 0x24, 0x56, 0x6e, 0x9c, 0xa4, 0x57, 0x24, 0x06, 0xf0, 0x53, 0xf0, 0xce, 0xe7, 0xcb, 0x0b, + 0xd6, 0x87, 0xe9, 0xea, 0x9f, 0x40, 0x35, 0x12, 0x56, 0x66, 0xe6, 0x86, 0x4a, 0x24, 0xb4, 0xc8, + 0xbf, 0x07, 0x3f, 0x7a, 0x6d, 0xe2, 0x24, 0xb7, 0xa1, 0x7c, 0x1e, 0x8e, 0x95, 0x2e, 0x6b, 0x38, + 0x8a, 0xd8, 0x2f, 0xff, 0x1f, 0x0e, 0x40, 0x56, 0x82, 0x30, 0x2b, 0xb0, 0x3e, 0x21, 0x66, 0xd5, + 0xd4, 0xa3, 0x31, 0x54, 0x27, 0x36, 0xd3, 0xed, 0x7d, 0xbb, 0xb3, 0x58, 0xb6, 0xf6, 0xd2, 0x8b, + 0x60, 0xee, 0xc0, 0x81, 0xbd, 0x03, 0xef, 0x32, 0x15, 0xce, 0x77, 0xd8, 0x78, 0x04, 0x6b, 0x0b, + 0xea, 0xde, 0xb2, 0xa2, 0x65, 0xb7, 0x31, 0x9f, 0xb6, 0xf7, 0xa1, 0x6c, 0x46, 0x20, 0x0c, 0x37, + 0x52, 0x56, 0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0xb8, 0xdf, 0x69, 0x3d, 0xa5, 0x9d, 0xba, 0xb3, 0xfb, 0x6b, 0xf0, + 0xe6, 0xef, 0x4e, 0xd4, 0xd0, 0xec, 0x1e, 0xb7, 0xeb, 0x2b, 0x04, 0xa0, 0xdc, 0xef, 0xb4, 0x68, + 0x07, 0xf5, 0x56, 0xa0, 0xd0, 0xef, 0x1f, 0xd5, 0x5d, 0xdc, 0xb5, 0x75, 0xd8, 0x3a, 0xea, 0xd4, + 0x0b, 0x48, 0x9e, 0x3e, 0x39, 0x79, 0xd8, 0xaf, 0x17, 0x77, 0x3f, 0x81, 0x1b, 0x4b, 0xef, 0x3e, + 0xbd, 0xfa, 0xe8, 0x90, 0x76, 0x50, 0x53, 0x0d, 0x2a, 0x27, 0xb4, 0xfb, 0xec, 0xf0, 0xb4, 0x53, + 0x77, 0x50, 0xf0, 0xb8, 0xd7, 0x7a, 0xd4, 0x69, 0xd7, 0xdd, 0xe6, 0x9d, 0x6f, 0x5e, 0x6e, 0x3a, + 0xdf, 0xbe, 0xdc, 0x74, 0xbe, 0x7b, 0xb9, 0xe9, 0xfc, 0xfb, 0xe5, 0xa6, 0xf3, 0xf5, 0xab, 0xcd, + 0x95, 0x6f, 0x5f, 0x6d, 0xae, 0x7c, 0xf7, 0x6a, 0x73, 0xe5, 0xac, 0xac, 0xff, 0x62, 0xfb, 0xf8, + 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x87, 0xbc, 0x1d, 0xf7, 0xa2, 0x13, 0x00, 0x00, } func (m *Op) Marshal() (dAtA []byte, err error) { @@ -2968,6 +3146,18 @@ func (m *OpMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Source != nil { + { + size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOps(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } if len(m.Caps) > 0 { keysForCaps := make([]string, 0, len(m.Caps)) for k := range m.Caps { @@ -3044,6 +3234,144 @@ func (m *OpMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Source) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Source) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Source) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintOps(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x22 + } + if len(m.Local) > 0 { + i -= len(m.Local) + copy(dAtA[i:], m.Local) + i = encodeVarintOps(dAtA, i, uint64(len(m.Local))) + i-- + dAtA[i] = 0x1a + } + if len(m.Filename) > 0 { + i -= len(m.Filename) + copy(dAtA[i:], m.Filename) + i = encodeVarintOps(dAtA, i, uint64(len(m.Filename))) + i-- + dAtA[i] = 0x12 + } + if len(m.Locations) > 0 { + for iNdEx := len(m.Locations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Locations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOps(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Range) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Range) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Range) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.End != nil { + { + size, err := m.End.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOps(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Start != nil { + { + size, err := m.Start.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOps(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Position) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Position) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Position) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Character != 0 { + i = encodeVarintOps(dAtA, i, uint64(m.Character)) + i-- + dAtA[i] = 0x10 + } + if m.Line != 0 { + i = encodeVarintOps(dAtA, i, uint64(m.Line)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *ExportCache) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4265,6 +4593,69 @@ func (m *OpMetadata) Size() (n int) { n += mapEntrySize + 1 + sovOps(uint64(mapEntrySize)) } } + if m.Source != nil { + l = m.Source.Size() + n += 1 + l + sovOps(uint64(l)) + } + return n +} + +func (m *Source) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Locations) > 0 { + for _, e := range m.Locations { + l = e.Size() + n += 1 + l + sovOps(uint64(l)) + } + } + l = len(m.Filename) + if l > 0 { + n += 1 + l + sovOps(uint64(l)) + } + l = len(m.Local) + if l > 0 { + n += 1 + l + sovOps(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovOps(uint64(l)) + } + return n +} + +func (m *Range) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Start != nil { + l = m.Start.Size() + n += 1 + l + sovOps(uint64(l)) + } + if m.End != nil { + l = m.End.Size() + n += 1 + l + sovOps(uint64(l)) + } + return n +} + +func (m *Position) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Line != 0 { + n += 1 + sovOps(uint64(m.Line)) + } + if m.Character != 0 { + n += 1 + sovOps(uint64(m.Character)) + } return n } @@ -7367,6 +7758,443 @@ func (m *OpMetadata) Unmarshal(dAtA []byte) error { } m.Caps[github_com_moby_buildkit_util_apicaps.CapID(mapkey)] = mapvalue iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOps + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOps + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Source == nil { + m.Source = &Source{} + } + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOps(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOps + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthOps + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Source) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Source: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Source: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Locations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOps + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOps + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Locations = append(m.Locations, &Range{}) + if err := m.Locations[len(m.Locations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOps + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOps + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filename = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Local", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOps + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOps + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Local = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOps + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthOps + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOps(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOps + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthOps + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Range) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Range: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Range: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOps + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOps + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Start == nil { + m.Start = &Position{} + } + if err := m.Start.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOps + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOps + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.End == nil { + m.End = &Position{} + } + if err := m.End.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOps(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOps + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthOps + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Position) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Position: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Position: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Line", wireType) + } + m.Line = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Line |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Character", wireType) + } + m.Character = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Character |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipOps(dAtA[iNdEx:]) diff --git a/solver/pb/ops.proto b/solver/pb/ops.proto index a24aad12..dc1363c1 100644 --- a/solver/pb/ops.proto +++ b/solver/pb/ops.proto @@ -175,6 +175,25 @@ message OpMetadata { ExportCache export_cache = 4; map caps = 5 [(gogoproto.castkey) = "github.com/moby/buildkit/util/apicaps.CapID", (gogoproto.nullable) = false]; + + Source source = 6; +} + +message Source { + repeated Range locations = 1; + string filename = 2; + string local = 3; + bytes data = 4; +} + +message Range { + Position start = 1; + Position end = 2; +} + +message Position { + int32 Line = 1; + int32 Character = 2; } message ExportCache { From 6073e6cff3775966bc4c96305147be5947af8df1 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Fri, 1 May 2020 11:39:45 -0700 Subject: [PATCH 02/11] llb: enable source tracking Signed-off-by: Tonis Tiigi --- client/llb/async.go | 4 +- client/llb/definition.go | 32 +- client/llb/exec.go | 30 +- client/llb/fileop.go | 14 +- client/llb/llbbuild/llbbuild.go | 10 +- client/llb/llbbuild/llbbuild_test.go | 2 +- client/llb/marshal.go | 13 +- client/llb/source.go | 8 +- client/llb/sourcemap.go | 92 ++ client/llb/state.go | 33 +- frontend/dockerfile/builder/build.go | 35 +- frontend/dockerfile/dockerfile2llb/convert.go | 59 +- solver/errdefs/errdefs.pb.go | 52 +- solver/errdefs/errdefs.proto | 3 +- solver/errdefs/generate.go | 2 +- solver/errdefs/source.go | 55 +- solver/errdefs/vertex.go | 6 + solver/llbsolver/bridge.go | 25 +- solver/pb/ops.pb.go | 1116 ++++++++++++----- solver/pb/ops.proto | 24 +- util/grpcerrors/grpcerrors.go | 22 +- 21 files changed, 1167 insertions(+), 470 deletions(-) create mode 100644 client/llb/sourcemap.go diff --git a/client/llb/async.go b/client/llb/async.go index 3bec1087..20781850 100644 --- a/client/llb/async.go +++ b/client/llb/async.go @@ -85,8 +85,8 @@ type errVertex struct { func (v *errVertex) Validate(context.Context) error { return v.err } -func (v *errVertex) Marshal(context.Context, *Constraints) (digest.Digest, []byte, *pb.OpMetadata, error) { - return "", nil, nil, v.err +func (v *errVertex) Marshal(context.Context, *Constraints) (digest.Digest, []byte, *pb.OpMetadata, *SourceLocation, error) { + return "", nil, nil, nil, v.err } func (v *errVertex) Output() Output { return nil diff --git a/client/llb/definition.go b/client/llb/definition.go index 9be2b299..52ad8dd4 100644 --- a/client/llb/definition.go +++ b/client/llb/definition.go @@ -20,6 +20,7 @@ type DefinitionOp struct { ops map[digest.Digest]*pb.Op defs map[digest.Digest][]byte metas map[digest.Digest]pb.OpMetadata + sources map[digest.Digest]*SourceLocation platforms map[digest.Digest]*specs.Platform dgst digest.Digest index pb.OutputIndex @@ -49,6 +50,28 @@ func NewDefinitionOp(def *pb.Definition) (*DefinitionOp, error) { platforms[dgst] = platform } + srcs := map[digest.Digest]*SourceLocation{} + + for _, s := range def.Sources { + var st *State + sdef := s.Info.Definition + if sdef != nil { + op, err := NewDefinitionOp(sdef) + if err != nil { + return nil, err + } + state := NewState(op) + st = &state + } + sm := NewSourceMap(st, s.Info.Filename, s.Info.Data) + for dgst, l := range s.Locations { + srcs[digest.Digest(dgst)] = &SourceLocation{ + SourceMap: sm, + Location: l.Locations, + } + } + } + var index pb.OutputIndex if dgst != "" { index = ops[dgst].Inputs[0].Index @@ -59,6 +82,7 @@ func NewDefinitionOp(def *pb.Definition) (*DefinitionOp, error) { ops: ops, defs: defs, metas: def.Metadata, + sources: srcs, platforms: platforms, dgst: dgst, index: index, @@ -110,20 +134,20 @@ func (d *DefinitionOp) Validate(context.Context) error { return nil } -func (d *DefinitionOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, error) { +func (d *DefinitionOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, *SourceLocation, error) { if d.dgst == "" { - return "", nil, nil, errors.Errorf("cannot marshal empty definition op") + return "", nil, nil, nil, errors.Errorf("cannot marshal empty definition op") } if err := d.Validate(ctx); err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } d.mu.Lock() defer d.mu.Unlock() meta := d.metas[d.dgst] - return d.dgst, d.defs[d.dgst], &meta, nil + return d.dgst, d.defs[d.dgst], &meta, d.sources[d.dgst], nil } diff --git a/client/llb/exec.go b/client/llb/exec.go index 75617d94..5d5d01e1 100644 --- a/client/llb/exec.go +++ b/client/llb/exec.go @@ -81,7 +81,7 @@ func (e *ExecOp) AddMount(target string, source Output, opt ...MountOption) Outp } m.output = o } - e.Store(nil, nil, nil) + e.Store(nil, nil, nil, nil) e.isValidated = false return m.output } @@ -124,12 +124,12 @@ func (e *ExecOp) Validate(ctx context.Context) error { return nil } -func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, error) { +func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, *SourceLocation, error) { if e.Cached(c) { return e.Load() } if err := e.Validate(ctx); err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } // make sure mounts are sorted sort.Slice(e.mounts, func(i, j int) bool { @@ -138,7 +138,7 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] env, err := getEnv(e.base)(ctx) if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } if len(e.ssh) > 0 { @@ -161,17 +161,17 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] args, err := getArgs(e.base)(ctx) if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } cwd, err := getDir(e.base)(ctx) if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } user, err := getUser(e.base)(ctx) if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } meta := &pb.Meta{ @@ -182,7 +182,7 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] } extraHosts, err := getExtraHosts(e.base)(ctx) if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } if len(extraHosts) > 0 { hosts := make([]*pb.HostIP, len(extraHosts)) @@ -194,12 +194,12 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] network, err := getNetwork(e.base)(ctx) if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } security, err := getSecurity(e.base)(ctx) if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } peo := &pb.ExecOp{ @@ -252,7 +252,7 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] if e.constraints.Platform == nil { p, err := getPlatform(e.base)(ctx) if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } e.constraints.Platform = p } @@ -267,11 +267,11 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] inputIndex := pb.InputIndex(len(pop.Inputs)) if m.source != nil { if m.tmpfs { - return "", nil, nil, errors.Errorf("tmpfs mounts must use scratch") + return "", nil, nil, nil, errors.Errorf("tmpfs mounts must use scratch") } inp, err := m.source.ToInput(ctx, c) if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } newInput := true @@ -356,9 +356,9 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] dt, err := pop.Marshal() if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } - e.Store(dt, md, c) + e.Store(dt, md, e.constraints.Source, c) return e.Load() } diff --git a/client/llb/fileop.go b/client/llb/fileop.go index de151234..865756ce 100644 --- a/client/llb/fileop.go +++ b/client/llb/fileop.go @@ -649,12 +649,12 @@ func (ms *marshalState) add(fa *FileAction, c *Constraints) (*fileActionState, e return st, nil } -func (f *FileOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, error) { +func (f *FileOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, *SourceLocation, error) { if f.Cached(c) { return f.Load() } if err := f.Validate(ctx); err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } addCap(&f.constraints, pb.CapFileBase) @@ -669,7 +669,7 @@ func (f *FileOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] state := newMarshalState(ctx) _, err := state.add(f.action, c) if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } pop.Inputs = state.inputs @@ -683,13 +683,13 @@ func (f *FileOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] if st.fa.state != nil { parent, err = st.fa.state.GetDir(ctx) if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } } action, err := st.action.toProtoAction(ctx, parent, st.base) if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } pfo.Actions = append(pfo.Actions, &pb.FileAction{ @@ -702,9 +702,9 @@ func (f *FileOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] dt, err := pop.Marshal() if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } - f.Store(dt, md, c) + f.Store(dt, md, f.constraints.Source, c) return f.Load() } diff --git a/client/llb/llbbuild/llbbuild.go b/client/llb/llbbuild/llbbuild.go index fc71b916..162985e6 100644 --- a/client/llb/llbbuild/llbbuild.go +++ b/client/llb/llbbuild/llbbuild.go @@ -33,7 +33,7 @@ type build struct { } func (b *build) ToInput(ctx context.Context, c *llb.Constraints) (*pb.Input, error) { - dgst, _, _, err := b.Marshal(ctx, c) + dgst, _, _, _, err := b.Marshal(ctx, c) if err != nil { return nil, err } @@ -48,7 +48,7 @@ func (b *build) Validate(context.Context) error { return nil } -func (b *build) Marshal(ctx context.Context, c *llb.Constraints) (digest.Digest, []byte, *pb.OpMetadata, error) { +func (b *build) Marshal(ctx context.Context, c *llb.Constraints) (digest.Digest, []byte, *pb.OpMetadata, *llb.SourceLocation, error) { if b.Cached(c) { return b.Load() } @@ -76,16 +76,16 @@ func (b *build) Marshal(ctx context.Context, c *llb.Constraints) (digest.Digest, inp, err := b.source.ToInput(ctx, c) if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } pop.Inputs = append(pop.Inputs, inp) dt, err := pop.Marshal() if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } - b.Store(dt, md, c) + b.Store(dt, md, b.constraints.Source, c) return b.Load() } diff --git a/client/llb/llbbuild/llbbuild_test.go b/client/llb/llbbuild/llbbuild_test.go index 03ac6b6f..56a930a9 100644 --- a/client/llb/llbbuild/llbbuild_test.go +++ b/client/llb/llbbuild/llbbuild_test.go @@ -13,7 +13,7 @@ import ( func TestMarshal(t *testing.T) { t.Parallel() b := NewBuildOp(newDummyOutput("foobar"), WithFilename("myfilename")) - dgst, dt, opMeta, err := b.Marshal(context.TODO(), &llb.Constraints{}) + dgst, dt, opMeta, _, err := b.Marshal(context.TODO(), &llb.Constraints{}) _ = opMeta require.NoError(t, err) diff --git a/client/llb/marshal.go b/client/llb/marshal.go index 65a352fa..54469ffb 100644 --- a/client/llb/marshal.go +++ b/client/llb/marshal.go @@ -14,21 +14,24 @@ import ( type Definition struct { Def [][]byte Metadata map[digest.Digest]pb.OpMetadata + Sources []*pb.Source } func (def *Definition) ToPB() *pb.Definition { - md := make(map[digest.Digest]pb.OpMetadata) + md := make(map[digest.Digest]pb.OpMetadata, len(def.Metadata)) for k, v := range def.Metadata { md[k] = v } return &pb.Definition{ Def: def.Def, + Sources: def.Sources, Metadata: md, } } func (def *Definition) FromPB(x *pb.Definition) { def.Def = x.Def + def.Sources = x.Sources def.Metadata = make(map[digest.Digest]pb.OpMetadata) for k, v := range x.Metadata { def.Metadata[k] = v @@ -95,18 +98,20 @@ type MarshalCache struct { digest digest.Digest dt []byte md *pb.OpMetadata + src *SourceLocation constraints *Constraints } func (mc *MarshalCache) Cached(c *Constraints) bool { return mc.dt != nil && mc.constraints == c } -func (mc *MarshalCache) Load() (digest.Digest, []byte, *pb.OpMetadata, error) { - return mc.digest, mc.dt, mc.md, nil +func (mc *MarshalCache) Load() (digest.Digest, []byte, *pb.OpMetadata, *SourceLocation, error) { + return mc.digest, mc.dt, mc.md, mc.src, nil } -func (mc *MarshalCache) Store(dt []byte, md *pb.OpMetadata, c *Constraints) { +func (mc *MarshalCache) Store(dt []byte, md *pb.OpMetadata, src *SourceLocation, c *Constraints) { mc.digest = digest.FromBytes(dt) mc.dt = dt mc.md = md mc.constraints = c + mc.src = src } diff --git a/client/llb/source.go b/client/llb/source.go index b64cfbcc..7eea6e7b 100644 --- a/client/llb/source.go +++ b/client/llb/source.go @@ -44,12 +44,12 @@ func (s *SourceOp) Validate(ctx context.Context) error { return nil } -func (s *SourceOp) Marshal(ctx context.Context, constraints *Constraints) (digest.Digest, []byte, *pb.OpMetadata, error) { +func (s *SourceOp) Marshal(ctx context.Context, constraints *Constraints) (digest.Digest, []byte, *pb.OpMetadata, *SourceLocation, error) { if s.Cached(constraints) { return s.Load() } if err := s.Validate(ctx); err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } if strings.HasPrefix(s.id, "local://") { @@ -74,10 +74,10 @@ func (s *SourceOp) Marshal(ctx context.Context, constraints *Constraints) (diges dt, err := proto.Marshal() if err != nil { - return "", nil, nil, err + return "", nil, nil, nil, err } - s.Store(dt, md, constraints) + s.Store(dt, md, s.constraints.Source, constraints) return s.Load() } diff --git a/client/llb/sourcemap.go b/client/llb/sourcemap.go new file mode 100644 index 00000000..7a23e229 --- /dev/null +++ b/client/llb/sourcemap.go @@ -0,0 +1,92 @@ +package llb + +import ( + "context" + + "github.com/moby/buildkit/solver/pb" + "github.com/opencontainers/go-digest" +) + +type SourceMap struct { + State *State + Definition *Definition + Filename string + Data []byte +} + +func NewSourceMap(st *State, filename string, dt []byte) *SourceMap { + return &SourceMap{ + State: st, + Filename: filename, + Data: dt, + } +} + +func (s *SourceMap) Location(r []*pb.Range) ConstraintsOpt { + return constraintsOptFunc(func(c *Constraints) { + if s == nil { + return + } + c.Source = &SourceLocation{ + SourceMap: s, + Location: r, + } + }) +} + +type SourceLocation struct { + SourceMap *SourceMap + Location []*pb.Range +} + +type sourceMapCollector struct { + locations []map[digest.Digest][]*pb.Range + maps []*SourceMap + index map[*SourceMap]int +} + +func newSourceMapCollector() *sourceMapCollector { + return &sourceMapCollector{ + index: map[*SourceMap]int{}, + } +} + +func (smc *sourceMapCollector) Add(dgst digest.Digest, l *SourceLocation) { + idx, ok := smc.index[l.SourceMap] + if !ok { + idx = len(smc.maps) + smc.maps = append(smc.maps, l.SourceMap) + smc.locations = append(smc.locations, map[digest.Digest][]*pb.Range{}) + } + smc.locations[idx][dgst] = l.Location +} + +func (smc *sourceMapCollector) Marshal(ctx context.Context, co ...ConstraintsOpt) ([]*pb.Source, error) { + out := make([]*pb.Source, 0, len(smc.maps)) + for i, m := range smc.maps { + def := m.Definition + if def == nil && m.State != nil { + var err error + def, err = m.State.Marshal(ctx, co...) + if err != nil { + return nil, err + } + m.Definition = def + } + s := &pb.Source{ + Info: &pb.SourceInfo{ + Data: m.Data, + Filename: m.Filename, + Definition: def.ToPB(), + }, + Locations: map[string]*pb.Location{}, + } + for dgst, loc := range smc.locations[i] { + s.Locations[dgst.String()] = &pb.Location{ + Locations: loc, + } + } + out = append(out, s) + } + return out, nil +} diff --git a/client/llb/state.go b/client/llb/state.go index a237d12d..73d46b2f 100644 --- a/client/llb/state.go +++ b/client/llb/state.go @@ -24,7 +24,7 @@ type Output interface { type Vertex interface { Validate(context.Context) error - Marshal(context.Context, *Constraints) (digest.Digest, []byte, *pb.OpMetadata, error) + Marshal(context.Context, *Constraints) (digest.Digest, []byte, *pb.OpMetadata, *SourceLocation, error) Output() Output Inputs() []Output } @@ -124,7 +124,9 @@ func (s State) Marshal(ctx context.Context, co ...ConstraintsOpt) (*Definition, o.SetConstraintsOption(c) } - def, err := marshal(ctx, s.Output().Vertex(ctx), def, map[digest.Digest]struct{}{}, map[Vertex]struct{}{}, c) + smc := newSourceMapCollector() + + def, err := marshal(ctx, s.Output().Vertex(ctx), def, smc, map[digest.Digest]struct{}{}, map[Vertex]struct{}{}, c) if err != nil { return def, err } @@ -159,23 +161,28 @@ func (s State) Marshal(ctx context.Context, co ...ConstraintsOpt) (*Definition, } def.Metadata[dgst] = md + sm, err := smc.Marshal(ctx, co...) + if err != nil { + return nil, err + } + def.Sources = sm return def, nil } -func marshal(ctx context.Context, v Vertex, def *Definition, cache map[digest.Digest]struct{}, vertexCache map[Vertex]struct{}, c *Constraints) (*Definition, error) { +func marshal(ctx context.Context, v Vertex, def *Definition, s *sourceMapCollector, cache map[digest.Digest]struct{}, vertexCache map[Vertex]struct{}, c *Constraints) (*Definition, error) { if _, ok := vertexCache[v]; ok { return def, nil } for _, inp := range v.Inputs() { var err error - def, err = marshal(ctx, inp.Vertex(ctx), def, cache, vertexCache, c) + def, err = marshal(ctx, inp.Vertex(ctx), def, s, cache, vertexCache, c) if err != nil { return def, err } } - dgst, dt, opMeta, err := v.Marshal(ctx, c) + dgst, dt, opMeta, sl, err := v.Marshal(ctx, c) if err != nil { return def, err } @@ -186,6 +193,9 @@ func marshal(ctx context.Context, v Vertex, def *Definition, cache map[digest.Di if _, ok := cache[dgst]; ok { return def, nil } + if sl != nil { + s.Add(dgst, sl) + } def.Def = append(def.Def, dt) cache[dgst] = struct{}{} return def, nil @@ -367,7 +377,7 @@ func (o *output) ToInput(ctx context.Context, c *Constraints) (*pb.Input, error) return nil, err } } - dgst, _, _, err := o.vertex.Marshal(ctx, c) + dgst, _, _, _, err := o.vertex.Marshal(ctx, c) if err != nil { return nil, err } @@ -433,10 +443,6 @@ func mergeMetadata(m1, m2 pb.OpMetadata) pb.OpMetadata { m1.ExportCache = m2.ExportCache } - if m2.Source != nil { - m1.Source = m2.Source - } - for k := range m2.Caps { if m1.Caps == nil { m1.Caps = make(map[apicaps.CapID]bool, len(m2.Caps)) @@ -462,12 +468,6 @@ func WithDescription(m map[string]string) ConstraintsOpt { }) } -func WithSourceMapping(s *pb.Source) ConstraintsOpt { - return constraintsOptFunc(func(c *Constraints) { - c.Metadata.Source = s - }) -} - func WithCustomName(name string) ConstraintsOpt { return WithDescription(map[string]string{ "llb.customname": name, @@ -524,6 +524,7 @@ type Constraints struct { Metadata pb.OpMetadata LocalUniqueID string Caps *apicaps.CapSet + Source *SourceLocation } func Platform(p specs.Platform) ConstraintsOpt { diff --git a/frontend/dockerfile/builder/build.go b/frontend/dockerfile/builder/build.go index fca9c4bd..0596babc 100644 --- a/frontend/dockerfile/builder/build.go +++ b/frontend/dockerfile/builder/build.go @@ -134,11 +134,9 @@ func Build(ctx context.Context, c client.Client) (*client.Result, error) { var buildContext *llb.State isNotLocalContext := false - isNotLocalDockerfile := false if st, ok := detectGitContext(opts[localNameContext], opts[keyContextKeepGitDir]); ok { if !forceLocalDockerfile { src = *st - isNotLocalDockerfile = true } buildContext = st } else if httpPrefix.MatchString(opts[localNameContext]) { @@ -188,7 +186,6 @@ func Build(ctx context.Context, c client.Client) (*client.Result, error) { bc := unpack.AddMount("/out", llb.Scratch()) if !forceLocalDockerfile { src = bc - isNotLocalDockerfile = true } buildContext = &bc } @@ -196,7 +193,6 @@ func Build(ctx context.Context, c client.Client) (*client.Result, error) { filename = "context" if !forceLocalDockerfile { src = httpContext - isNotLocalDockerfile = true } buildContext = &httpContext isNotLocalContext = true @@ -211,7 +207,6 @@ func Build(ctx context.Context, c client.Client) (*client.Result, error) { inputDockerfile, ok := inputs[DefaultLocalNameDockerfile] if ok { src = inputDockerfile - isNotLocalDockerfile = true } } @@ -233,6 +228,8 @@ func Build(ctx context.Context, c client.Client) (*client.Result, error) { return nil, errors.Wrapf(err, "failed to marshal local source") } + var sourceMap *llb.SourceMap + eg, ctx2 := errgroup.WithContext(ctx) var dtDockerfile []byte var dtDockerignore []byte @@ -257,6 +254,9 @@ func Build(ctx context.Context, c client.Client) (*client.Result, error) { return errors.Wrapf(err, "failed to read dockerfile") } + sourceMap = llb.NewSourceMap(&src, filename, dtDockerfile) + sourceMap.Definition = def + dt, err := ref.ReadFile(ctx2, client.ReadRequest{ Filename: filename + ".dockerignore", }) @@ -349,10 +349,7 @@ func Build(ctx context.Context, c client.Client) (*client.Result, error) { defer func() { var el *parser.ErrorLocation if errors.As(err, &el) { - if isNotLocalDockerfile { - localNameDockerfile = "" - } - err = wrapSource(err, dtDockerfile, filename, localNameDockerfile, el.Location) + err = wrapSource(err, sourceMap, el.Location) } }() st, img, err := dockerfile2llb.Dockerfile2LLB(ctx, dtDockerfile, dockerfile2llb.ConvertOpt{ @@ -373,6 +370,7 @@ func Build(ctx context.Context, c client.Client) (*client.Result, error) { ForceNetMode: defaultNetMode, OverrideCopyImage: opts[keyOverrideCopyImage], LLBCaps: &caps, + SourceMap: sourceMap, }) if err != nil { @@ -656,20 +654,25 @@ func scopeToSubDir(c *llb.State, fileop bool, dir string) *llb.State { return &bc } -func wrapSource(err error, dt []byte, filename, local string, locations []parser.Range) error { - s := &pb.Source{ - Data: dt, - Filename: filename, - Local: local, +func wrapSource(err error, sm *llb.SourceMap, locations []parser.Range) error { + if sm == nil { + return err + } + s := errdefs.Source{ + Info: &pb.SourceInfo{ + Data: sm.Data, + Filename: sm.Filename, + Definition: sm.Definition.ToPB(), + }, Locations: make([]*pb.Range, 0, len(locations)), } for _, l := range locations { s.Locations = append(s.Locations, &pb.Range{ - Start: &pb.Position{ + Start: pb.Position{ Line: int32(l.Start.Line), Character: int32(l.Start.Character), }, - End: &pb.Position{ + End: pb.Position{ Line: int32(l.End.Line), Character: int32(l.End.Character), }, diff --git a/frontend/dockerfile/dockerfile2llb/convert.go b/frontend/dockerfile/dockerfile2llb/convert.go index 41660332..c1a9d531 100644 --- a/frontend/dockerfile/dockerfile2llb/convert.go +++ b/frontend/dockerfile/dockerfile2llb/convert.go @@ -60,6 +60,7 @@ type ConvertOpt struct { OverrideCopyImage string LLBCaps *apicaps.CapSet ContextLocalName string + SourceMap *llb.SourceMap } func Dockerfile2LLB(ctx context.Context, dt []byte, opt ConvertOpt) (*llb.State, *Image, error) { @@ -278,7 +279,13 @@ func Dockerfile2LLB(ctx context.Context, dt []byte, opt ConvertOpt) (*llb.State, if isScratch { d.state = llb.Scratch() } else { - d.state = llb.Image(d.stage.BaseName, dfCmd(d.stage.SourceCode), llb.Platform(*platform), opt.ImageResolveMode, llb.WithCustomName(prefixCommand(d, "FROM "+d.stage.BaseName, opt.PrefixPlatform, platform))) + d.state = llb.Image(d.stage.BaseName, + dfCmd(d.stage.SourceCode), + llb.Platform(*platform), + opt.ImageResolveMode, + llb.WithCustomName(prefixCommand(d, "FROM "+d.stage.BaseName, opt.PrefixPlatform, platform)), + location(opt.SourceMap, d.stage.Location), + ) } d.platform = platform return nil @@ -340,6 +347,7 @@ func Dockerfile2LLB(ctx context.Context, dt []byte, opt ConvertOpt) (*llb.State, extraHosts: opt.ExtraHosts, copyImage: opt.OverrideCopyImage, llbCaps: opt.LLBCaps, + sourceMap: opt.SourceMap, } if opt.copyImage == "" { opt.copyImage = DefaultCopyImage @@ -457,6 +465,7 @@ type dispatchOpt struct { extraHosts []llb.HostIP copyImage string llbCaps *apicaps.CapSet + sourceMap *llb.SourceMap } func dispatch(d *dispatchState, cmd command, opt dispatchOpt) error { @@ -484,7 +493,7 @@ func dispatch(d *dispatchState, cmd command, opt dispatchOpt) error { case *instructions.WorkdirCommand: err = dispatchWorkdir(d, c, true, &opt) case *instructions.AddCommand: - err = dispatchCopy(d, c.SourcesAndDest, opt.buildContext, true, c, c.Chown, opt) + err = dispatchCopy(d, c.SourcesAndDest, opt.buildContext, true, c, c.Chown, c.Location(), opt) if err == nil { for _, src := range c.Sources() { if !strings.HasPrefix(src, "http://") && !strings.HasPrefix(src, "https://") { @@ -519,7 +528,7 @@ func dispatch(d *dispatchState, cmd command, opt dispatchOpt) error { if len(cmd.sources) != 0 { l = cmd.sources[0].state } - err = dispatchCopy(d, c.SourcesAndDest, l, false, c, c.Chown, opt) + err = dispatchCopy(d, c.SourcesAndDest, l, false, c, c.Chown, c.Location(), opt) if err == nil && len(cmd.sources) == 0 { for _, src := range c.Sources() { d.ctxPaths[path.Join("/", filepath.ToSlash(src))] = struct{}{} @@ -634,7 +643,7 @@ func dispatchRun(d *dispatchState, c *instructions.RunCommand, proxy *llb.ProxyE if err != nil { return err } - opt := []llb.RunOption{llb.Args(args), dfCmd(c)} + opt := []llb.RunOption{llb.Args(args), dfCmd(c), location(dopt.sourceMap, c.Location())} if d.ignoreCache { opt = append(opt, llb.IgnoreCache) } @@ -702,7 +711,10 @@ func dispatchWorkdir(d *dispatchState, c *instructions.WorkdirCommand, commit bo if err != nil { return err } - d.state = d.state.File(llb.Mkdir(wd, 0755, mkdirOpt...), llb.WithCustomName(prefixCommand(d, uppercaseCmd(processCmdEnv(opt.shlex, c.String(), env)), d.prefixPlatform, &platform))) + d.state = d.state.File(llb.Mkdir(wd, 0755, mkdirOpt...), + llb.WithCustomName(prefixCommand(d, uppercaseCmd(processCmdEnv(opt.shlex, c.String(), env)), d.prefixPlatform, &platform)), + location(opt.sourceMap, c.Location()), + ) withLayer = true } return commitToHistory(&d.image, "WORKDIR "+wd, withLayer, nil) @@ -710,7 +722,7 @@ func dispatchWorkdir(d *dispatchState, c *instructions.WorkdirCommand, commit bo return nil } -func dispatchCopyFileOp(d *dispatchState, c instructions.SourcesAndDest, sourceState llb.State, isAddCommand bool, cmdToPrint fmt.Stringer, chown string, opt dispatchOpt) error { +func dispatchCopyFileOp(d *dispatchState, c instructions.SourcesAndDest, sourceState llb.State, isAddCommand bool, cmdToPrint fmt.Stringer, chown string, loc []parser.Range, opt dispatchOpt) error { pp, err := pathRelativeToWorkingDir(d.state, c.Dest()) if err != nil { return err @@ -796,7 +808,10 @@ func dispatchCopyFileOp(d *dispatchState, c instructions.SourcesAndDest, sourceS return err } - fileOpt := []llb.ConstraintsOpt{llb.WithCustomName(prefixCommand(d, uppercaseCmd(processCmdEnv(opt.shlex, cmdToPrint.String(), env)), d.prefixPlatform, &platform))} + fileOpt := []llb.ConstraintsOpt{ + llb.WithCustomName(prefixCommand(d, uppercaseCmd(processCmdEnv(opt.shlex, cmdToPrint.String(), env)), d.prefixPlatform, &platform)), + location(opt.sourceMap, loc), + } if d.ignoreCache { fileOpt = append(fileOpt, llb.IgnoreCache) } @@ -805,9 +820,9 @@ func dispatchCopyFileOp(d *dispatchState, c instructions.SourcesAndDest, sourceS return commitToHistory(&d.image, commitMessage.String(), true, &d.state) } -func dispatchCopy(d *dispatchState, c instructions.SourcesAndDest, sourceState llb.State, isAddCommand bool, cmdToPrint fmt.Stringer, chown string, opt dispatchOpt) error { +func dispatchCopy(d *dispatchState, c instructions.SourcesAndDest, sourceState llb.State, isAddCommand bool, cmdToPrint fmt.Stringer, chown string, loc []parser.Range, opt dispatchOpt) error { if useFileOp(opt.buildArgValues, opt.llbCaps) { - return dispatchCopyFileOp(d, c, sourceState, isAddCommand, cmdToPrint, chown, opt) + return dispatchCopyFileOp(d, c, sourceState, isAddCommand, cmdToPrint, chown, loc, opt) } img := llb.Image(opt.copyImage, llb.MarkImageInternal, llb.Platform(opt.buildPlatforms[0]), WithInternalName("helper image for file operations")) @@ -893,7 +908,14 @@ func dispatchCopy(d *dispatchState, c instructions.SourcesAndDest, sourceState l return err } - runOpt := []llb.RunOption{llb.Args(args), llb.Dir("/dest"), llb.ReadonlyRootFS(), dfCmd(cmdToPrint), llb.WithCustomName(prefixCommand(d, uppercaseCmd(processCmdEnv(opt.shlex, cmdToPrint.String(), env)), d.prefixPlatform, &platform))} + runOpt := []llb.RunOption{ + llb.Args(args), + llb.Dir("/dest"), + llb.ReadonlyRootFS(), + dfCmd(cmdToPrint), + llb.WithCustomName(prefixCommand(d, uppercaseCmd(processCmdEnv(opt.shlex, cmdToPrint.String(), env)), d.prefixPlatform, &platform)), + location(opt.sourceMap, loc), + } if d.ignoreCache { runOpt = append(runOpt, llb.IgnoreCache) } @@ -1361,3 +1383,20 @@ func useFileOp(args map[string]string, caps *apicaps.CapSet) bool { } return enabled && caps != nil && caps.Supports(pb.CapFileBase) == nil } + +func location(sm *llb.SourceMap, locations []parser.Range) llb.ConstraintsOpt { + loc := make([]*pb.Range, 0, len(locations)) + for _, l := range locations { + loc = append(loc, &pb.Range{ + Start: pb.Position{ + Line: int32(l.Start.Line), + Character: int32(l.Start.Character), + }, + End: pb.Position{ + Line: int32(l.End.Line), + Character: int32(l.End.Character), + }, + }) + } + return sm.Location(loc) +} diff --git a/solver/errdefs/errdefs.pb.go b/solver/errdefs/errdefs.pb.go index b6084aac..1635d04a 100644 --- a/solver/errdefs/errdefs.pb.go +++ b/solver/errdefs/errdefs.pb.go @@ -1,11 +1,11 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: errdefs.proto package errdefs import ( fmt "fmt" - proto "github.com/golang/protobuf/proto" + proto "github.com/gogo/protobuf/proto" pb "github.com/moby/buildkit/solver/pb" math "math" ) @@ -19,7 +19,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Vertex struct { Digest string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"` @@ -34,7 +34,6 @@ func (*Vertex) ProtoMessage() {} func (*Vertex) Descriptor() ([]byte, []int) { return fileDescriptor_689dc58a5060aff5, []int{0} } - func (m *Vertex) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Vertex.Unmarshal(m, b) } @@ -61,10 +60,11 @@ func (m *Vertex) GetDigest() string { } type Source struct { - Source *pb.Source `protobuf:"bytes,1,opt,name=Source,proto3" json:"Source,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Info *pb.SourceInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` + Locations []*pb.Range `protobuf:"bytes,2,rep,name=locations,proto3" json:"locations,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Source) Reset() { *m = Source{} } @@ -73,7 +73,6 @@ func (*Source) ProtoMessage() {} func (*Source) Descriptor() ([]byte, []int) { return fileDescriptor_689dc58a5060aff5, []int{1} } - func (m *Source) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Source.Unmarshal(m, b) } @@ -92,9 +91,16 @@ func (m *Source) XXX_DiscardUnknown() { var xxx_messageInfo_Source proto.InternalMessageInfo -func (m *Source) GetSource() *pb.Source { +func (m *Source) GetInfo() *pb.SourceInfo { if m != nil { - return m.Source + return m.Info + } + return nil +} + +func (m *Source) GetLocations() []*pb.Range { + if m != nil { + return m.Locations } return nil } @@ -107,15 +113,17 @@ func init() { func init() { proto.RegisterFile("errdefs.proto", fileDescriptor_689dc58a5060aff5) } var fileDescriptor_689dc58a5060aff5 = []byte{ - // 145 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0x2d, 0x2a, 0x4a, - 0x49, 0x4d, 0x2b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x74, 0xd2, - 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x73, 0xf3, 0x93, 0x2a, 0xf5, 0x93, - 0x4a, 0x33, 0x73, 0x52, 0xb2, 0x33, 0x4b, 0xf4, 0x8b, 0xf3, 0x73, 0xca, 0x52, 0x8b, 0xf4, 0x0b, - 0x92, 0xf4, 0xf3, 0x0b, 0xa0, 0xda, 0x94, 0x14, 0xb8, 0xd8, 0xc2, 0x52, 0x8b, 0x4a, 0x52, 0x2b, - 0x84, 0xc4, 0xb8, 0xd8, 0x52, 0x32, 0xd3, 0x53, 0x8b, 0x4b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, - 0x83, 0xa0, 0x3c, 0x25, 0x1d, 0x2e, 0xb6, 0xe0, 0xfc, 0xd2, 0xa2, 0xe4, 0x54, 0x21, 0x25, 0x18, - 0x0b, 0xac, 0x82, 0xdb, 0x88, 0x4b, 0xaf, 0x20, 0x49, 0x0f, 0x22, 0x12, 0x04, 0x95, 0x49, 0x62, - 0x03, 0x1b, 0x6b, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x2e, 0x92, 0x6d, 0x9e, 0x00, 0x00, - 0x00, + // 179 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xcd, 0xc1, 0x0b, 0x82, 0x30, + 0x14, 0xc7, 0x71, 0xac, 0x58, 0x38, 0xa9, 0xc3, 0x0e, 0x21, 0x9d, 0xc4, 0x4b, 0x1e, 0x62, 0x03, + 0xfb, 0x2b, 0xba, 0x2e, 0xea, 0xee, 0xf4, 0x69, 0x23, 0xdd, 0x1b, 0xdb, 0x8c, 0xfa, 0xef, 0x23, + 0x13, 0x3a, 0x7e, 0xf9, 0xbc, 0xc7, 0x8f, 0x6e, 0xc0, 0xb9, 0x06, 0x5a, 0xcf, 0xad, 0xc3, 0x80, + 0x6c, 0x3d, 0xe7, 0xfe, 0xd8, 0xe9, 0x70, 0x1f, 0x15, 0xaf, 0x71, 0x10, 0x03, 0xaa, 0xb7, 0x50, + 0xa3, 0xee, 0x9b, 0x87, 0x0e, 0xc2, 0x63, 0xff, 0x04, 0x27, 0xac, 0x12, 0x68, 0xe7, 0xb7, 0x3c, + 0xa3, 0xe4, 0x06, 0x2e, 0xc0, 0x8b, 0xed, 0x28, 0x69, 0x74, 0x07, 0x3e, 0xa4, 0x51, 0x16, 0x15, + 0xb1, 0x9c, 0x2b, 0xbf, 0x52, 0x72, 0xc1, 0xd1, 0xd5, 0xc0, 0x72, 0xba, 0xd2, 0xa6, 0xc5, 0xc9, + 0x93, 0x72, 0xcb, 0xad, 0xe2, 0x3f, 0x39, 0x9b, 0x16, 0xe5, 0x64, 0xec, 0x40, 0xe3, 0x1e, 0xeb, + 0x2a, 0x68, 0x34, 0x3e, 0x5d, 0x64, 0xcb, 0x22, 0x29, 0xe3, 0xef, 0xa1, 0xac, 0x4c, 0x07, 0xf2, + 0x6f, 0x8a, 0x4c, 0xfb, 0xa7, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x4a, 0x1b, 0x1a, 0xc7, + 0x00, 0x00, 0x00, } diff --git a/solver/errdefs/errdefs.proto b/solver/errdefs/errdefs.proto index 46b2c194..c340f251 100644 --- a/solver/errdefs/errdefs.proto +++ b/solver/errdefs/errdefs.proto @@ -9,5 +9,6 @@ message Vertex { } message Source { - pb.Source Source = 1; + pb.SourceInfo info = 1; + repeated pb.Range locations = 2; } \ No newline at end of file diff --git a/solver/errdefs/generate.go b/solver/errdefs/generate.go index 5da07a5d..e0dc24cd 100644 --- a/solver/errdefs/generate.go +++ b/solver/errdefs/generate.go @@ -1,3 +1,3 @@ package errdefs -//go:generate protoc -I=. -I=../../vendor/ -I=../../../../../ --go_out=. errdefs.proto +//go:generate protoc -I=. -I=../../vendor/ -I=../../../../../ --gogo_out=. errdefs.proto diff --git a/solver/errdefs/source.go b/solver/errdefs/source.go index cd32dec1..78e1fc38 100644 --- a/solver/errdefs/source.go +++ b/solver/errdefs/source.go @@ -10,11 +10,11 @@ import ( "github.com/pkg/errors" ) -func WithSource(err error, src *pb.Source) error { +func WithSource(err error, src Source) error { if err == nil { return nil } - return &ErrorSource{Source: Source{Source: src}, error: err} + return &ErrorSource{Source: src, error: err} } type ErrorSource struct { @@ -45,13 +45,13 @@ func (s *Source) WrapError(err error) error { } func (s *Source) Print(w io.Writer) error { - ss := s.Source - if ss == nil { + si := s.Info + if si == nil { return nil } - lines := strings.Split(string(ss.Data), "\n") + lines := strings.Split(string(si.Data), "\n") - start, end, ok := getStartEndLine(ss.Locations) + start, end, ok := getStartEndLine(s.Locations) if !ok { return nil } @@ -84,10 +84,10 @@ func (s *Source) Print(w io.Writer) error { p++ } - fmt.Fprintf(w, "%s:%d\n--------------------\n", ss.Filename, prepadStart) + fmt.Fprintf(w, "%s:%d\n--------------------\n", si.Filename, prepadStart) for i := start; i <= end; i++ { pfx := " " - if containsLine(ss.Locations, i) { + if containsLine(s.Locations, i) { pfx = ">>>" } fmt.Fprintf(w, " %3d | %s %s\n", i, pfx, lines[i-1]) @@ -98,18 +98,11 @@ func (s *Source) Print(w io.Writer) error { func containsLine(rr []*pb.Range, l int) bool { for _, r := range rr { - var s, e int - if r.Start == nil { - continue + e := r.End.Line + if e < r.Start.Line { + e = r.Start.Line } - s = int(r.Start.Line) - if r.End != nil { - e = int(r.End.Line) - } - if e < s { - e = s - } - if s <= l && e >= l { + if r.Start.Line <= int32(l) && e >= int32(l) { return true } } @@ -117,21 +110,19 @@ func containsLine(rr []*pb.Range, l int) bool { } func getStartEndLine(rr []*pb.Range) (start int, end int, ok bool) { + first := true for _, r := range rr { - if r.Start != nil { - if !ok || start > int(r.Start.Line) { - start = int(r.Start.Line) - } - if end < start { - end = start - } - ok = true + e := r.End.Line + if e < r.Start.Line { + e = r.Start.Line } - if r.End != nil { - if end < int(r.End.Line) { - end = int(r.End.Line) - } + if first || int(r.Start.Line) < start { + start = int(r.Start.Line) } + if int(e) > end { + end = int(e) + } + first = false } - return + return start, end, !first } diff --git a/solver/errdefs/vertex.go b/solver/errdefs/vertex.go index ade10a4b..71fdb6ca 100644 --- a/solver/errdefs/vertex.go +++ b/solver/errdefs/vertex.go @@ -1,10 +1,16 @@ package errdefs import ( + proto "github.com/golang/protobuf/proto" "github.com/moby/buildkit/util/grpcerrors" digest "github.com/opencontainers/go-digest" ) +func init() { + proto.RegisterType((*Vertex)(nil), "errdefs.Vertex") + proto.RegisterType((*Source)(nil), "errdefs.Source") +} + type VertexError struct { Vertex error diff --git a/solver/llbsolver/bridge.go b/solver/llbsolver/bridge.go index c2d9ad2b..3f7348c4 100644 --- a/solver/llbsolver/bridge.go +++ b/solver/llbsolver/bridge.go @@ -18,6 +18,7 @@ import ( gw "github.com/moby/buildkit/frontend/gateway/client" "github.com/moby/buildkit/session" "github.com/moby/buildkit/solver" + "github.com/moby/buildkit/solver/errdefs" "github.com/moby/buildkit/solver/pb" "github.com/moby/buildkit/util/flightcontrol" "github.com/moby/buildkit/util/tracing" @@ -182,7 +183,29 @@ func (rp *resultProxy) Release(ctx context.Context) error { return nil } -func (rp *resultProxy) Result(ctx context.Context) (solver.CachedResult, error) { +func (rp *resultProxy) wrapError(err error) error { + if err == nil { + return nil + } + var ve *errdefs.VertexError + if errors.As(err, &ve) { + for _, s := range rp.def.Sources { + loc, ok := s.Locations[string(ve.Digest)] + if ok { + return errdefs.WithSource(err, errdefs.Source{ + Info: s.Info, + Locations: loc.Locations, + }) + } + } + } + return err +} + +func (rp *resultProxy) Result(ctx context.Context) (res solver.CachedResult, err error) { + defer func() { + err = rp.wrapError(err) + }() r, err := rp.g.Do(ctx, "result", func(ctx context.Context) (interface{}, error) { rp.mu.Lock() if rp.released { diff --git a/solver/pb/ops.pb.go b/solver/pb/ops.pb.go index 6183363f..70cb74e6 100644 --- a/solver/pb/ops.pb.go +++ b/solver/pb/ops.pb.go @@ -995,7 +995,6 @@ type OpMetadata struct { // WorkerConstraint worker_constraint = 3; ExportCache *ExportCache `protobuf:"bytes,4,opt,name=export_cache,json=exportCache,proto3" json:"export_cache,omitempty"` Caps map[github_com_moby_buildkit_util_apicaps.CapID]bool `protobuf:"bytes,5,rep,name=caps,proto3,castkey=github.com/moby/buildkit/util/apicaps.CapID" json:"caps" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Source *Source `protobuf:"bytes,6,opt,name=source,proto3" json:"source,omitempty"` } func (m *OpMetadata) Reset() { *m = OpMetadata{} } @@ -1055,18 +1054,9 @@ func (m *OpMetadata) GetCaps() map[github_com_moby_buildkit_util_apicaps.CapID]b return nil } -func (m *OpMetadata) GetSource() *Source { - if m != nil { - return m.Source - } - return nil -} - type Source struct { - Locations []*Range `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty"` - Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"` - Local string `protobuf:"bytes,3,opt,name=local,proto3" json:"local,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + Locations map[string]*Location `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Info *SourceInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` } func (m *Source) Reset() { *m = Source{} } @@ -1098,44 +1088,126 @@ func (m *Source) XXX_DiscardUnknown() { var xxx_messageInfo_Source proto.InternalMessageInfo -func (m *Source) GetLocations() []*Range { +func (m *Source) GetLocations() map[string]*Location { if m != nil { return m.Locations } return nil } -func (m *Source) GetFilename() string { +func (m *Source) GetInfo() *SourceInfo { + if m != nil { + return m.Info + } + return nil +} + +type SourceInfo struct { + Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Definition *Definition `protobuf:"bytes,3,opt,name=definition,proto3" json:"definition,omitempty"` +} + +func (m *SourceInfo) Reset() { *m = SourceInfo{} } +func (m *SourceInfo) String() string { return proto.CompactTextString(m) } +func (*SourceInfo) ProtoMessage() {} +func (*SourceInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_8de16154b2733812, []int{14} +} +func (m *SourceInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SourceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SourceInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SourceInfo.Merge(m, src) +} +func (m *SourceInfo) XXX_Size() int { + return m.Size() +} +func (m *SourceInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SourceInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_SourceInfo proto.InternalMessageInfo + +func (m *SourceInfo) GetFilename() string { if m != nil { return m.Filename } return "" } -func (m *Source) GetLocal() string { - if m != nil { - return m.Local - } - return "" -} - -func (m *Source) GetData() []byte { +func (m *SourceInfo) GetData() []byte { if m != nil { return m.Data } return nil } +func (m *SourceInfo) GetDefinition() *Definition { + if m != nil { + return m.Definition + } + return nil +} + +type Location struct { + Locations []*Range `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty"` +} + +func (m *Location) Reset() { *m = Location{} } +func (m *Location) String() string { return proto.CompactTextString(m) } +func (*Location) ProtoMessage() {} +func (*Location) Descriptor() ([]byte, []int) { + return fileDescriptor_8de16154b2733812, []int{15} +} +func (m *Location) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Location) XXX_Merge(src proto.Message) { + xxx_messageInfo_Location.Merge(m, src) +} +func (m *Location) XXX_Size() int { + return m.Size() +} +func (m *Location) XXX_DiscardUnknown() { + xxx_messageInfo_Location.DiscardUnknown(m) +} + +var xxx_messageInfo_Location proto.InternalMessageInfo + +func (m *Location) GetLocations() []*Range { + if m != nil { + return m.Locations + } + return nil +} + type Range struct { - Start *Position `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` - End *Position `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` + Start Position `protobuf:"bytes,1,opt,name=start,proto3" json:"start"` + End Position `protobuf:"bytes,2,opt,name=end,proto3" json:"end"` } func (m *Range) Reset() { *m = Range{} } func (m *Range) String() string { return proto.CompactTextString(m) } func (*Range) ProtoMessage() {} func (*Range) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{14} + return fileDescriptor_8de16154b2733812, []int{16} } func (m *Range) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1160,18 +1232,18 @@ func (m *Range) XXX_DiscardUnknown() { var xxx_messageInfo_Range proto.InternalMessageInfo -func (m *Range) GetStart() *Position { +func (m *Range) GetStart() Position { if m != nil { return m.Start } - return nil + return Position{} } -func (m *Range) GetEnd() *Position { +func (m *Range) GetEnd() Position { if m != nil { return m.End } - return nil + return Position{} } type Position struct { @@ -1183,7 +1255,7 @@ func (m *Position) Reset() { *m = Position{} } func (m *Position) String() string { return proto.CompactTextString(m) } func (*Position) ProtoMessage() {} func (*Position) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{15} + return fileDescriptor_8de16154b2733812, []int{17} } func (m *Position) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1230,7 +1302,7 @@ func (m *ExportCache) Reset() { *m = ExportCache{} } func (m *ExportCache) String() string { return proto.CompactTextString(m) } func (*ExportCache) ProtoMessage() {} func (*ExportCache) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{16} + return fileDescriptor_8de16154b2733812, []int{18} } func (m *ExportCache) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1273,7 +1345,7 @@ func (m *ProxyEnv) Reset() { *m = ProxyEnv{} } func (m *ProxyEnv) String() string { return proto.CompactTextString(m) } func (*ProxyEnv) ProtoMessage() {} func (*ProxyEnv) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{17} + return fileDescriptor_8de16154b2733812, []int{19} } func (m *ProxyEnv) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1335,7 +1407,7 @@ func (m *WorkerConstraints) Reset() { *m = WorkerConstraints{} } func (m *WorkerConstraints) String() string { return proto.CompactTextString(m) } func (*WorkerConstraints) ProtoMessage() {} func (*WorkerConstraints) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{18} + return fileDescriptor_8de16154b2733812, []int{20} } func (m *WorkerConstraints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1374,13 +1446,14 @@ type Definition struct { // metadata contains metadata for the each of the Op messages. // A key must be an LLB op digest string. Currently, empty string is not expected as a key, but it may change in the future. Metadata map[github_com_opencontainers_go_digest.Digest]OpMetadata `protobuf:"bytes,2,rep,name=metadata,proto3,castkey=github.com/opencontainers/go-digest.Digest" json:"metadata" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Sources []*Source `protobuf:"bytes,3,rep,name=Sources,proto3" json:"Sources,omitempty"` } func (m *Definition) Reset() { *m = Definition{} } func (m *Definition) String() string { return proto.CompactTextString(m) } func (*Definition) ProtoMessage() {} func (*Definition) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{19} + return fileDescriptor_8de16154b2733812, []int{21} } func (m *Definition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1419,6 +1492,13 @@ func (m *Definition) GetMetadata() map[github_com_opencontainers_go_digest.Diges return nil } +func (m *Definition) GetSources() []*Source { + if m != nil { + return m.Sources + } + return nil +} + type HostIP struct { Host string `protobuf:"bytes,1,opt,name=Host,proto3" json:"Host,omitempty"` IP string `protobuf:"bytes,2,opt,name=IP,proto3" json:"IP,omitempty"` @@ -1428,7 +1508,7 @@ func (m *HostIP) Reset() { *m = HostIP{} } func (m *HostIP) String() string { return proto.CompactTextString(m) } func (*HostIP) ProtoMessage() {} func (*HostIP) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{20} + return fileDescriptor_8de16154b2733812, []int{22} } func (m *HostIP) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1475,7 +1555,7 @@ func (m *FileOp) Reset() { *m = FileOp{} } func (m *FileOp) String() string { return proto.CompactTextString(m) } func (*FileOp) ProtoMessage() {} func (*FileOp) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{21} + return fileDescriptor_8de16154b2733812, []int{23} } func (m *FileOp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1523,7 +1603,7 @@ func (m *FileAction) Reset() { *m = FileAction{} } func (m *FileAction) String() string { return proto.CompactTextString(m) } func (*FileAction) ProtoMessage() {} func (*FileAction) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{22} + return fileDescriptor_8de16154b2733812, []int{24} } func (m *FileAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1646,7 +1726,7 @@ func (m *FileActionCopy) Reset() { *m = FileActionCopy{} } func (m *FileActionCopy) String() string { return proto.CompactTextString(m) } func (*FileActionCopy) ProtoMessage() {} func (*FileActionCopy) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{23} + return fileDescriptor_8de16154b2733812, []int{25} } func (m *FileActionCopy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1765,7 +1845,7 @@ func (m *FileActionMkFile) Reset() { *m = FileActionMkFile{} } func (m *FileActionMkFile) String() string { return proto.CompactTextString(m) } func (*FileActionMkFile) ProtoMessage() {} func (*FileActionMkFile) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{24} + return fileDescriptor_8de16154b2733812, []int{26} } func (m *FileActionMkFile) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1842,7 +1922,7 @@ func (m *FileActionMkDir) Reset() { *m = FileActionMkDir{} } func (m *FileActionMkDir) String() string { return proto.CompactTextString(m) } func (*FileActionMkDir) ProtoMessage() {} func (*FileActionMkDir) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{25} + return fileDescriptor_8de16154b2733812, []int{27} } func (m *FileActionMkDir) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1915,7 +1995,7 @@ func (m *FileActionRm) Reset() { *m = FileActionRm{} } func (m *FileActionRm) String() string { return proto.CompactTextString(m) } func (*FileActionRm) ProtoMessage() {} func (*FileActionRm) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{26} + return fileDescriptor_8de16154b2733812, []int{28} } func (m *FileActionRm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1970,7 +2050,7 @@ func (m *ChownOpt) Reset() { *m = ChownOpt{} } func (m *ChownOpt) String() string { return proto.CompactTextString(m) } func (*ChownOpt) ProtoMessage() {} func (*ChownOpt) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{27} + return fileDescriptor_8de16154b2733812, []int{29} } func (m *ChownOpt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2020,7 +2100,7 @@ func (m *UserOpt) Reset() { *m = UserOpt{} } func (m *UserOpt) String() string { return proto.CompactTextString(m) } func (*UserOpt) ProtoMessage() {} func (*UserOpt) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{28} + return fileDescriptor_8de16154b2733812, []int{30} } func (m *UserOpt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2099,7 +2179,7 @@ func (m *NamedUserOpt) Reset() { *m = NamedUserOpt{} } func (m *NamedUserOpt) String() string { return proto.CompactTextString(m) } func (*NamedUserOpt) ProtoMessage() {} func (*NamedUserOpt) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{29} + return fileDescriptor_8de16154b2733812, []int{31} } func (m *NamedUserOpt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2155,6 +2235,9 @@ func init() { proto.RegisterMapType((map[github_com_moby_buildkit_util_apicaps.CapID]bool)(nil), "pb.OpMetadata.CapsEntry") proto.RegisterMapType((map[string]string)(nil), "pb.OpMetadata.DescriptionEntry") proto.RegisterType((*Source)(nil), "pb.Source") + proto.RegisterMapType((map[string]*Location)(nil), "pb.Source.LocationsEntry") + proto.RegisterType((*SourceInfo)(nil), "pb.SourceInfo") + proto.RegisterType((*Location)(nil), "pb.Location") proto.RegisterType((*Range)(nil), "pb.Range") proto.RegisterType((*Position)(nil), "pb.Position") proto.RegisterType((*ExportCache)(nil), "pb.ExportCache") @@ -2177,138 +2260,143 @@ func init() { func init() { proto.RegisterFile("ops.proto", fileDescriptor_8de16154b2733812) } var fileDescriptor_8de16154b2733812 = []byte{ - // 2094 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x5f, 0x6f, 0x1b, 0xc7, - 0x11, 0xd7, 0x1d, 0xff, 0xde, 0x50, 0x92, 0xd9, 0xb5, 0xe3, 0xb2, 0xaa, 0x2b, 0x29, 0x97, 0x34, - 0x95, 0x65, 0x5b, 0x02, 0x14, 0x20, 0x09, 0x82, 0xa2, 0xa8, 0xf8, 0xc7, 0x10, 0x63, 0x5b, 0x14, - 0x96, 0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b, 0x25, 0xd9, 0x91, 0x48, 0x54, 0xd2, 0x28, 0xeb, 0xb3, 0xeb, 0x7c, - 0x47, 0x46, 0xf7, 0x84, 0xe6, 0xa4, 0xfe, 0xdf, 0x5c, 0x28, 0x69, 0x97, 0x90, 0x1d, 0x8c, 0x40, - 0x3c, 0x35, 0xc1, 0x2c, 0x34, 0x89, 0x8d, 0x00, 0xe8, 0x58, 0xcf, 0x03, 0x80, 0x71, 0xdf, 0x40, - 0x6f, 0x8c, 0x79, 0xa0, 0x84, 0xb4, 0xe9, 0x36, 0xff, 0x46, 0xd3, 0x07, 0x98, 0x11, 0xe6, 0x34, - 0x9a, 0x26, 0xf7, 0xa0, 0x2c, 0x74, 0x18, 0xf5, 0x81, 0x7e, 0x20, 0xb8, 0x16, 0x82, 0xca, 0x25, - 0x67, 0x03, 0x11, 0x8d, 0x67, 0xfa, 0x98, 0x55, 0x3a, 0xff, 0x26, 0xf7, 0xc0, 0xd3, 0x71, 0x3b, - 0x9d, 0xc5, 0xbc, 0x51, 0xd6, 0x71, 0x58, 0x9b, 0xc7, 0x14, 0x99, 0x34, 0x93, 0xe3, 0x45, 0x0d, - 0x58, 0x70, 0xc1, 0x7b, 0xb1, 0x6a, 0xdc, 0xca, 0xfc, 0xd5, 0xb2, 0x3c, 0x3a, 0x97, 0xa2, 0xda, - 0x84, 0x07, 0x92, 0x2b, 0x84, 0xbe, 0xa7, 0xa1, 0x6b, 0x36, 0xbc, 0x86, 0x49, 0x33, 0x39, 0xf1, - 0xa1, 0xdc, 0xef, 0x1f, 0x21, 0xf2, 0x76, 0x56, 0x48, 0x0c, 0x87, 0x5a, 0x89, 0xdf, 0x85, 0x6a, - 0xba, 0x0d, 0xde, 0xca, 0x6e, 0xdb, 0xde, 0x57, 0xb7, 0xdb, 0x26, 0x0f, 0xa0, 0x92, 0x5c, 0x30, - 0x19, 0x46, 0x43, 0xed, 0xbb, 0xf5, 0x83, 0x9b, 0x73, 0xab, 0xfa, 0x86, 0x8f, 0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xb9, 0xad, 0x6f, 0x5a, 0x58, 0xcd, 0x07, 0xf8, 0x12, - 0xca, 0xc6, 0x14, 0xf2, 0x0b, 0xf0, 0xc6, 0x22, 0x60, 0xb8, 0xff, 0xc2, 0x14, 0x47, 0x59, 0x34, - 0xe4, 0x34, 0x93, 0x61, 0x15, 0xc0, 0x21, 0x2b, 0x62, 0x93, 0xd4, 0x90, 0xf9, 0x37, 0x6e, 0x84, - 0xc0, 0xb1, 0xed, 0x1a, 0xe6, 0x43, 0xb7, 0x12, 0xa6, 0x98, 0x0e, 0xc8, 0x2a, 0xd5, 0xb4, 0xff, - 0x08, 0x4a, 0x5a, 0x33, 0xf1, 0xa1, 0x94, 0x28, 0x26, 0x95, 0x6d, 0xfd, 0xa6, 0x15, 0x8a, 0xc4, - 0xdc, 0x1b, 0x23, 0x22, 0x9b, 0xd8, 0x6a, 0x07, 0x36, 0xd1, 0x17, 0x11, 0x28, 0xf0, 0x7f, 0x09, - 0xd5, 0x94, 0x81, 0x9b, 0x3d, 0x0e, 0x23, 0x93, 0x63, 0x25, 0xaa, 0x69, 0x1c, 0x93, 0x5a, 0x17, - 0x4c, 0xb2, 0x40, 0x71, 0xd3, 0xe8, 0x4a, 0x34, 0x63, 0xf8, 0x1f, 0x40, 0x2d, 0x97, 0x1f, 0x78, - 0x86, 0x67, 0xda, 0x59, 0x26, 0x4b, 0xcd, 0x87, 0xff, 0x15, 0x0e, 0x71, 0x69, 0x5f, 0xfe, 0x19, - 0xc0, 0x85, 0x52, 0xf1, 0x73, 0xdd, 0xa8, 0xad, 0xa3, 0x3d, 0xe4, 0x68, 0x04, 0xd9, 0x82, 0x1a, - 0x7e, 0x24, 0x56, 0x6e, 0x9c, 0xa4, 0x57, 0x24, 0x06, 0xf0, 0x53, 0xf0, 0xce, 0xe7, 0xcb, 0x0b, - 0xd6, 0x87, 0xe9, 0xea, 0x9f, 0x40, 0x35, 0x12, 0x56, 0x66, 0xe6, 0x86, 0x4a, 0x24, 0xb4, 0xc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xb9, 0xe9, 0xfc, 0xfb, 0xe5, 0xa6, 0xf3, 0xf5, 0xab, 0xcd, - 0x95, 0x6f, 0x5f, 0x6d, 0xae, 0x7c, 0xf7, 0x6a, 0x73, 0xe5, 0xac, 0xac, 0xff, 0x62, 0xfb, 0xf8, - 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x87, 0xbc, 0x1d, 0xf7, 0xa2, 0x13, 0x00, 0x00, + // 2165 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4b, 0x6f, 0x1b, 0xc9, + 0x11, 0x16, 0xdf, 0x64, 0x51, 0x92, 0x99, 0x5e, 0xaf, 0xc3, 0x55, 0x1c, 0x49, 0x3b, 0xeb, 0x6c, + 0x64, 0xd9, 0xa6, 0x00, 0x19, 0x58, 0x2f, 0x16, 0x41, 0x10, 0xf1, 0x61, 0x88, 0x5e, 0x5b, 0x14, + 0x9a, 0x7e, 0xe4, 0x66, 0x8c, 0x86, 0x4d, 0x6a, 0x20, 0x72, 0x7a, 0xd0, 0xd3, 0xb4, 0xc5, 0x4b, + 0x0e, 0xfe, 0x05, 0x0b, 0x04, 0xc8, 0x2d, 0x01, 0x72, 0x09, 0x90, 0x63, 0x7e, 0x40, 0xee, 0x7b, + 0x5c, 0x04, 0x39, 0x2c, 0x72, 0xd8, 0x04, 0xf6, 0x0f, 0x49, 0x50, 0xd5, 0x3d, 0x9c, 0x21, 0x25, + 0xc3, 0x36, 0x12, 0xe4, 0xc4, 0xea, 0xaa, 0xaf, 0x6b, 0xaa, 0xeb, 0xd5, 0xd5, 0x84, 0x8a, 0x0c, + 0xa3, 0x46, 0xa8, 0xa4, 0x96, 0x2c, 0x1b, 0x9e, 0x6c, 0xdc, 0x19, 0xf9, 0xfa, 0x74, 0x7a, 0xd2, + 0xf0, 0xe4, 0x64, 0x6f, 0x24, 0x47, 0x72, 0x8f, 0x44, 0x27, 0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0x7e, 0x24, 0xf4, 0x23, 0x39, 0x10, 0x3c, 0x96, 0xb1, 0xdb, + 0x50, 0x8e, 0x84, 0x37, 0x55, 0xbe, 0x9e, 0x91, 0xbf, 0xd6, 0xf7, 0x6b, 0x94, 0x65, 0x96, 0x47, + 0xe0, 0x39, 0xc2, 0xf9, 0x73, 0x06, 0xf2, 0x68, 0x06, 0x63, 0x90, 0x77, 0xd5, 0xc8, 0x64, 0x77, + 0x85, 0x13, 0xcd, 0x6a, 0x90, 0x13, 0xc1, 0x0b, 0xb2, 0xa8, 0xc2, 0x91, 0x44, 0x8e, 0xf7, 0x72, + 0x60, 0x63, 0x84, 0x24, 0xee, 0x9b, 0x46, 0x42, 0xd9, 0xd0, 0x10, 0xcd, 0x6e, 0x42, 0x25, 0x54, + 0xf2, 0x7c, 0xf6, 0x1c, 0x77, 0x17, 0x52, 0x89, 0x87, 0xcc, 0x4e, 0xf0, 0x82, 0x97, 0x43, 0x4b, + 0xb1, 0x5d, 0x00, 0x71, 0xae, 0x95, 0x7b, 0x28, 0x23, 0x1d, 0xd5, 0x8b, 0x74, 0x76, 0xca, 0x77, + 0x64, 0x74, 0x8f, 0x79, 0x4a, 0xea, 0xfc, 0x2d, 0x0b, 0x05, 0x72, 0x09, 0xdb, 0xc1, 0x08, 0x84, + 0x53, 0x13, 0xcc, 0x5c, 0x93, 0xd9, 0x08, 0x00, 0xc5, 0x7a, 0x1e, 0x00, 0x8c, 0xfb, 0x06, 0x7a, + 0x63, 0x2c, 0x3c, 0x2d, 0x95, 0x4d, 0xb7, 0xf9, 0x1a, 0x4d, 0x1f, 0x60, 0x46, 0x98, 0xd3, 0x10, + 0xcd, 0x6e, 0x41, 0x51, 0x52, 0x18, 0xe9, 0x40, 0x6f, 0x09, 0xae, 0x85, 0xa0, 0x72, 0x25, 0xdc, + 0x81, 0x0c, 0xc6, 0x33, 0x3a, 0x66, 0x99, 0xcf, 0xd7, 0xec, 0x16, 0x54, 0x28, 0x6e, 0x8f, 0x67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, 0x82, 0xfd, 0xfc, 0xa2, 0x8b, 0x68, 0xcc, 0xe0, 0x6e, 0x30, 0x12, 0x29, 0x97, + 0x38, 0xcf, 0xa0, 0x40, 0x3c, 0x2c, 0x87, 0x48, 0xbb, 0x4a, 0xdb, 0xa1, 0xc5, 0x5c, 0xe2, 0x32, + 0x22, 0xd5, 0xcd, 0x3c, 0x26, 0x0c, 0x37, 0x00, 0x76, 0x03, 0x47, 0x85, 0x41, 0xfa, 0xec, 0x4b, + 0x38, 0x14, 0x3b, 0xbf, 0x80, 0x72, 0xcc, 0xc6, 0xd3, 0x3d, 0xf4, 0x03, 0x73, 0xea, 0x02, 0x27, + 0x1a, 0x87, 0xbd, 0xd6, 0xa9, 0xab, 0x5c, 0x4f, 0x0b, 0x73, 0x5d, 0x17, 0x78, 0xc2, 0x70, 0x3e, + 0x83, 0x6a, 0x2a, 0xcb, 0x31, 0x2d, 0x9e, 0x92, 0xc3, 0x4d, 0xad, 0x99, 0x85, 0xf3, 0x0a, 0x47, + 0xd1, 0x78, 0xba, 0xf8, 0x29, 0xc0, 0xa9, 0xd6, 0xe1, 0x73, 0x1a, 0x37, 0xac, 0x7f, 0x2b, 0xc8, + 0x21, 0x04, 0xdb, 0x82, 0x2a, 0x2e, 0x22, 0x2b, 0x37, 0x79, 0x49, 0x3b, 0x22, 0x03, 0xf8, 0x09, + 0x54, 0x86, 0xf3, 0xed, 0x39, 0x1b, 0x9e, 0x78, 0xf7, 0x27, 0x50, 0x0e, 0xa4, 0x95, 0x99, 0xe9, + 0xa7, 0x14, 0x48, 0x12, 0x39, 0xb7, 0xe0, 0x47, 0x17, 0xe6, 0x66, 0x76, 0x0d, 0x8a, 0x43, 0x7f, + 0xac, 0xa9, 0x39, 0xe3, 0x40, 0x65, 0x57, 0xce, 0xbf, 0x33, 0x00, 0x49, 0xf4, 0x30, 0xb3, 0xb0, + 0xcb, 0x22, 0x66, 0xd5, 0x74, 0xd5, 0x31, 0x94, 0x27, 0xb6, 0x5e, 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0x20, 0xab, 0x26, 0xf5, 0x12, 0x21, 0x6b, 0x4b, 0xde, 0x9c, 0x1c, 0xae, 0xf0, 0xac, 0x9a, 0x34, + 0xcb, 0x50, 0x34, 0x7e, 0x75, 0xfe, 0x94, 0x83, 0xf5, 0x45, 0x2b, 0x31, 0x0f, 0x22, 0xe5, 0xc5, + 0x79, 0x10, 0x29, 0x6f, 0x3e, 0x66, 0x67, 0x53, 0x63, 0xb6, 0x03, 0x05, 0xf9, 0x32, 0x10, 0x2a, + 0xfd, 0x0e, 0x6e, 0x9d, 0xca, 0x97, 0x01, 0x0e, 0x94, 0x46, 0xb4, 0x30, 0x9f, 0x15, 0xec, 0x7c, + 0x76, 0x03, 0xd6, 0x86, 0x72, 0x3c, 0x96, 0x2f, 0xfb, 0xb3, 0xc9, 0xd8, 0x0f, 0xce, 0xec, 0x90, + 0xb6, 0xc8, 0x64, 0x3b, 0x70, 0x65, 0xe0, 0x2b, 0x34, 0xa7, 0x25, 0x03, 0x2d, 0x02, 0x7a, 0x59, + 0x20, 0x6e, 0x99, 0xcd, 0x1e, 0xc0, 0xb6, 0xab, 0xb5, 0x98, 0x84, 0xfa, 0x49, 0x10, 0xba, 0xde, + 0x59, 0x5b, 0x7a, 0x54, 0xb5, 0x93, 0xd0, 0xd5, 0xfe, 0x89, 0x3f, 0xc6, 0x47, 0x54, 0x89, 0xb6, + 0xbe, 0x13, 0xc7, 0x3e, 0x87, 0x75, 0x4f, 0x09, 0x57, 0x8b, 0xb6, 0x88, 0xf4, 0xb1, 0xab, 0x4f, + 0xeb, 0x65, 0xda, 0xb9, 0xc4, 0xc5, 0x33, 0xb8, 0x68, 0xed, 0x33, 0x7f, 0x3c, 0xf0, 0x5c, 0x35, + 0xa8, 0x57, 0xcc, 0x19, 0x16, 0x98, 0xac, 0x01, 0x8c, 0x18, 0x9d, 0x49, 0xa8, 0x67, 0x73, 0x28, + 0x10, 0xf4, 0x12, 0x09, 0xb6, 0x4e, 0xed, 0x4f, 0x44, 0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, 0xdd, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x08, 0x96, 0x69, + 0xc9, 0x8e, 0x14, 0x00, 0x00, } func (m *Op) Marshal() (dAtA []byte, err error) { @@ -3146,18 +3234,6 @@ func (m *OpMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Source != nil { - { - size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOps(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } if len(m.Caps) > 0 { keysForCaps := make([]string, 0, len(m.Caps)) for k := range m.Caps { @@ -3254,27 +3330,121 @@ func (m *Source) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Info != nil { + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOps(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Locations) > 0 { + keysForLocations := make([]string, 0, len(m.Locations)) + for k := range m.Locations { + keysForLocations = append(keysForLocations, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLocations) + for iNdEx := len(keysForLocations) - 1; iNdEx >= 0; iNdEx-- { + v := m.Locations[string(keysForLocations[iNdEx])] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOps(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(keysForLocations[iNdEx]) + copy(dAtA[i:], keysForLocations[iNdEx]) + i = encodeVarintOps(dAtA, i, uint64(len(keysForLocations[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintOps(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SourceInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SourceInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SourceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Definition != nil { + { + size, err := m.Definition.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOps(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } if len(m.Data) > 0 { i -= len(m.Data) copy(dAtA[i:], m.Data) i = encodeVarintOps(dAtA, i, uint64(len(m.Data))) i-- - dAtA[i] = 0x22 - } - if len(m.Local) > 0 { - i -= len(m.Local) - copy(dAtA[i:], m.Local) - i = encodeVarintOps(dAtA, i, uint64(len(m.Local))) - i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if len(m.Filename) > 0 { i -= len(m.Filename) copy(dAtA[i:], m.Filename) i = encodeVarintOps(dAtA, i, uint64(len(m.Filename))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0xa } + return len(dAtA) - i, nil +} + +func (m *Location) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Location) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l if len(m.Locations) > 0 { for iNdEx := len(m.Locations) - 1; iNdEx >= 0; iNdEx-- { { @@ -3312,30 +3482,26 @@ func (m *Range) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.End != nil { - { - size, err := m.End.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOps(dAtA, i, uint64(size)) + { + size, err := m.End.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i -= size + i = encodeVarintOps(dAtA, i, uint64(size)) } - if m.Start != nil { - { - size, err := m.Start.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOps(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + { + size, err := m.Start.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintOps(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -3508,6 +3674,20 @@ func (m *Definition) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Sources) > 0 { + for iNdEx := len(m.Sources) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Sources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOps(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } if len(m.Metadata) > 0 { keysForMetadata := make([]string, 0, len(m.Metadata)) for k := range m.Metadata { @@ -4593,14 +4773,57 @@ func (m *OpMetadata) Size() (n int) { n += mapEntrySize + 1 + sovOps(uint64(mapEntrySize)) } } - if m.Source != nil { - l = m.Source.Size() + return n +} + +func (m *Source) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Locations) > 0 { + for k, v := range m.Locations { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovOps(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovOps(uint64(len(k))) + l + n += mapEntrySize + 1 + sovOps(uint64(mapEntrySize)) + } + } + if m.Info != nil { + l = m.Info.Size() n += 1 + l + sovOps(uint64(l)) } return n } -func (m *Source) Size() (n int) { +func (m *SourceInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Filename) + if l > 0 { + n += 1 + l + sovOps(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovOps(uint64(l)) + } + if m.Definition != nil { + l = m.Definition.Size() + n += 1 + l + sovOps(uint64(l)) + } + return n +} + +func (m *Location) Size() (n int) { if m == nil { return 0 } @@ -4612,18 +4835,6 @@ func (m *Source) Size() (n int) { n += 1 + l + sovOps(uint64(l)) } } - l = len(m.Filename) - if l > 0 { - n += 1 + l + sovOps(uint64(l)) - } - l = len(m.Local) - if l > 0 { - n += 1 + l + sovOps(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovOps(uint64(l)) - } return n } @@ -4633,14 +4844,10 @@ func (m *Range) Size() (n int) { } var l int _ = l - if m.Start != nil { - l = m.Start.Size() - n += 1 + l + sovOps(uint64(l)) - } - if m.End != nil { - l = m.End.Size() - n += 1 + l + sovOps(uint64(l)) - } + l = m.Start.Size() + n += 1 + l + sovOps(uint64(l)) + l = m.End.Size() + n += 1 + l + sovOps(uint64(l)) return n } @@ -4732,6 +4939,12 @@ func (m *Definition) Size() (n int) { n += mapEntrySize + 1 + sovOps(uint64(mapEntrySize)) } } + if len(m.Sources) > 0 { + for _, e := range m.Sources { + l = e.Size() + n += 1 + l + sovOps(uint64(l)) + } + } return n } @@ -7758,42 +7971,6 @@ func (m *OpMetadata) Unmarshal(dAtA []byte) error { } m.Caps[github_com_moby_buildkit_util_apicaps.CapID(mapkey)] = mapvalue iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOps - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOps - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOps - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Source == nil { - m.Source = &Source{} - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipOps(dAtA[iNdEx:]) @@ -7876,12 +8053,196 @@ func (m *Source) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Locations = append(m.Locations, &Range{}) - if err := m.Locations[len(m.Locations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Locations == nil { + m.Locations = make(map[string]*Location) + } + var mapkey string + var mapvalue *Location + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthOps + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthOps + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthOps + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthOps + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Location{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipOps(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOps + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Locations[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOps + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOps + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Info == nil { + m.Info = &SourceInfo{} + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + default: + iNdEx = preIndex + skippy, err := skipOps(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOps + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthOps + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SourceInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SourceInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SourceInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) } @@ -7913,39 +8274,7 @@ func (m *Source) Unmarshal(dAtA []byte) error { } m.Filename = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Local", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOps - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOps - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOps - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Local = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } @@ -7979,6 +8308,129 @@ func (m *Source) Unmarshal(dAtA []byte) error { m.Data = []byte{} } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Definition", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOps + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOps + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Definition == nil { + m.Definition = &Definition{} + } + if err := m.Definition.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOps(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOps + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthOps + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Location) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Location: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Location: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Locations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOps + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOps + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Locations = append(m.Locations, &Range{}) + if err := m.Locations[len(m.Locations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipOps(dAtA[iNdEx:]) @@ -8061,9 +8513,6 @@ func (m *Range) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Start == nil { - m.Start = &Position{} - } if err := m.Start.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -8097,9 +8546,6 @@ func (m *Range) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.End == nil { - m.End = &Position{} - } if err := m.End.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -8748,6 +9194,40 @@ func (m *Definition) Unmarshal(dAtA []byte) error { } m.Metadata[github_com_opencontainers_go_digest.Digest(mapkey)] = *mapvalue iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOps + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOps + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sources = append(m.Sources, &Source{}) + if err := m.Sources[len(m.Sources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipOps(dAtA[iNdEx:]) diff --git a/solver/pb/ops.proto b/solver/pb/ops.proto index dc1363c1..9a611cf0 100644 --- a/solver/pb/ops.proto +++ b/solver/pb/ops.proto @@ -175,20 +175,26 @@ message OpMetadata { ExportCache export_cache = 4; map caps = 5 [(gogoproto.castkey) = "github.com/moby/buildkit/util/apicaps.CapID", (gogoproto.nullable) = false]; - - Source source = 6; } message Source { - repeated Range locations = 1; - string filename = 2; - string local = 3; - bytes data = 4; + map locations = 1; + SourceInfo info = 2; +} + +message SourceInfo { + string filename = 1; + bytes data = 2; + Definition definition = 3; +} + +message Location { + repeated Range locations = 1; } message Range { - Position start = 1; - Position end = 2; + Position start = 1 [(gogoproto.nullable) = false]; + Position end = 2 [(gogoproto.nullable) = false]; } message Position { @@ -219,6 +225,8 @@ message Definition { // metadata contains metadata for the each of the Op messages. // A key must be an LLB op digest string. Currently, empty string is not expected as a key, but it may change in the future. map metadata = 2 [(gogoproto.castkey) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; + + repeated Source Sources = 3; } message HostIP { diff --git a/util/grpcerrors/grpcerrors.go b/util/grpcerrors/grpcerrors.go index cecc68c3..acba2750 100644 --- a/util/grpcerrors/grpcerrors.go +++ b/util/grpcerrors/grpcerrors.go @@ -1,8 +1,10 @@ package grpcerrors import ( + gogotypes "github.com/gogo/protobuf/types" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" + "github.com/golang/protobuf/ptypes/any" "github.com/moby/buildkit/util/stack" spb "google.golang.org/genproto/googleapis/rpc/status" "google.golang.org/grpc/codes" @@ -121,13 +123,20 @@ func FromGRPC(err error) error { // details that we don't understand are copied as proto for _, d := range pb.Details { + var m interface{} detail := &ptypes.DynamicAny{} if err := ptypes.UnmarshalAny(d, detail); err != nil { - n.Details = append(n.Details, d) - continue + detail := &gogotypes.DynamicAny{} + if err := gogotypes.UnmarshalAny(gogoAny(d), detail); err != nil { + n.Details = append(n.Details, d) + continue + } + m = detail.Message + } else { + m = detail.Message } - switch v := detail.Message.(type) { + switch v := m.(type) { case *stack.Stack: stacks = append(stacks, v) case TypedErrorProto: @@ -170,3 +179,10 @@ func each(err error, fn func(error)) { each(wrapped.Unwrap(), fn) } } + +func gogoAny(in *any.Any) *gogotypes.Any { + return &gogotypes.Any{ + TypeUrl: in.TypeUrl, + Value: in.Value, + } +} From e536302180ab69722632a1c7d1c16d82dbc41741 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Fri, 15 May 2020 20:56:09 -0700 Subject: [PATCH 03/11] dockerfile: keep mapping on #syntax error Signed-off-by: Tonis Tiigi --- frontend/dockerfile/builder/build.go | 8 +++-- .../dockerfile/dockerfile2llb/directives.go | 33 ++++++++++++++----- .../dockerfile2llb/directives_test.go | 14 ++++---- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/frontend/dockerfile/builder/build.go b/frontend/dockerfile/builder/build.go index 0596babc..0a0b574e 100644 --- a/frontend/dockerfile/builder/build.go +++ b/frontend/dockerfile/builder/build.go @@ -317,9 +317,13 @@ func Build(ctx context.Context, c client.Client) (*client.Result, error) { } if _, ok := opts["cmdline"]; !ok { - ref, cmdline, ok := dockerfile2llb.DetectSyntax(bytes.NewBuffer(dtDockerfile)) + ref, cmdline, loc, ok := dockerfile2llb.DetectSyntax(bytes.NewBuffer(dtDockerfile)) if ok { - return forwardGateway(ctx, c, ref, cmdline) + res, err := forwardGateway(ctx, c, ref, cmdline) + if err != nil && len(errdefs.Sources(err)) == 0 { + return nil, wrapSource(err, sourceMap, loc) + } + return res, err } } diff --git a/frontend/dockerfile/dockerfile2llb/directives.go b/frontend/dockerfile/dockerfile2llb/directives.go index cf06b5ad..3cf982b9 100644 --- a/frontend/dockerfile/dockerfile2llb/directives.go +++ b/frontend/dockerfile/dockerfile2llb/directives.go @@ -5,34 +5,51 @@ import ( "io" "regexp" "strings" + + "github.com/moby/buildkit/frontend/dockerfile/parser" ) const keySyntax = "syntax" var reDirective = regexp.MustCompile(`^#\s*([a-zA-Z][a-zA-Z0-9]*)\s*=\s*(.+?)\s*$`) -func DetectSyntax(r io.Reader) (string, string, bool) { +type Directive struct { + Name string + Value string + Location []parser.Range +} + +func DetectSyntax(r io.Reader) (string, string, []parser.Range, bool) { directives := ParseDirectives(r) if len(directives) == 0 { - return "", "", false + return "", "", nil, false } v, ok := directives[keySyntax] if !ok { - return "", "", false + return "", "", nil, false } - p := strings.SplitN(v, " ", 2) - return p[0], v, true + p := strings.SplitN(v.Value, " ", 2) + return p[0], v.Value, v.Location, true } -func ParseDirectives(r io.Reader) map[string]string { - m := map[string]string{} +func ParseDirectives(r io.Reader) map[string]Directive { + m := map[string]Directive{} s := bufio.NewScanner(r) + var l int for s.Scan() { + l++ match := reDirective.FindStringSubmatch(s.Text()) if len(match) == 0 { return m } - m[strings.ToLower(match[1])] = match[2] + m[strings.ToLower(match[1])] = Directive{ + Name: match[1], + Value: match[2], + Location: []parser.Range{{ + Start: parser.Position{Line: l}, + End: parser.Position{Line: l}, + }}, + } } return m } diff --git a/frontend/dockerfile/dockerfile2llb/directives_test.go b/frontend/dockerfile/dockerfile2llb/directives_test.go index 3297fa9c..5d1be808 100644 --- a/frontend/dockerfile/dockerfile2llb/directives_test.go +++ b/frontend/dockerfile/dockerfile2llb/directives_test.go @@ -22,11 +22,11 @@ func TestDirectives(t *testing.T) { v, ok := d["escape"] require.True(t, ok) - require.Equal(t, v, "\\") + require.Equal(t, v.Value, "\\") v, ok = d["key"] require.True(t, ok) - require.Equal(t, v, "FOO bar") + require.Equal(t, v.Value, "FOO bar") // for some reason Moby implementation in case insensitive for escape dt = `# EScape=\ @@ -40,11 +40,11 @@ func TestDirectives(t *testing.T) { v, ok = d["escape"] require.True(t, ok) - require.Equal(t, v, "\\") + require.Equal(t, v.Value, "\\") v, ok = d["key"] require.True(t, ok) - require.Equal(t, v, "FOO bar") + require.Equal(t, v.Value, "FOO bar") } func TestSyntaxDirective(t *testing.T) { @@ -54,15 +54,17 @@ func TestSyntaxDirective(t *testing.T) { FROM busybox ` - ref, cmdline, ok := DetectSyntax(bytes.NewBuffer([]byte(dt))) + ref, cmdline, loc, ok := DetectSyntax(bytes.NewBuffer([]byte(dt))) require.True(t, ok) require.Equal(t, ref, "dockerfile:experimental") require.Equal(t, cmdline, "dockerfile:experimental // opts") + require.Equal(t, 1, loc[0].Start.Line) + require.Equal(t, 1, loc[0].End.Line) dt = `FROM busybox RUN ls ` - ref, cmdline, ok = DetectSyntax(bytes.NewBuffer([]byte(dt))) + ref, cmdline, _, ok = DetectSyntax(bytes.NewBuffer([]byte(dt))) require.False(t, ok) require.Equal(t, ref, "") require.Equal(t, cmdline, "") From 75d64ffb4a02b0655ccc31ab7e4393dec720d146 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Sat, 16 May 2020 15:26:17 -0700 Subject: [PATCH 04/11] fix proto indentions Signed-off-by: Tonis Tiigi --- frontend/gateway/pb/gateway.proto | 10 +++++----- solver/errdefs/errdefs.proto | 6 +++--- solver/pb/ops.proto | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/frontend/gateway/pb/gateway.proto b/frontend/gateway/pb/gateway.proto index 44131477..8b4725e2 100644 --- a/frontend/gateway/pb/gateway.proto +++ b/frontend/gateway/pb/gateway.proto @@ -32,7 +32,7 @@ service LLBBridge { message Result { oneof result { - // Deprecated non-array refs. + // Deprecated non-array refs. string refDeprecated = 1; RefMapDeprecated refsDeprecated = 2; @@ -67,7 +67,7 @@ message InputsRequest { } message InputsResponse { - map Definitions = 1; + map Definitions = 1; } message ResolveImageConfigRequest { @@ -87,9 +87,9 @@ message SolveRequest { string Frontend = 2; map FrontendOpt = 3; // ImportCacheRefsDeprecated is deprecated in favor or the new Imports since BuildKit v0.4.0. - // When ImportCacheRefsDeprecated is set, the solver appends - // {.Type = "registry", .Attrs = {"ref": importCacheRef}} - // for each of the ImportCacheRefs entry to CacheImports for compatibility. (planned to be removed) + // When ImportCacheRefsDeprecated is set, the solver appends + // {.Type = "registry", .Attrs = {"ref": importCacheRef}} + // for each of the ImportCacheRefs entry to CacheImports for compatibility. (planned to be removed) repeated string ImportCacheRefsDeprecated = 4; bool allowResultReturn = 5; bool allowResultArrayRef = 6; diff --git a/solver/errdefs/errdefs.proto b/solver/errdefs/errdefs.proto index c340f251..18dff79b 100644 --- a/solver/errdefs/errdefs.proto +++ b/solver/errdefs/errdefs.proto @@ -5,10 +5,10 @@ package errdefs; import "github.com/moby/buildkit/solver/pb/ops.proto"; message Vertex { - string digest = 1; + string digest = 1; } message Source { - pb.SourceInfo info = 1; - repeated pb.Range locations = 2; + pb.SourceInfo info = 1; + repeated pb.Range locations = 2; } \ No newline at end of file diff --git a/solver/pb/ops.proto b/solver/pb/ops.proto index 9a611cf0..a07397e5 100644 --- a/solver/pb/ops.proto +++ b/solver/pb/ops.proto @@ -178,12 +178,12 @@ message OpMetadata { } message Source { - map locations = 1; + map locations = 1; SourceInfo info = 2; } message SourceInfo { - string filename = 1; + string filename = 1; bytes data = 2; Definition definition = 3; } @@ -193,13 +193,13 @@ message Location { } message Range { - Position start = 1 [(gogoproto.nullable) = false]; - Position end = 2 [(gogoproto.nullable) = false]; + Position start = 1 [(gogoproto.nullable) = false]; + Position end = 2 [(gogoproto.nullable) = false]; } message Position { - int32 Line = 1; - int32 Character = 2; + int32 Line = 1; + int32 Character = 2; } message ExportCache { From 90c5e674962c6ed723231bde431926d5d09cc847 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Tue, 19 May 2020 12:59:15 -0700 Subject: [PATCH 05/11] client: add source mapping tests Signed-off-by: Tonis Tiigi --- client/client_test.go | 98 +++++++++++++++++++++++++++++++++++++++++ client/llb/sourcemap.go | 8 ++-- 2 files changed, 103 insertions(+), 3 deletions(-) diff --git a/client/client_test.go b/client/client_test.go index af0babbb..34930288 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -34,6 +34,8 @@ import ( "github.com/moby/buildkit/session" "github.com/moby/buildkit/session/secrets/secretsprovider" "github.com/moby/buildkit/session/sshforward/sshprovider" + "github.com/moby/buildkit/solver/errdefs" + "github.com/moby/buildkit/solver/pb" "github.com/moby/buildkit/util/contentutil" "github.com/moby/buildkit/util/entitlements" "github.com/moby/buildkit/util/testutil" @@ -113,6 +115,8 @@ func TestIntegration(t *testing.T) { testTarExporterWithSocket, testTarExporterSymlink, testMultipleRegistryCacheImportExport, + testSourceMap, + testSourceMapFromRef, }, mirrors) integration.Run(t, []integration.Test{ @@ -2681,6 +2685,100 @@ func testReadonlyRootFS(t *testing.T, sb integration.Sandbox) { checkAllReleasable(t, c, sb, true) } +func testSourceMap(t *testing.T, sb integration.Sandbox) { + c, err := New(context.TODO(), sb.Address()) + require.NoError(t, err) + defer c.Close() + + sm := llb.NewSourceMap(nil, "foo", []byte("data")) + + st := llb.Scratch().Run(llb.Shlex("not-exist"), sm.Location([]*pb.Range{{Start: pb.Position{Line: 7}}})) + + def, err := st.Marshal(context.TODO()) + require.NoError(t, err) + + _, err = c.Solve(context.TODO(), def, SolveOpt{}, nil) + require.Error(t, err) + + srcs := errdefs.Sources(err) + require.Equal(t, 1, len(srcs)) + + require.Equal(t, "foo", srcs[0].Info.Filename) + require.Equal(t, []byte("data"), srcs[0].Info.Data) + require.Nil(t, srcs[0].Info.Definition) + + require.Equal(t, 1, len(srcs[0].Locations)) + require.Equal(t, int32(7), srcs[0].Locations[0].Start.Line) + require.Equal(t, int32(0), srcs[0].Locations[0].Start.Character) +} + +func testSourceMapFromRef(t *testing.T, sb integration.Sandbox) { + requiresLinux(t) + c, err := New(context.TODO(), sb.Address()) + require.NoError(t, err) + defer c.Close() + + srcState := llb.Scratch().File( + llb.Mkfile("foo", 0600, []byte("data"))) + sm := llb.NewSourceMap(&srcState, "bar", []byte("bardata")) + + frontend := func(ctx context.Context, c gateway.Client) (*gateway.Result, error) { + st := llb.Scratch().File( + llb.Mkdir("foo/bar", 0600), //fails because /foo doesn't exist + sm.Location([]*pb.Range{{Start: pb.Position{Line: 3, Character: 1}}}), + ) + + def, err := st.Marshal(context.TODO()) + if err != nil { + return nil, err + } + + res, err := c.Solve(ctx, gateway.SolveRequest{ + Definition: def.ToPB(), + }) + if err != nil { + return nil, err + } + + ref, err := res.SingleRef() + if err != nil { + return nil, err + } + + st2, err := ref.ToState() + if err != nil { + return nil, err + } + + st = llb.Scratch().File( + llb.Copy(st2, "foo", "foo2"), + ) + + def, err = st.Marshal(context.TODO()) + if err != nil { + return nil, err + } + + return c.Solve(ctx, gateway.SolveRequest{ + Definition: def.ToPB(), + }) + } + + _, err = c.Build(context.TODO(), SolveOpt{}, "", frontend, nil) + require.Error(t, err) + + srcs := errdefs.Sources(err) + require.Equal(t, 1, len(srcs)) + + require.Equal(t, "bar", srcs[0].Info.Filename) + require.Equal(t, []byte("bardata"), srcs[0].Info.Data) + require.NotNil(t, srcs[0].Info.Definition) + + require.Equal(t, 1, len(srcs[0].Locations)) + require.Equal(t, int32(3), srcs[0].Locations[0].Start.Line) + require.Equal(t, int32(1), srcs[0].Locations[0].Start.Character) +} + func testProxyEnv(t *testing.T, sb integration.Sandbox) { c, err := New(context.TODO(), sb.Address()) require.NoError(t, err) diff --git a/client/llb/sourcemap.go b/client/llb/sourcemap.go index 7a23e229..62e44d87 100644 --- a/client/llb/sourcemap.go +++ b/client/llb/sourcemap.go @@ -75,12 +75,14 @@ func (smc *sourceMapCollector) Marshal(ctx context.Context, co ...ConstraintsOpt } s := &pb.Source{ Info: &pb.SourceInfo{ - Data: m.Data, - Filename: m.Filename, - Definition: def.ToPB(), + Data: m.Data, + Filename: m.Filename, }, Locations: map[string]*pb.Location{}, } + if def != nil { + s.Info.Definition = def.ToPB() + } for dgst, loc := range smc.locations[i] { s.Locations[dgst.String()] = &pb.Location{ Locations: loc, From 6dee7ee0fc323ba460170a18bec718290a4d46d8 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Tue, 19 May 2020 16:36:07 -0700 Subject: [PATCH 06/11] dockerfile: add source mapping tests Signed-off-by: Tonis Tiigi --- frontend/dockerfile/dockerfile2llb/convert.go | 2 +- frontend/dockerfile/dockerfile_test.go | 1 + frontend/dockerfile/errors_test.go | 117 ++++++++++++++++++ 3 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 frontend/dockerfile/errors_test.go diff --git a/frontend/dockerfile/dockerfile2llb/convert.go b/frontend/dockerfile/dockerfile2llb/convert.go index c1a9d531..552d09e6 100644 --- a/frontend/dockerfile/dockerfile2llb/convert.go +++ b/frontend/dockerfile/dockerfile2llb/convert.go @@ -429,7 +429,7 @@ func toCommand(ic instructions.Command, allDispatchStates *dispatchStates) (comm stn, ok = allDispatchStates.findStateByName(c.From) if !ok { stn = &dispatchState{ - stage: instructions.Stage{BaseName: c.From}, + stage: instructions.Stage{BaseName: c.From, Location: ic.Location()}, deps: make(map[*dispatchState]struct{}), unregistered: true, } diff --git a/frontend/dockerfile/dockerfile_test.go b/frontend/dockerfile/dockerfile_test.go index d0ed815b..6dd7ca24 100644 --- a/frontend/dockerfile/dockerfile_test.go +++ b/frontend/dockerfile/dockerfile_test.go @@ -100,6 +100,7 @@ var allTests = []integration.Test{ testOnBuildCleared, testFrontendUseForwardedSolveResults, testFrontendInputs, + testErrorsSourceMap, } var fileOpTests = []integration.Test{ diff --git a/frontend/dockerfile/errors_test.go b/frontend/dockerfile/errors_test.go new file mode 100644 index 00000000..efbb4c6a --- /dev/null +++ b/frontend/dockerfile/errors_test.go @@ -0,0 +1,117 @@ +package dockerfile + +import ( + "context" + "fmt" + "os" + "testing" + + "github.com/containerd/continuity/fs/fstest" + "github.com/moby/buildkit/client" + "github.com/moby/buildkit/frontend/dockerfile/builder" + "github.com/moby/buildkit/solver/errdefs" + "github.com/moby/buildkit/util/testutil/integration" + "github.com/stretchr/testify/require" +) + +func testErrorsSourceMap(t *testing.T, sb integration.Sandbox) { + f := getFrontend(t, sb) + + tcases := []struct { + name string + dockerfile string + errorLine []int + }{ + { + name: "invalidenv", + dockerfile: `from alpine +env`, + errorLine: []int{2}, + }, + { + name: "invalidsyntax", + dockerfile: `#syntax=foobar +from alpine`, + errorLine: []int{1}, + }, + { + name: "invalidrun", + dockerfile: `from scratch +env foo=bar +run what`, + errorLine: []int{3}, + }, + { + name: "invalidcopy", + dockerfile: `from scratch +env foo=bar +copy foo bar +env bar=baz`, + errorLine: []int{3}, + }, + { + name: "invalidflag", + dockerfile: `from scratch +env foo=bar +copy --foo=bar / / +env bar=baz`, + errorLine: []int{3}, + }, + { + name: "invalidcopyfrom", + dockerfile: `from scratch +env foo=bar +copy --from=invalid foo bar +env bar=baz`, + errorLine: []int{3}, + }, + { + name: "invalidmultiline", + dockerfile: `from scratch +run wh\ +at +env bar=baz`, + errorLine: []int{2, 3}, + }, + } + + for _, tc := range tcases { + t.Run(tc.name, func(t *testing.T) { + dir, err := tmpdir( + fstest.CreateFile("Dockerfile", []byte(tc.dockerfile), 0600), + ) + require.NoError(t, err) + defer os.RemoveAll(dir) + + c, err := client.New(context.TODO(), sb.Address()) + require.NoError(t, err) + defer c.Close() + + _, err = f.Solve(context.TODO(), c, client.SolveOpt{ + LocalDirs: map[string]string{ + builder.DefaultLocalNameDockerfile: dir, + builder.DefaultLocalNameContext: dir, + }, + }, nil) + require.Error(t, err) + + srcs := errdefs.Sources(err) + require.Equal(t, 1, len(srcs)) + + require.Equal(t, "Dockerfile", srcs[0].Info.Filename) + require.Equal(t, tc.dockerfile, string(srcs[0].Info.Data)) + require.Equal(t, len(tc.errorLine), len(srcs[0].Locations)) + require.NotNil(t, srcs[0].Info.Definition) + + next: + for _, l := range tc.errorLine { + for _, l2 := range srcs[0].Locations { + if l2.Start.Line == int32(l) { + continue next + } + } + require.Fail(t, fmt.Sprintf("line %d not found", l)) + } + }) + } +} From d173e3dca8ea2325bbd41a4c5b1877cebb5c8f22 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Tue, 19 May 2020 17:21:49 -0700 Subject: [PATCH 07/11] pb: add more comments Signed-off-by: Tonis Tiigi --- solver/pb/ops.pb.go | 8 +++++++- solver/pb/ops.proto | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/solver/pb/ops.pb.go b/solver/pb/ops.pb.go index 70cb74e6..b313075a 100644 --- a/solver/pb/ops.pb.go +++ b/solver/pb/ops.pb.go @@ -1054,6 +1054,7 @@ func (m *OpMetadata) GetCaps() map[github_com_moby_buildkit_util_apicaps.CapID]b return nil } +// Source is a source mapping description for a file type Source struct { Locations map[string]*Location `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Info *SourceInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` @@ -1102,6 +1103,7 @@ func (m *Source) GetInfo() *SourceInfo { return nil } +// Source info contains the shared metadata of a source mapping type SourceInfo struct { Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` @@ -1158,6 +1160,7 @@ func (m *SourceInfo) GetDefinition() *Definition { return nil } +// Location defines list of areas in to source file type Location struct { Locations []*Range `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty"` } @@ -1198,6 +1201,7 @@ func (m *Location) GetLocations() []*Range { return nil } +// Range is an area in the source file type Range struct { Start Position `protobuf:"bytes,1,opt,name=start,proto3" json:"start"` End Position `protobuf:"bytes,2,opt,name=end,proto3" json:"end"` @@ -1246,6 +1250,7 @@ func (m *Range) GetEnd() Position { return Position{} } +// Position is single location in a source file type Position struct { Line int32 `protobuf:"varint,1,opt,name=Line,proto3" json:"Line,omitempty"` Character int32 `protobuf:"varint,2,opt,name=Character,proto3" json:"Character,omitempty"` @@ -1446,7 +1451,8 @@ type Definition struct { // metadata contains metadata for the each of the Op messages. // A key must be an LLB op digest string. Currently, empty string is not expected as a key, but it may change in the future. Metadata map[github_com_opencontainers_go_digest.Digest]OpMetadata `protobuf:"bytes,2,rep,name=metadata,proto3,castkey=github.com/opencontainers/go-digest.Digest" json:"metadata" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Sources []*Source `protobuf:"bytes,3,rep,name=Sources,proto3" json:"Sources,omitempty"` + // Sources contains the source mapping information for the vertexes in the definition + Sources []*Source `protobuf:"bytes,3,rep,name=Sources,proto3" json:"Sources,omitempty"` } func (m *Definition) Reset() { *m = Definition{} } diff --git a/solver/pb/ops.proto b/solver/pb/ops.proto index a07397e5..ebd48e0f 100644 --- a/solver/pb/ops.proto +++ b/solver/pb/ops.proto @@ -177,26 +177,31 @@ message OpMetadata { map caps = 5 [(gogoproto.castkey) = "github.com/moby/buildkit/util/apicaps.CapID", (gogoproto.nullable) = false]; } +// Source is a source mapping description for a file message Source { map locations = 1; SourceInfo info = 2; } +// Source info contains the shared metadata of a source mapping message SourceInfo { string filename = 1; bytes data = 2; Definition definition = 3; } +// Location defines list of areas in to source file message Location { repeated Range locations = 1; } +// Range is an area in the source file message Range { Position start = 1 [(gogoproto.nullable) = false]; Position end = 2 [(gogoproto.nullable) = false]; } +// Position is single location in a source file message Position { int32 Line = 1; int32 Character = 2; @@ -225,7 +230,7 @@ message Definition { // metadata contains metadata for the each of the Op messages. // A key must be an LLB op digest string. Currently, empty string is not expected as a key, but it may change in the future. map metadata = 2 [(gogoproto.castkey) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; - + // Sources contains the source mapping information for the vertexes in the definition repeated Source Sources = 3; } From 7a90a36b4631e47a75dd45f57e68752a9dcfe652 Mon Sep 17 00:00:00 2001 From: Edgar Lee Date: Wed, 20 May 2020 16:16:38 -0700 Subject: [PATCH 08/11] Support multiple source maps and locations for source-level stacktraces Signed-off-by: Edgar Lee --- client/llb/definition.go | 38 +- client/llb/marshal.go | 6 +- client/llb/sourcemap.go | 54 ++- client/llb/state.go | 2 +- frontend/dockerfile/builder/build.go | 16 +- solver/errdefs/errdefs.pb.go | 32 +- solver/errdefs/errdefs.proto | 4 +- solver/errdefs/source.go | 4 +- solver/llbsolver/bridge.go | 14 +- solver/pb/ops.pb.go | 645 ++++++++++++++++++--------- solver/pb/ops.proto | 18 +- 11 files changed, 540 insertions(+), 293 deletions(-) diff --git a/client/llb/definition.go b/client/llb/definition.go index 52ad8dd4..279df87f 100644 --- a/client/llb/definition.go +++ b/client/llb/definition.go @@ -52,22 +52,32 @@ func NewDefinitionOp(def *pb.Definition) (*DefinitionOp, error) { srcs := map[digest.Digest]*SourceLocation{} - for _, s := range def.Sources { - var st *State - sdef := s.Info.Definition - if sdef != nil { - op, err := NewDefinitionOp(sdef) - if err != nil { - return nil, err + if def.Source != nil { + sourceMaps := make([]*SourceMap, len(def.Source.Infos)) + for i, info := range def.Source.Infos { + var st *State + sdef := info.Definition + if sdef != nil { + op, err := NewDefinitionOp(sdef) + if err != nil { + return nil, err + } + state := NewState(op) + st = &state } - state := NewState(op) - st = &state + sourceMaps[i] = NewSourceMap(st, info.Filename, info.Data) } - sm := NewSourceMap(st, s.Info.Filename, s.Info.Data) - for dgst, l := range s.Locations { - srcs[digest.Digest(dgst)] = &SourceLocation{ - SourceMap: sm, - Location: l.Locations, + + for dgst, locs := range def.Source.Locations { + for _, loc := range locs.Locations { + if loc.SourceIndex < 0 || int(loc.SourceIndex) >= len(sourceMaps) { + return nil, errors.Errorf("failed to find source map with index %d", loc.SourceIndex) + } + + srcs[digest.Digest(dgst)] = &SourceLocation{ + SourceMap: sourceMaps[int(loc.SourceIndex)], + Ranges: loc.Ranges, + } } } } diff --git a/client/llb/marshal.go b/client/llb/marshal.go index 54469ffb..941a755f 100644 --- a/client/llb/marshal.go +++ b/client/llb/marshal.go @@ -14,7 +14,7 @@ import ( type Definition struct { Def [][]byte Metadata map[digest.Digest]pb.OpMetadata - Sources []*pb.Source + Source *pb.Source } func (def *Definition) ToPB() *pb.Definition { @@ -24,14 +24,14 @@ func (def *Definition) ToPB() *pb.Definition { } return &pb.Definition{ Def: def.Def, - Sources: def.Sources, + Source: def.Source, Metadata: md, } } func (def *Definition) FromPB(x *pb.Definition) { def.Def = x.Def - def.Sources = x.Sources + def.Source = x.Source def.Metadata = make(map[digest.Digest]pb.OpMetadata) for k, v := range x.Metadata { def.Metadata[k] = v diff --git a/client/llb/sourcemap.go b/client/llb/sourcemap.go index 62e44d87..ecff7e7f 100644 --- a/client/llb/sourcemap.go +++ b/client/llb/sourcemap.go @@ -29,20 +29,20 @@ func (s *SourceMap) Location(r []*pb.Range) ConstraintsOpt { } c.Source = &SourceLocation{ SourceMap: s, - Location: r, + Ranges: r, } }) } type SourceLocation struct { SourceMap *SourceMap - Location []*pb.Range + Ranges []*pb.Range } type sourceMapCollector struct { - locations []map[digest.Digest][]*pb.Range - maps []*SourceMap - index map[*SourceMap]int + ranges []map[digest.Digest][]*pb.Range + maps []*SourceMap + index map[*SourceMap]int } func newSourceMapCollector() *sourceMapCollector { @@ -56,13 +56,15 @@ func (smc *sourceMapCollector) Add(dgst digest.Digest, l *SourceLocation) { if !ok { idx = len(smc.maps) smc.maps = append(smc.maps, l.SourceMap) - smc.locations = append(smc.locations, map[digest.Digest][]*pb.Range{}) + smc.ranges = append(smc.ranges, map[digest.Digest][]*pb.Range{}) } - smc.locations[idx][dgst] = l.Location + smc.ranges[idx][dgst] = l.Ranges } -func (smc *sourceMapCollector) Marshal(ctx context.Context, co ...ConstraintsOpt) ([]*pb.Source, error) { - out := make([]*pb.Source, 0, len(smc.maps)) +func (smc *sourceMapCollector) Marshal(ctx context.Context, co ...ConstraintsOpt) (*pb.Source, error) { + s := &pb.Source{ + Locations: make(map[string]*pb.Locations), + } for i, m := range smc.maps { def := m.Definition if def == nil && m.State != nil { @@ -73,22 +75,32 @@ func (smc *sourceMapCollector) Marshal(ctx context.Context, co ...ConstraintsOpt } m.Definition = def } - s := &pb.Source{ - Info: &pb.SourceInfo{ - Data: m.Data, - Filename: m.Filename, - }, - Locations: map[string]*pb.Location{}, + + info := &pb.SourceInfo{ + Data: m.Data, + Filename: m.Filename, } + if def != nil { - s.Info.Definition = def.ToPB() + info.Definition = def.ToPB() } - for dgst, loc := range smc.locations[i] { - s.Locations[dgst.String()] = &pb.Location{ - Locations: loc, + + s.Infos = append(s.Infos, info) + + for dgst, ranges := range smc.ranges[i] { + locs, ok := s.Locations[dgst.String()] + if !ok { + locs = &pb.Locations{} } + + locs.Locations = append(locs.Locations, &pb.Location{ + SourceIndex: int32(i), + Ranges: ranges, + }) + + s.Locations[dgst.String()] = locs } - out = append(out, s) } - return out, nil + + return s, nil } diff --git a/client/llb/state.go b/client/llb/state.go index 73d46b2f..d815b2fb 100644 --- a/client/llb/state.go +++ b/client/llb/state.go @@ -165,7 +165,7 @@ func (s State) Marshal(ctx context.Context, co ...ConstraintsOpt) (*Definition, if err != nil { return nil, err } - def.Sources = sm + def.Source = sm return def, nil } diff --git a/frontend/dockerfile/builder/build.go b/frontend/dockerfile/builder/build.go index 0a0b574e..a91b46dd 100644 --- a/frontend/dockerfile/builder/build.go +++ b/frontend/dockerfile/builder/build.go @@ -658,7 +658,7 @@ func scopeToSubDir(c *llb.State, fileop bool, dir string) *llb.State { return &bc } -func wrapSource(err error, sm *llb.SourceMap, locations []parser.Range) error { +func wrapSource(err error, sm *llb.SourceMap, ranges []parser.Range) error { if sm == nil { return err } @@ -668,17 +668,17 @@ func wrapSource(err error, sm *llb.SourceMap, locations []parser.Range) error { Filename: sm.Filename, Definition: sm.Definition.ToPB(), }, - Locations: make([]*pb.Range, 0, len(locations)), + Ranges: make([]*pb.Range, 0, len(ranges)), } - for _, l := range locations { - s.Locations = append(s.Locations, &pb.Range{ + for _, r := range ranges { + s.Ranges = append(s.Ranges, &pb.Range{ Start: pb.Position{ - Line: int32(l.Start.Line), - Character: int32(l.Start.Character), + Line: int32(r.Start.Line), + Character: int32(r.Start.Character), }, End: pb.Position{ - Line: int32(l.End.Line), - Character: int32(l.End.Character), + Line: int32(r.End.Line), + Character: int32(r.End.Character), }, }) } diff --git a/solver/errdefs/errdefs.pb.go b/solver/errdefs/errdefs.pb.go index 1635d04a..f179e995 100644 --- a/solver/errdefs/errdefs.pb.go +++ b/solver/errdefs/errdefs.pb.go @@ -61,7 +61,7 @@ func (m *Vertex) GetDigest() string { type Source struct { Info *pb.SourceInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` - Locations []*pb.Range `protobuf:"bytes,2,rep,name=locations,proto3" json:"locations,omitempty"` + Ranges []*pb.Range `protobuf:"bytes,2,rep,name=ranges,proto3" json:"ranges,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -98,9 +98,9 @@ func (m *Source) GetInfo() *pb.SourceInfo { return nil } -func (m *Source) GetLocations() []*pb.Range { +func (m *Source) GetRanges() []*pb.Range { if m != nil { - return m.Locations + return m.Ranges } return nil } @@ -113,17 +113,17 @@ func init() { func init() { proto.RegisterFile("errdefs.proto", fileDescriptor_689dc58a5060aff5) } var fileDescriptor_689dc58a5060aff5 = []byte{ - // 179 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xcd, 0xc1, 0x0b, 0x82, 0x30, - 0x14, 0xc7, 0x71, 0xac, 0x58, 0x38, 0xa9, 0xc3, 0x0e, 0x21, 0x9d, 0xc4, 0x4b, 0x1e, 0x62, 0x03, - 0xfb, 0x2b, 0xba, 0x2e, 0xea, 0xee, 0xf4, 0x69, 0x23, 0xdd, 0x1b, 0xdb, 0x8c, 0xfa, 0xef, 0x23, - 0x13, 0x3a, 0x7e, 0xf9, 0xbc, 0xc7, 0x8f, 0x6e, 0xc0, 0xb9, 0x06, 0x5a, 0xcf, 0xad, 0xc3, 0x80, - 0x6c, 0x3d, 0xe7, 0xfe, 0xd8, 0xe9, 0x70, 0x1f, 0x15, 0xaf, 0x71, 0x10, 0x03, 0xaa, 0xb7, 0x50, - 0xa3, 0xee, 0x9b, 0x87, 0x0e, 0xc2, 0x63, 0xff, 0x04, 0x27, 0xac, 0x12, 0x68, 0xe7, 0xb7, 0x3c, - 0xa3, 0xe4, 0x06, 0x2e, 0xc0, 0x8b, 0xed, 0x28, 0x69, 0x74, 0x07, 0x3e, 0xa4, 0x51, 0x16, 0x15, - 0xb1, 0x9c, 0x2b, 0xbf, 0x52, 0x72, 0xc1, 0xd1, 0xd5, 0xc0, 0x72, 0xba, 0xd2, 0xa6, 0xc5, 0xc9, - 0x93, 0x72, 0xcb, 0xad, 0xe2, 0x3f, 0x39, 0x9b, 0x16, 0xe5, 0x64, 0xec, 0x40, 0xe3, 0x1e, 0xeb, - 0x2a, 0x68, 0x34, 0x3e, 0x5d, 0x64, 0xcb, 0x22, 0x29, 0xe3, 0xef, 0xa1, 0xac, 0x4c, 0x07, 0xf2, - 0x6f, 0x8a, 0x4c, 0xfb, 0xa7, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x4a, 0x1b, 0x1a, 0xc7, - 0x00, 0x00, 0x00, + // 177 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x2c, 0xcd, 0xc1, 0x8a, 0x83, 0x30, + 0x10, 0x80, 0x61, 0xdc, 0x5d, 0xb2, 0x18, 0xd9, 0x3d, 0xe4, 0x50, 0xa4, 0x27, 0xeb, 0xc9, 0x43, + 0x49, 0xc0, 0x3e, 0x45, 0x4f, 0x85, 0x14, 0x7a, 0x6f, 0x74, 0xb4, 0xa1, 0xea, 0x84, 0x49, 0x2c, + 0xed, 0xdb, 0x17, 0x6d, 0x8e, 0xff, 0x7c, 0x33, 0x0c, 0xff, 0x03, 0xa2, 0x16, 0x3a, 0x2f, 0x1d, + 0x61, 0x40, 0xf1, 0x1b, 0x73, 0xbb, 0xef, 0x6d, 0xb8, 0xcd, 0x46, 0x36, 0x38, 0xaa, 0x11, 0xcd, + 0x4b, 0x99, 0xd9, 0x0e, 0xed, 0xdd, 0x06, 0xe5, 0x71, 0x78, 0x00, 0x29, 0x67, 0x14, 0xba, 0x78, + 0x56, 0x16, 0x9c, 0x5d, 0x80, 0x02, 0x3c, 0xc5, 0x86, 0xb3, 0xd6, 0xf6, 0xe0, 0x43, 0x9e, 0x14, + 0x49, 0x95, 0xea, 0x58, 0xe5, 0x89, 0xb3, 0x33, 0xce, 0xd4, 0x80, 0x28, 0xf9, 0x8f, 0x9d, 0x3a, + 0x5c, 0x3d, 0xab, 0xff, 0xa5, 0x33, 0xf2, 0x23, 0xc7, 0xa9, 0x43, 0xbd, 0x9a, 0xd8, 0x71, 0x46, + 0xd7, 0xa9, 0x07, 0x9f, 0x7f, 0x15, 0xdf, 0x55, 0x56, 0xa7, 0xcb, 0x96, 0x5e, 0x26, 0x3a, 0x82, + 0x61, 0xeb, 0xe7, 0xc3, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x93, 0xb5, 0x8b, 0x2a, 0xc1, 0x00, 0x00, + 0x00, } diff --git a/solver/errdefs/errdefs.proto b/solver/errdefs/errdefs.proto index 18dff79b..7e808cbb 100644 --- a/solver/errdefs/errdefs.proto +++ b/solver/errdefs/errdefs.proto @@ -10,5 +10,5 @@ message Vertex { message Source { pb.SourceInfo info = 1; - repeated pb.Range locations = 2; -} \ No newline at end of file + repeated pb.Range ranges = 2; +} diff --git a/solver/errdefs/source.go b/solver/errdefs/source.go index 78e1fc38..6c1f3649 100644 --- a/solver/errdefs/source.go +++ b/solver/errdefs/source.go @@ -51,7 +51,7 @@ func (s *Source) Print(w io.Writer) error { } lines := strings.Split(string(si.Data), "\n") - start, end, ok := getStartEndLine(s.Locations) + start, end, ok := getStartEndLine(s.Ranges) if !ok { return nil } @@ -87,7 +87,7 @@ func (s *Source) Print(w io.Writer) error { fmt.Fprintf(w, "%s:%d\n--------------------\n", si.Filename, prepadStart) for i := start; i <= end; i++ { pfx := " " - if containsLine(s.Locations, i) { + if containsLine(s.Ranges, i) { pfx = ">>>" } fmt.Fprintf(w, " %3d | %s %s\n", i, pfx, lines[i-1]) diff --git a/solver/llbsolver/bridge.go b/solver/llbsolver/bridge.go index 3f7348c4..83277544 100644 --- a/solver/llbsolver/bridge.go +++ b/solver/llbsolver/bridge.go @@ -189,13 +189,15 @@ func (rp *resultProxy) wrapError(err error) error { } var ve *errdefs.VertexError if errors.As(err, &ve) { - for _, s := range rp.def.Sources { - loc, ok := s.Locations[string(ve.Digest)] + if rp.def.Source != nil { + locs, ok := rp.def.Source.Locations[string(ve.Digest)] if ok { - return errdefs.WithSource(err, errdefs.Source{ - Info: s.Info, - Locations: loc.Locations, - }) + for _, loc := range locs.Locations { + err = errdefs.WithSource(err, errdefs.Source{ + Info: rp.def.Source.Infos[loc.SourceIndex], + Ranges: loc.Ranges, + }) + } } } } diff --git a/solver/pb/ops.pb.go b/solver/pb/ops.pb.go index b313075a..90e549d8 100644 --- a/solver/pb/ops.pb.go +++ b/solver/pb/ops.pb.go @@ -1056,8 +1056,8 @@ func (m *OpMetadata) GetCaps() map[github_com_moby_buildkit_util_apicaps.CapID]b // Source is a source mapping description for a file type Source struct { - Locations map[string]*Location `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Info *SourceInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + Locations map[string]*Locations `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Infos []*SourceInfo `protobuf:"bytes,2,rep,name=infos,proto3" json:"infos,omitempty"` } func (m *Source) Reset() { *m = Source{} } @@ -1089,16 +1089,57 @@ func (m *Source) XXX_DiscardUnknown() { var xxx_messageInfo_Source proto.InternalMessageInfo -func (m *Source) GetLocations() map[string]*Location { +func (m *Source) GetLocations() map[string]*Locations { if m != nil { return m.Locations } return nil } -func (m *Source) GetInfo() *SourceInfo { +func (m *Source) GetInfos() []*SourceInfo { if m != nil { - return m.Info + return m.Infos + } + return nil +} + +// Locations is a list of ranges with a index to its source map. +type Locations struct { + Locations []*Location `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty"` +} + +func (m *Locations) Reset() { *m = Locations{} } +func (m *Locations) String() string { return proto.CompactTextString(m) } +func (*Locations) ProtoMessage() {} +func (*Locations) Descriptor() ([]byte, []int) { + return fileDescriptor_8de16154b2733812, []int{14} +} +func (m *Locations) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Locations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Locations) XXX_Merge(src proto.Message) { + xxx_messageInfo_Locations.Merge(m, src) +} +func (m *Locations) XXX_Size() int { + return m.Size() +} +func (m *Locations) XXX_DiscardUnknown() { + xxx_messageInfo_Locations.DiscardUnknown(m) +} + +var xxx_messageInfo_Locations proto.InternalMessageInfo + +func (m *Locations) GetLocations() []*Location { + if m != nil { + return m.Locations } return nil } @@ -1114,7 +1155,7 @@ func (m *SourceInfo) Reset() { *m = SourceInfo{} } func (m *SourceInfo) String() string { return proto.CompactTextString(m) } func (*SourceInfo) ProtoMessage() {} func (*SourceInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{14} + return fileDescriptor_8de16154b2733812, []int{15} } func (m *SourceInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1162,14 +1203,15 @@ func (m *SourceInfo) GetDefinition() *Definition { // Location defines list of areas in to source file type Location struct { - Locations []*Range `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty"` + SourceIndex int32 `protobuf:"varint,1,opt,name=sourceIndex,proto3" json:"sourceIndex,omitempty"` + Ranges []*Range `protobuf:"bytes,2,rep,name=ranges,proto3" json:"ranges,omitempty"` } func (m *Location) Reset() { *m = Location{} } func (m *Location) String() string { return proto.CompactTextString(m) } func (*Location) ProtoMessage() {} func (*Location) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{15} + return fileDescriptor_8de16154b2733812, []int{16} } func (m *Location) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1194,9 +1236,16 @@ func (m *Location) XXX_DiscardUnknown() { var xxx_messageInfo_Location proto.InternalMessageInfo -func (m *Location) GetLocations() []*Range { +func (m *Location) GetSourceIndex() int32 { if m != nil { - return m.Locations + return m.SourceIndex + } + return 0 +} + +func (m *Location) GetRanges() []*Range { + if m != nil { + return m.Ranges } return nil } @@ -1211,7 +1260,7 @@ func (m *Range) Reset() { *m = Range{} } func (m *Range) String() string { return proto.CompactTextString(m) } func (*Range) ProtoMessage() {} func (*Range) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{16} + return fileDescriptor_8de16154b2733812, []int{17} } func (m *Range) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1260,7 +1309,7 @@ func (m *Position) Reset() { *m = Position{} } func (m *Position) String() string { return proto.CompactTextString(m) } func (*Position) ProtoMessage() {} func (*Position) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{17} + return fileDescriptor_8de16154b2733812, []int{18} } func (m *Position) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1307,7 +1356,7 @@ func (m *ExportCache) Reset() { *m = ExportCache{} } func (m *ExportCache) String() string { return proto.CompactTextString(m) } func (*ExportCache) ProtoMessage() {} func (*ExportCache) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{18} + return fileDescriptor_8de16154b2733812, []int{19} } func (m *ExportCache) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1350,7 +1399,7 @@ func (m *ProxyEnv) Reset() { *m = ProxyEnv{} } func (m *ProxyEnv) String() string { return proto.CompactTextString(m) } func (*ProxyEnv) ProtoMessage() {} func (*ProxyEnv) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{19} + return fileDescriptor_8de16154b2733812, []int{20} } func (m *ProxyEnv) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1412,7 +1461,7 @@ func (m *WorkerConstraints) Reset() { *m = WorkerConstraints{} } func (m *WorkerConstraints) String() string { return proto.CompactTextString(m) } func (*WorkerConstraints) ProtoMessage() {} func (*WorkerConstraints) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{20} + return fileDescriptor_8de16154b2733812, []int{21} } func (m *WorkerConstraints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1451,15 +1500,15 @@ type Definition struct { // metadata contains metadata for the each of the Op messages. // A key must be an LLB op digest string. Currently, empty string is not expected as a key, but it may change in the future. Metadata map[github_com_opencontainers_go_digest.Digest]OpMetadata `protobuf:"bytes,2,rep,name=metadata,proto3,castkey=github.com/opencontainers/go-digest.Digest" json:"metadata" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Sources contains the source mapping information for the vertexes in the definition - Sources []*Source `protobuf:"bytes,3,rep,name=Sources,proto3" json:"Sources,omitempty"` + // Source contains the source mapping information for the vertexes in the definition + Source *Source `protobuf:"bytes,3,opt,name=Source,proto3" json:"Source,omitempty"` } func (m *Definition) Reset() { *m = Definition{} } func (m *Definition) String() string { return proto.CompactTextString(m) } func (*Definition) ProtoMessage() {} func (*Definition) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{21} + return fileDescriptor_8de16154b2733812, []int{22} } func (m *Definition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1498,9 +1547,9 @@ func (m *Definition) GetMetadata() map[github_com_opencontainers_go_digest.Diges return nil } -func (m *Definition) GetSources() []*Source { +func (m *Definition) GetSource() *Source { if m != nil { - return m.Sources + return m.Source } return nil } @@ -1514,7 +1563,7 @@ func (m *HostIP) Reset() { *m = HostIP{} } func (m *HostIP) String() string { return proto.CompactTextString(m) } func (*HostIP) ProtoMessage() {} func (*HostIP) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{22} + return fileDescriptor_8de16154b2733812, []int{23} } func (m *HostIP) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1561,7 +1610,7 @@ func (m *FileOp) Reset() { *m = FileOp{} } func (m *FileOp) String() string { return proto.CompactTextString(m) } func (*FileOp) ProtoMessage() {} func (*FileOp) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{23} + return fileDescriptor_8de16154b2733812, []int{24} } func (m *FileOp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1609,7 +1658,7 @@ func (m *FileAction) Reset() { *m = FileAction{} } func (m *FileAction) String() string { return proto.CompactTextString(m) } func (*FileAction) ProtoMessage() {} func (*FileAction) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{24} + return fileDescriptor_8de16154b2733812, []int{25} } func (m *FileAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1732,7 +1781,7 @@ func (m *FileActionCopy) Reset() { *m = FileActionCopy{} } func (m *FileActionCopy) String() string { return proto.CompactTextString(m) } func (*FileActionCopy) ProtoMessage() {} func (*FileActionCopy) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{25} + return fileDescriptor_8de16154b2733812, []int{26} } func (m *FileActionCopy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1851,7 +1900,7 @@ func (m *FileActionMkFile) Reset() { *m = FileActionMkFile{} } func (m *FileActionMkFile) String() string { return proto.CompactTextString(m) } func (*FileActionMkFile) ProtoMessage() {} func (*FileActionMkFile) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{26} + return fileDescriptor_8de16154b2733812, []int{27} } func (m *FileActionMkFile) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1928,7 +1977,7 @@ func (m *FileActionMkDir) Reset() { *m = FileActionMkDir{} } func (m *FileActionMkDir) String() string { return proto.CompactTextString(m) } func (*FileActionMkDir) ProtoMessage() {} func (*FileActionMkDir) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{27} + return fileDescriptor_8de16154b2733812, []int{28} } func (m *FileActionMkDir) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2001,7 +2050,7 @@ func (m *FileActionRm) Reset() { *m = FileActionRm{} } func (m *FileActionRm) String() string { return proto.CompactTextString(m) } func (*FileActionRm) ProtoMessage() {} func (*FileActionRm) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{28} + return fileDescriptor_8de16154b2733812, []int{29} } func (m *FileActionRm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2056,7 +2105,7 @@ func (m *ChownOpt) Reset() { *m = ChownOpt{} } func (m *ChownOpt) String() string { return proto.CompactTextString(m) } func (*ChownOpt) ProtoMessage() {} func (*ChownOpt) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{29} + return fileDescriptor_8de16154b2733812, []int{30} } func (m *ChownOpt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2106,7 +2155,7 @@ func (m *UserOpt) Reset() { *m = UserOpt{} } func (m *UserOpt) String() string { return proto.CompactTextString(m) } func (*UserOpt) ProtoMessage() {} func (*UserOpt) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{30} + return fileDescriptor_8de16154b2733812, []int{31} } func (m *UserOpt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2185,7 +2234,7 @@ func (m *NamedUserOpt) Reset() { *m = NamedUserOpt{} } func (m *NamedUserOpt) String() string { return proto.CompactTextString(m) } func (*NamedUserOpt) ProtoMessage() {} func (*NamedUserOpt) Descriptor() ([]byte, []int) { - return fileDescriptor_8de16154b2733812, []int{31} + return fileDescriptor_8de16154b2733812, []int{32} } func (m *NamedUserOpt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2241,7 +2290,8 @@ func init() { proto.RegisterMapType((map[github_com_moby_buildkit_util_apicaps.CapID]bool)(nil), "pb.OpMetadata.CapsEntry") proto.RegisterMapType((map[string]string)(nil), "pb.OpMetadata.DescriptionEntry") proto.RegisterType((*Source)(nil), "pb.Source") - proto.RegisterMapType((map[string]*Location)(nil), "pb.Source.LocationsEntry") + proto.RegisterMapType((map[string]*Locations)(nil), "pb.Source.LocationsEntry") + proto.RegisterType((*Locations)(nil), "pb.Locations") proto.RegisterType((*SourceInfo)(nil), "pb.SourceInfo") proto.RegisterType((*Location)(nil), "pb.Location") proto.RegisterType((*Range)(nil), "pb.Range") @@ -2266,143 +2316,144 @@ func init() { func init() { proto.RegisterFile("ops.proto", fileDescriptor_8de16154b2733812) } var fileDescriptor_8de16154b2733812 = []byte{ - // 2165 bytes of a gzipped FileDescriptorProto + // 2189 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4b, 0x6f, 0x1b, 0xc9, - 0x11, 0x16, 0xdf, 0x64, 0x51, 0x92, 0x99, 0x5e, 0xaf, 0xc3, 0x55, 0x1c, 0x49, 0x3b, 0xeb, 0x6c, - 0x64, 0xd9, 0xa6, 0x00, 0x19, 0x58, 0x2f, 0x16, 0x41, 0x10, 0xf1, 0x61, 0x88, 0x5e, 0x5b, 0x14, - 0x9a, 0x7e, 0xe4, 0x66, 0x8c, 0x86, 0x4d, 0x6a, 0x20, 0x72, 0x7a, 0xd0, 0xd3, 0xb4, 0xc5, 0x4b, - 0x0e, 0xfe, 0x05, 0x0b, 0x04, 0xc8, 0x2d, 0x01, 0x72, 0x09, 0x90, 0x63, 0x7e, 0x40, 0xee, 0x7b, - 0x5c, 0x04, 0x39, 0x2c, 0x72, 0xd8, 0x04, 0xf6, 0x0f, 0x49, 0x50, 0xd5, 0x3d, 0x9c, 0x21, 0x25, - 0xc3, 0x36, 0x12, 0xe4, 0xc4, 0xea, 0xaa, 0xaf, 0x6b, 0xaa, 0xeb, 0xd5, 0xd5, 0x84, 0x8a, 0x0c, - 0xa3, 0x46, 0xa8, 0xa4, 0x96, 0x2c, 0x1b, 0x9e, 0x6c, 0xdc, 0x19, 0xf9, 0xfa, 0x74, 0x7a, 0xd2, - 0xf0, 0xe4, 0x64, 0x6f, 0x24, 0x47, 0x72, 0x8f, 0x44, 0x27, 0xd3, 0x21, 0xad, 0x68, 0x41, 0x94,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10, 0x3c, 0x96, 0xb1, 0xdb, - 0x50, 0x8e, 0x84, 0x37, 0x55, 0xbe, 0x9e, 0x91, 0xbf, 0xd6, 0xf7, 0x6b, 0x94, 0x65, 0x96, 0x47, - 0xe0, 0x39, 0xc2, 0xf9, 0x73, 0x06, 0xf2, 0x68, 0x06, 0x63, 0x90, 0x77, 0xd5, 0xc8, 0x64, 0x77, - 0x85, 0x13, 0xcd, 0x6a, 0x90, 0x13, 0xc1, 0x0b, 0xb2, 0xa8, 0xc2, 0x91, 0x44, 0x8e, 0xf7, 0x72, - 0x60, 0x63, 0x84, 0x24, 0xee, 0x9b, 0x46, 0x42, 0xd9, 0xd0, 0x10, 0xcd, 0x6e, 0x42, 0x25, 0x54, - 0xf2, 0x7c, 0xf6, 0x1c, 0x77, 0x17, 0x52, 0x89, 0x87, 0xcc, 0x4e, 0xf0, 0x82, 0x97, 0x43, 0x4b, - 0xb1, 0x5d, 0x00, 0x71, 0xae, 0x95, 0x7b, 0x28, 0x23, 0x1d, 0xd5, 0x8b, 0x74, 0x76, 0xca, 0x77, - 0x64, 0x74, 0x8f, 0x79, 0x4a, 0xea, 0xfc, 0x2d, 0x0b, 0x05, 0x72, 0x09, 0xdb, 0xc1, 0x08, 0x84, - 0x53, 0x13, 0xcc, 0x5c, 0x93, 0xd9, 0x08, 0x00, 0xc5, 0x7a, 0x1e, 0x00, 0x8c, 0xfb, 0x06, 0x7a, - 0x63, 0x2c, 0x3c, 0x2d, 0x95, 0x4d, 0xb7, 0xf9, 0x1a, 0x4d, 0x1f, 0x60, 0x46, 0x98, 0xd3, 0x10, - 0xcd, 0x6e, 0x41, 0x51, 0x52, 0x18, 0xe9, 0x40, 0x6f, 0x09, 0xae, 0x85, 0xa0, 0x72, 0x25, 0xdc, - 0x81, 0x0c, 0xc6, 0x33, 0x3a, 0x66, 0x99, 0xcf, 0xd7, 0xec, 0x16, 0x54, 0x28, 0x6e, 0x8f, 0x67, - 0xa1, 0xa8, 0x17, 0x29, 0x0e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, 0x68, 0xcc, 0xe0, 0x6e, 0x30, 0x12, 0x29, 0x97, - 0x38, 0xcf, 0xa0, 0x40, 0x3c, 0x2c, 0x87, 0x48, 0xbb, 0x4a, 0xdb, 0xa1, 0xc5, 0x5c, 0xe2, 0x32, - 0x22, 0xd5, 0xcd, 0x3c, 0x26, 0x0c, 0x37, 0x00, 0x76, 0x03, 0x47, 0x85, 0x41, 0xfa, 0xec, 0x4b, - 0x38, 0x14, 0x3b, 0xbf, 0x80, 0x72, 0xcc, 0xc6, 0xd3, 0x3d, 0xf4, 0x03, 0x73, 0xea, 0x02, 0x27, - 0x1a, 0x87, 0xbd, 0xd6, 0xa9, 0xab, 0x5c, 0x4f, 0x0b, 0x73, 0x5d, 0x17, 0x78, 0xc2, 0x70, 0x3e, - 0x83, 0x6a, 0x2a, 0xcb, 0x31, 0x2d, 0x9e, 0x92, 0xc3, 0x4d, 0xad, 0x99, 0x85, 0xf3, 0x0a, 0x47, - 0xd1, 0x78, 0xba, 0xf8, 0x29, 0xc0, 0xa9, 0xd6, 0xe1, 0x73, 0x1a, 0x37, 0xac, 0x7f, 0x2b, 0xc8, - 0x21, 0x04, 0xdb, 0x82, 0x2a, 0x2e, 0x22, 0x2b, 0x37, 0x79, 0x49, 0x3b, 0x22, 0x03, 0xf8, 0x09, - 0x54, 0x86, 0xf3, 0xed, 0x39, 0x1b, 0x9e, 0x78, 0xf7, 0x27, 0x50, 0x0e, 0xa4, 0x95, 0x99, 0xe9, - 0xa7, 0x14, 0x48, 0x12, 0x39, 0xb7, 0xe0, 0x47, 0x17, 0xe6, 0x66, 0x76, 0x0d, 0x8a, 0x43, 0x7f, - 0xac, 0xa9, 0x39, 0xe3, 0x40, 0x65, 0x57, 0xce, 0xbf, 0x33, 0x00, 0x49, 0xf4, 0x30, 0xb3, 0xb0, - 0xcb, 0x22, 0x66, 0xd5, 0x74, 0xd5, 0x31, 0x94, 0x27, 0xb6, 0x5e, 0x6d, 0xd7, 0xb8, 0xbe, 0x18, -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, 0x6b, 0x4b, 0xde, 0x9c, 0x1c, 0xae, 0xf0, 0xac, 0x9a, 0x34, - 0xcb, 0x50, 0x34, 0x7e, 0x75, 0xfe, 0x94, 0x83, 0xf5, 0x45, 0x2b, 0x31, 0x0f, 0x22, 0xe5, 0xc5, - 0x79, 0x10, 0x29, 0x6f, 0x3e, 0x66, 0x67, 0x53, 0x63, 0xb6, 0x03, 0x05, 0xf9, 0x32, 0x10, 0x2a, - 0xfd, 0x0e, 0x6e, 0x9d, 0xca, 0x97, 0x01, 0x0e, 0x94, 0x46, 0xb4, 0x30, 0x9f, 0x15, 0xec, 0x7c, - 0x76, 0x03, 0xd6, 0x86, 0x72, 0x3c, 0x96, 0x2f, 0xfb, 0xb3, 0xc9, 0xd8, 0x0f, 0xce, 0xec, 0x90, - 0xb6, 0xc8, 0x64, 0x3b, 0x70, 0x65, 0xe0, 0x2b, 0x34, 0xa7, 0x25, 0x03, 0x2d, 0x02, 0x7a, 0x59, - 0x20, 0x6e, 0x99, 0xcd, 0x1e, 0xc0, 0xb6, 0xab, 0xb5, 0x98, 0x84, 0xfa, 0x49, 0x10, 0xba, 0xde, - 0x59, 0x5b, 0x7a, 0x54, 0xb5, 0x93, 0xd0, 0xd5, 0xfe, 0x89, 0x3f, 0xc6, 0x47, 0x54, 0x89, 0xb6, - 0xbe, 0x13, 0xc7, 0x3e, 0x87, 0x75, 0x4f, 0x09, 0x57, 0x8b, 0xb6, 0x88, 0xf4, 0xb1, 0xab, 0x4f, - 0xeb, 0x65, 0xda, 0xb9, 0xc4, 0xc5, 0x33, 0xb8, 0x68, 0xed, 0x33, 0x7f, 0x3c, 0xf0, 0x5c, 0x35, - 0xa8, 0x57, 0xcc, 0x19, 0x16, 0x98, 0xac, 0x01, 0x8c, 0x18, 0x9d, 0x49, 0xa8, 0x67, 0x73, 0x28, - 0x10, 0xf4, 0x12, 0x09, 0xb6, 0x4e, 0xed, 0x4f, 0x44, 0xa4, 0xdd, 0x49, 0x48, 0xef, 0xf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0x71, 0x1c, 0x22, 0xe2, 0xbd, + 0x18, 0xd9, 0x18, 0xe1, 0x10, 0xd7, 0xcd, 0x23, 0xa1, 0x6c, 0x68, 0x68, 0xcc, 0x6e, 0x42, 0x2d, + 0x54, 0xf2, 0x7c, 0xf1, 0x0c, 0x57, 0x97, 0x32, 0x89, 0x87, 0x60, 0x2f, 0x78, 0xce, 0xab, 0xa1, + 0x1d, 0xb1, 0x5d, 0x00, 0x71, 0xae, 0x95, 0x7b, 0x28, 0x23, 0x1d, 0x35, 0xcb, 0x74, 0x76, 0xca, + 0x77, 0x04, 0xfa, 0xc7, 0x3c, 0x23, 0x75, 0xfe, 0x9a, 0x87, 0x12, 0xb9, 0x84, 0xed, 0x60, 0x04, + 0xc2, 0xb9, 0x09, 0x66, 0xa1, 0xcd, 0x6c, 0x04, 0x80, 0x62, 0x9d, 0x04, 0x00, 0xe3, 0xbe, 0x81, + 0xde, 0x98, 0x0a, 0x4f, 0x4b, 0x65, 0xd3, 0x2d, 0x99, 0xa3, 0xe9, 0x23, 0xcc, 0x08, 0x73, 0x1a, + 0x1a, 0xb3, 0x5b, 0x50, 0x96, 0x14, 0x46, 0x3a, 0xd0, 0x5b, 0x82, 0x6b, 0x29, 0xa8, 0x5c, 0x09, + 0x77, 0x24, 0x83, 0xe9, 0x82, 0x8e, 0x59, 0xe5, 0xc9, 0x9c, 0xdd, 0x82, 0x1a, 0xc5, 0xed, 0xd1, + 0x22, 0x14, 0xcd, 0x32, 0xc5, 0x61, 0x2d, 0x89, 0x29, 0x82, 0x3c, 0x95, 0xe3, 0x45, 0xf5, 0x5c, + 0xef, 0x54, 0x0c, 0x42, 0xdd, 0xbc, 0x9a, 0xfa, 0xab, 0x63, 0x31, 0x9e, 0x48, 0x51, 0x6d, 0x24, + 0x3c, 0x25, 0x34, 0x52, 0x3f, 0x26, 0xea, 0x9a, 0x0d, 0xaf, 0x01, 0x79, 0x2a, 0x67, 0x0e, 0x94, + 0x87, 0xc3, 0x43, 0x64, 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op) Marshal() (dAtA []byte, err error) { @@ -3336,17 +3387,19 @@ func (m *Source) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Info != nil { - { - size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Infos) > 0 { + for iNdEx := len(m.Infos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Infos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOps(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintOps(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - i-- - dAtA[i] = 0x12 } if len(m.Locations) > 0 { keysForLocations := make([]string, 0, len(m.Locations)) @@ -3382,6 +3435,43 @@ func (m *Source) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Locations) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Locations) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Locations) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Locations) > 0 { + for iNdEx := len(m.Locations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Locations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOps(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *SourceInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3451,10 +3541,10 @@ func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Locations) > 0 { - for iNdEx := len(m.Locations) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Ranges) > 0 { + for iNdEx := len(m.Ranges) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Locations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Ranges[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3462,9 +3552,14 @@ func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintOps(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 } } + if m.SourceIndex != 0 { + i = encodeVarintOps(dAtA, i, uint64(m.SourceIndex)) + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } @@ -3680,19 +3775,17 @@ func (m *Definition) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Sources) > 0 { - for iNdEx := len(m.Sources) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Sources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOps(dAtA, i, uint64(size)) + if m.Source != nil { + { + size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintOps(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a } if len(m.Metadata) > 0 { keysForMetadata := make([]string, 0, len(m.Metadata)) @@ -4801,9 +4894,26 @@ func (m *Source) Size() (n int) { n += mapEntrySize + 1 + sovOps(uint64(mapEntrySize)) } } - if m.Info != nil { - l = m.Info.Size() - n += 1 + l + sovOps(uint64(l)) + if len(m.Infos) > 0 { + for _, e := range m.Infos { + l = e.Size() + n += 1 + l + sovOps(uint64(l)) + } + } + return n +} + +func (m *Locations) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Locations) > 0 { + for _, e := range m.Locations { + l = e.Size() + n += 1 + l + sovOps(uint64(l)) + } } return n } @@ -4835,8 +4945,11 @@ func (m *Location) Size() (n int) { } var l int _ = l - if len(m.Locations) > 0 { - for _, e := range m.Locations { + if m.SourceIndex != 0 { + n += 1 + sovOps(uint64(m.SourceIndex)) + } + if len(m.Ranges) > 0 { + for _, e := range m.Ranges { l = e.Size() n += 1 + l + sovOps(uint64(l)) } @@ -4945,11 +5058,9 @@ func (m *Definition) Size() (n int) { n += mapEntrySize + 1 + sovOps(uint64(mapEntrySize)) } } - if len(m.Sources) > 0 { - for _, e := range m.Sources { - l = e.Size() - n += 1 + l + sovOps(uint64(l)) - } + if m.Source != nil { + l = m.Source.Size() + n += 1 + l + sovOps(uint64(l)) } return n } @@ -8060,10 +8171,10 @@ func (m *Source) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Locations == nil { - m.Locations = make(map[string]*Location) + m.Locations = make(map[string]*Locations) } var mapkey string - var mapvalue *Location + var mapvalue *Locations for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -8137,7 +8248,7 @@ func (m *Source) Unmarshal(dAtA []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue = &Location{} + mapvalue = &Locations{} if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { return err } @@ -8161,7 +8272,7 @@ func (m *Source) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Infos", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8188,10 +8299,95 @@ func (m *Source) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Info == nil { - m.Info = &SourceInfo{} + m.Infos = append(m.Infos, &SourceInfo{}) + if err := m.Infos[len(m.Infos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOps(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOps + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthOps + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Locations) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Locations: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Locations: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Locations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOps + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOps + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Locations = append(m.Locations, &Location{}) + if err := m.Locations[len(m.Locations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8404,8 +8600,27 @@ func (m *Location) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceIndex", wireType) + } + m.SourceIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOps + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SourceIndex |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Locations", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8432,8 +8647,8 @@ func (m *Location) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Locations = append(m.Locations, &Range{}) - if err := m.Locations[len(m.Locations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Ranges = append(m.Ranges, &Range{}) + if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9202,7 +9417,7 @@ func (m *Definition) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9229,8 +9444,10 @@ func (m *Definition) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Sources = append(m.Sources, &Source{}) - if err := m.Sources[len(m.Sources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Source == nil { + m.Source = &Source{} + } + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/solver/pb/ops.proto b/solver/pb/ops.proto index ebd48e0f..087c3461 100644 --- a/solver/pb/ops.proto +++ b/solver/pb/ops.proto @@ -179,8 +179,13 @@ message OpMetadata { // Source is a source mapping description for a file message Source { - map locations = 1; - SourceInfo info = 2; + map locations = 1; + repeated SourceInfo infos = 2; +} + +// Locations is a list of ranges with a index to its source map. +message Locations { + repeated Location locations = 1; } // Source info contains the shared metadata of a source mapping @@ -192,7 +197,8 @@ message SourceInfo { // Location defines list of areas in to source file message Location { - repeated Range locations = 1; + int32 sourceIndex = 1; + repeated Range ranges = 2; } // Range is an area in the source file @@ -230,8 +236,8 @@ message Definition { // metadata contains metadata for the each of the Op messages. // A key must be an LLB op digest string. Currently, empty string is not expected as a key, but it may change in the future. map metadata = 2 [(gogoproto.castkey) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; - // Sources contains the source mapping information for the vertexes in the definition - repeated Source Sources = 3; + // Source contains the source mapping information for the vertexes in the definition + Source Source = 3; } message HostIP { @@ -334,4 +340,4 @@ message UserOpt { message NamedUserOpt { string name = 1; int64 input = 2 [(gogoproto.customtype) = "InputIndex", (gogoproto.nullable) = false]; -} \ No newline at end of file +} From 59fa9fc9a0957aca156a985107277c18fa5c2ae7 Mon Sep 17 00:00:00 2001 From: Edgar Lee Date: Wed, 20 May 2020 16:44:57 -0700 Subject: [PATCH 09/11] Allow multiple source locations to be added as a constraint Signed-off-by: Edgar Lee --- client/client_test.go | 39 +++++++++++++++++++++--------- client/llb/async.go | 2 +- client/llb/definition.go | 10 ++++---- client/llb/exec.go | 4 +-- client/llb/fileop.go | 4 +-- client/llb/llbbuild/llbbuild.go | 4 +-- client/llb/marshal.go | 10 ++++---- client/llb/source.go | 4 +-- client/llb/sourcemap.go | 20 ++++++++------- client/llb/state.go | 10 +++----- frontend/dockerfile/errors_test.go | 2 +- 11 files changed, 63 insertions(+), 46 deletions(-) diff --git a/client/client_test.go b/client/client_test.go index 34930288..7fa74105 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -2690,9 +2690,14 @@ func testSourceMap(t *testing.T, sb integration.Sandbox) { require.NoError(t, err) defer c.Close() - sm := llb.NewSourceMap(nil, "foo", []byte("data")) + sm1 := llb.NewSourceMap(nil, "foo", []byte("data1")) + sm2 := llb.NewSourceMap(nil, "bar", []byte("data2")) - st := llb.Scratch().Run(llb.Shlex("not-exist"), sm.Location([]*pb.Range{{Start: pb.Position{Line: 7}}})) + st := llb.Scratch().Run( + llb.Shlex("not-exist"), + sm1.Location([]*pb.Range{{Start: pb.Position{Line: 7}}}), + sm2.Location([]*pb.Range{{Start: pb.Position{Line: 8}}}), + ) def, err := st.Marshal(context.TODO()) require.NoError(t, err) @@ -2701,15 +2706,27 @@ func testSourceMap(t *testing.T, sb integration.Sandbox) { require.Error(t, err) srcs := errdefs.Sources(err) - require.Equal(t, 1, len(srcs)) + require.Equal(t, 2, len(srcs)) - require.Equal(t, "foo", srcs[0].Info.Filename) - require.Equal(t, []byte("data"), srcs[0].Info.Data) + // Source errors are wrapped in the order provided as llb.ConstraintOpts, so + // when they are unwrapped, the first unwrapped error is the last location + // provided. + require.Equal(t, "bar", srcs[0].Info.Filename) + require.Equal(t, []byte("data2"), srcs[0].Info.Data) require.Nil(t, srcs[0].Info.Definition) - require.Equal(t, 1, len(srcs[0].Locations)) - require.Equal(t, int32(7), srcs[0].Locations[0].Start.Line) - require.Equal(t, int32(0), srcs[0].Locations[0].Start.Character) + require.Equal(t, 1, len(srcs[0].Ranges)) + require.Equal(t, int32(8), srcs[0].Ranges[0].Start.Line) + require.Equal(t, int32(0), srcs[0].Ranges[0].Start.Character) + + require.Equal(t, "foo", srcs[1].Info.Filename) + require.Equal(t, []byte("data1"), srcs[1].Info.Data) + require.Nil(t, srcs[1].Info.Definition) + + require.Equal(t, 1, len(srcs[1].Ranges)) + require.Equal(t, int32(7), srcs[1].Ranges[0].Start.Line) + require.Equal(t, int32(0), srcs[1].Ranges[0].Start.Character) + } func testSourceMapFromRef(t *testing.T, sb integration.Sandbox) { @@ -2774,9 +2791,9 @@ func testSourceMapFromRef(t *testing.T, sb integration.Sandbox) { require.Equal(t, []byte("bardata"), srcs[0].Info.Data) require.NotNil(t, srcs[0].Info.Definition) - require.Equal(t, 1, len(srcs[0].Locations)) - require.Equal(t, int32(3), srcs[0].Locations[0].Start.Line) - require.Equal(t, int32(1), srcs[0].Locations[0].Start.Character) + require.Equal(t, 1, len(srcs[0].Ranges)) + require.Equal(t, int32(3), srcs[0].Ranges[0].Start.Line) + require.Equal(t, int32(1), srcs[0].Ranges[0].Start.Character) } func testProxyEnv(t *testing.T, sb integration.Sandbox) { diff --git a/client/llb/async.go b/client/llb/async.go index 20781850..48216e98 100644 --- a/client/llb/async.go +++ b/client/llb/async.go @@ -85,7 +85,7 @@ type errVertex struct { func (v *errVertex) Validate(context.Context) error { return v.err } -func (v *errVertex) Marshal(context.Context, *Constraints) (digest.Digest, []byte, *pb.OpMetadata, *SourceLocation, error) { +func (v *errVertex) Marshal(context.Context, *Constraints) (digest.Digest, []byte, *pb.OpMetadata, []*SourceLocation, error) { return "", nil, nil, nil, v.err } func (v *errVertex) Output() Output { diff --git a/client/llb/definition.go b/client/llb/definition.go index 279df87f..fe9f7c17 100644 --- a/client/llb/definition.go +++ b/client/llb/definition.go @@ -20,7 +20,7 @@ type DefinitionOp struct { ops map[digest.Digest]*pb.Op defs map[digest.Digest][]byte metas map[digest.Digest]pb.OpMetadata - sources map[digest.Digest]*SourceLocation + sources map[digest.Digest][]*SourceLocation platforms map[digest.Digest]*specs.Platform dgst digest.Digest index pb.OutputIndex @@ -50,7 +50,7 @@ func NewDefinitionOp(def *pb.Definition) (*DefinitionOp, error) { platforms[dgst] = platform } - srcs := map[digest.Digest]*SourceLocation{} + srcs := map[digest.Digest][]*SourceLocation{} if def.Source != nil { sourceMaps := make([]*SourceMap, len(def.Source.Infos)) @@ -74,10 +74,10 @@ func NewDefinitionOp(def *pb.Definition) (*DefinitionOp, error) { return nil, errors.Errorf("failed to find source map with index %d", loc.SourceIndex) } - srcs[digest.Digest(dgst)] = &SourceLocation{ + srcs[digest.Digest(dgst)] = append(srcs[digest.Digest(dgst)], &SourceLocation{ SourceMap: sourceMaps[int(loc.SourceIndex)], Ranges: loc.Ranges, - } + }) } } } @@ -144,7 +144,7 @@ func (d *DefinitionOp) Validate(context.Context) error { return nil } -func (d *DefinitionOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, *SourceLocation, error) { +func (d *DefinitionOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, []*SourceLocation, error) { if d.dgst == "" { return "", nil, nil, nil, errors.Errorf("cannot marshal empty definition op") } diff --git a/client/llb/exec.go b/client/llb/exec.go index 5d5d01e1..0f32e5e3 100644 --- a/client/llb/exec.go +++ b/client/llb/exec.go @@ -124,7 +124,7 @@ func (e *ExecOp) Validate(ctx context.Context) error { return nil } -func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, *SourceLocation, error) { +func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, []*SourceLocation, error) { if e.Cached(c) { return e.Load() } @@ -358,7 +358,7 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] if err != nil { return "", nil, nil, nil, err } - e.Store(dt, md, e.constraints.Source, c) + e.Store(dt, md, e.constraints.SourceLocations, c) return e.Load() } diff --git a/client/llb/fileop.go b/client/llb/fileop.go index 865756ce..db5ed00d 100644 --- a/client/llb/fileop.go +++ b/client/llb/fileop.go @@ -649,7 +649,7 @@ func (ms *marshalState) add(fa *FileAction, c *Constraints) (*fileActionState, e return st, nil } -func (f *FileOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, *SourceLocation, error) { +func (f *FileOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, []*SourceLocation, error) { if f.Cached(c) { return f.Load() } @@ -704,7 +704,7 @@ func (f *FileOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, [] if err != nil { return "", nil, nil, nil, err } - f.Store(dt, md, f.constraints.Source, c) + f.Store(dt, md, f.constraints.SourceLocations, c) return f.Load() } diff --git a/client/llb/llbbuild/llbbuild.go b/client/llb/llbbuild/llbbuild.go index 162985e6..4b99e799 100644 --- a/client/llb/llbbuild/llbbuild.go +++ b/client/llb/llbbuild/llbbuild.go @@ -48,7 +48,7 @@ func (b *build) Validate(context.Context) error { return nil } -func (b *build) Marshal(ctx context.Context, c *llb.Constraints) (digest.Digest, []byte, *pb.OpMetadata, *llb.SourceLocation, error) { +func (b *build) Marshal(ctx context.Context, c *llb.Constraints) (digest.Digest, []byte, *pb.OpMetadata, []*llb.SourceLocation, error) { if b.Cached(c) { return b.Load() } @@ -85,7 +85,7 @@ func (b *build) Marshal(ctx context.Context, c *llb.Constraints) (digest.Digest, if err != nil { return "", nil, nil, nil, err } - b.Store(dt, md, b.constraints.Source, c) + b.Store(dt, md, b.constraints.SourceLocations, c) return b.Load() } diff --git a/client/llb/marshal.go b/client/llb/marshal.go index 941a755f..282b592b 100644 --- a/client/llb/marshal.go +++ b/client/llb/marshal.go @@ -98,20 +98,20 @@ type MarshalCache struct { digest digest.Digest dt []byte md *pb.OpMetadata - src *SourceLocation + srcs []*SourceLocation constraints *Constraints } func (mc *MarshalCache) Cached(c *Constraints) bool { return mc.dt != nil && mc.constraints == c } -func (mc *MarshalCache) Load() (digest.Digest, []byte, *pb.OpMetadata, *SourceLocation, error) { - return mc.digest, mc.dt, mc.md, mc.src, nil +func (mc *MarshalCache) Load() (digest.Digest, []byte, *pb.OpMetadata, []*SourceLocation, error) { + return mc.digest, mc.dt, mc.md, mc.srcs, nil } -func (mc *MarshalCache) Store(dt []byte, md *pb.OpMetadata, src *SourceLocation, c *Constraints) { +func (mc *MarshalCache) Store(dt []byte, md *pb.OpMetadata, srcs []*SourceLocation, c *Constraints) { mc.digest = digest.FromBytes(dt) mc.dt = dt mc.md = md mc.constraints = c - mc.src = src + mc.srcs = srcs } diff --git a/client/llb/source.go b/client/llb/source.go index 7eea6e7b..fd2f44f2 100644 --- a/client/llb/source.go +++ b/client/llb/source.go @@ -44,7 +44,7 @@ func (s *SourceOp) Validate(ctx context.Context) error { return nil } -func (s *SourceOp) Marshal(ctx context.Context, constraints *Constraints) (digest.Digest, []byte, *pb.OpMetadata, *SourceLocation, error) { +func (s *SourceOp) Marshal(ctx context.Context, constraints *Constraints) (digest.Digest, []byte, *pb.OpMetadata, []*SourceLocation, error) { if s.Cached(constraints) { return s.Load() } @@ -77,7 +77,7 @@ func (s *SourceOp) Marshal(ctx context.Context, constraints *Constraints) (diges return "", nil, nil, nil, err } - s.Store(dt, md, s.constraints.Source, constraints) + s.Store(dt, md, s.constraints.SourceLocations, constraints) return s.Load() } diff --git a/client/llb/sourcemap.go b/client/llb/sourcemap.go index ecff7e7f..ca180fb6 100644 --- a/client/llb/sourcemap.go +++ b/client/llb/sourcemap.go @@ -27,10 +27,10 @@ func (s *SourceMap) Location(r []*pb.Range) ConstraintsOpt { if s == nil { return } - c.Source = &SourceLocation{ + c.SourceLocations = append(c.SourceLocations, &SourceLocation{ SourceMap: s, Ranges: r, - } + }) }) } @@ -51,14 +51,16 @@ func newSourceMapCollector() *sourceMapCollector { } } -func (smc *sourceMapCollector) Add(dgst digest.Digest, l *SourceLocation) { - idx, ok := smc.index[l.SourceMap] - if !ok { - idx = len(smc.maps) - smc.maps = append(smc.maps, l.SourceMap) - smc.ranges = append(smc.ranges, map[digest.Digest][]*pb.Range{}) +func (smc *sourceMapCollector) Add(dgst digest.Digest, ls []*SourceLocation) { + for _, l := range ls { + idx, ok := smc.index[l.SourceMap] + if !ok { + idx = len(smc.maps) + smc.maps = append(smc.maps, l.SourceMap) + smc.ranges = append(smc.ranges, map[digest.Digest][]*pb.Range{}) + } + smc.ranges[idx][dgst] = l.Ranges } - smc.ranges[idx][dgst] = l.Ranges } func (smc *sourceMapCollector) Marshal(ctx context.Context, co ...ConstraintsOpt) (*pb.Source, error) { diff --git a/client/llb/state.go b/client/llb/state.go index d815b2fb..dac9b871 100644 --- a/client/llb/state.go +++ b/client/llb/state.go @@ -24,7 +24,7 @@ type Output interface { type Vertex interface { Validate(context.Context) error - Marshal(context.Context, *Constraints) (digest.Digest, []byte, *pb.OpMetadata, *SourceLocation, error) + Marshal(context.Context, *Constraints) (digest.Digest, []byte, *pb.OpMetadata, []*SourceLocation, error) Output() Output Inputs() []Output } @@ -182,7 +182,7 @@ func marshal(ctx context.Context, v Vertex, def *Definition, s *sourceMapCollect } } - dgst, dt, opMeta, sl, err := v.Marshal(ctx, c) + dgst, dt, opMeta, sls, err := v.Marshal(ctx, c) if err != nil { return def, err } @@ -193,9 +193,7 @@ func marshal(ctx context.Context, v Vertex, def *Definition, s *sourceMapCollect if _, ok := cache[dgst]; ok { return def, nil } - if sl != nil { - s.Add(dgst, sl) - } + s.Add(dgst, sls) def.Def = append(def.Def, dt) cache[dgst] = struct{}{} return def, nil @@ -524,7 +522,7 @@ type Constraints struct { Metadata pb.OpMetadata LocalUniqueID string Caps *apicaps.CapSet - Source *SourceLocation + SourceLocations []*SourceLocation } func Platform(p specs.Platform) ConstraintsOpt { diff --git a/frontend/dockerfile/errors_test.go b/frontend/dockerfile/errors_test.go index efbb4c6a..e1f3ca41 100644 --- a/frontend/dockerfile/errors_test.go +++ b/frontend/dockerfile/errors_test.go @@ -100,7 +100,7 @@ env bar=baz`, require.Equal(t, "Dockerfile", srcs[0].Info.Filename) require.Equal(t, tc.dockerfile, string(srcs[0].Info.Data)) - require.Equal(t, len(tc.errorLine), len(srcs[0].Locations)) + require.Equal(t, len(tc.errorLine), len(srcs[0].Ranges)) require.NotNil(t, srcs[0].Info.Definition) next: From 7c81e16b8af4175859a4f79997d1ba9e9f6c23f0 Mon Sep 17 00:00:00 2001 From: Edgar Lee Date: Wed, 20 May 2020 18:48:09 -0700 Subject: [PATCH 10/11] Fix duplicate source maps and fix issue preventing multiple locations per source map Signed-off-by: Edgar Lee --- client/client_test.go | 27 +++++++++++------ client/llb/sourcemap.go | 41 +++++++++++++------------ client/llb/state_test.go | 48 ++++++++++++++++++++++++++++++ frontend/dockerfile/errors_test.go | 2 +- 4 files changed, 89 insertions(+), 29 deletions(-) diff --git a/client/client_test.go b/client/client_test.go index 7fa74105..2ff592a8 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -2697,6 +2697,7 @@ func testSourceMap(t *testing.T, sb integration.Sandbox) { llb.Shlex("not-exist"), sm1.Location([]*pb.Range{{Start: pb.Position{Line: 7}}}), sm2.Location([]*pb.Range{{Start: pb.Position{Line: 8}}}), + sm1.Location([]*pb.Range{{Start: pb.Position{Line: 9}}}), ) def, err := st.Marshal(context.TODO()) @@ -2706,27 +2707,35 @@ func testSourceMap(t *testing.T, sb integration.Sandbox) { require.Error(t, err) srcs := errdefs.Sources(err) - require.Equal(t, 2, len(srcs)) + require.Equal(t, 3, len(srcs)) // Source errors are wrapped in the order provided as llb.ConstraintOpts, so // when they are unwrapped, the first unwrapped error is the last location // provided. - require.Equal(t, "bar", srcs[0].Info.Filename) - require.Equal(t, []byte("data2"), srcs[0].Info.Data) + require.Equal(t, "foo", srcs[0].Info.Filename) + require.Equal(t, []byte("data1"), srcs[0].Info.Data) require.Nil(t, srcs[0].Info.Definition) - require.Equal(t, 1, len(srcs[0].Ranges)) - require.Equal(t, int32(8), srcs[0].Ranges[0].Start.Line) - require.Equal(t, int32(0), srcs[0].Ranges[0].Start.Character) + require.Equal(t, 1, len(srcs[2].Ranges)) + require.Equal(t, int32(9), srcs[2].Ranges[0].Start.Line) + require.Equal(t, int32(0), srcs[2].Ranges[0].Start.Character) - require.Equal(t, "foo", srcs[1].Info.Filename) - require.Equal(t, []byte("data1"), srcs[1].Info.Data) + require.Equal(t, "bar", srcs[1].Info.Filename) + require.Equal(t, []byte("data2"), srcs[1].Info.Data) require.Nil(t, srcs[1].Info.Definition) require.Equal(t, 1, len(srcs[1].Ranges)) - require.Equal(t, int32(7), srcs[1].Ranges[0].Start.Line) + require.Equal(t, int32(8), srcs[1].Ranges[0].Start.Line) require.Equal(t, int32(0), srcs[1].Ranges[0].Start.Character) + require.Equal(t, "foo", srcs[2].Info.Filename) + require.Equal(t, []byte("data1"), srcs[2].Info.Data) + require.Nil(t, srcs[2].Info.Definition) + + require.Equal(t, 1, len(srcs[2].Ranges)) + require.Equal(t, int32(7), srcs[2].Ranges[0].Start.Line) + require.Equal(t, int32(0), srcs[2].Ranges[0].Start.Character) + } func testSourceMapFromRef(t *testing.T, sb integration.Sandbox) { diff --git a/client/llb/sourcemap.go b/client/llb/sourcemap.go index ca180fb6..87afde99 100644 --- a/client/llb/sourcemap.go +++ b/client/llb/sourcemap.go @@ -40,14 +40,15 @@ type SourceLocation struct { } type sourceMapCollector struct { - ranges []map[digest.Digest][]*pb.Range - maps []*SourceMap - index map[*SourceMap]int + maps []*SourceMap + index map[*SourceMap]int + locations map[digest.Digest][]*SourceLocation } func newSourceMapCollector() *sourceMapCollector { return &sourceMapCollector{ - index: map[*SourceMap]int{}, + index: map[*SourceMap]int{}, + locations: map[digest.Digest][]*SourceLocation{}, } } @@ -57,17 +58,17 @@ func (smc *sourceMapCollector) Add(dgst digest.Digest, ls []*SourceLocation) { if !ok { idx = len(smc.maps) smc.maps = append(smc.maps, l.SourceMap) - smc.ranges = append(smc.ranges, map[digest.Digest][]*pb.Range{}) } - smc.ranges[idx][dgst] = l.Ranges + smc.index[l.SourceMap] = idx } + smc.locations[dgst] = ls } func (smc *sourceMapCollector) Marshal(ctx context.Context, co ...ConstraintsOpt) (*pb.Source, error) { s := &pb.Source{ Locations: make(map[string]*pb.Locations), } - for i, m := range smc.maps { + for _, m := range smc.maps { def := m.Definition if def == nil && m.State != nil { var err error @@ -88,20 +89,22 @@ func (smc *sourceMapCollector) Marshal(ctx context.Context, co ...ConstraintsOpt } s.Infos = append(s.Infos, info) + } - for dgst, ranges := range smc.ranges[i] { - locs, ok := s.Locations[dgst.String()] - if !ok { - locs = &pb.Locations{} - } - - locs.Locations = append(locs.Locations, &pb.Location{ - SourceIndex: int32(i), - Ranges: ranges, - }) - - s.Locations[dgst.String()] = locs + for dgst, locs := range smc.locations { + pbLocs, ok := s.Locations[dgst.String()] + if !ok { + pbLocs = &pb.Locations{} } + + for _, loc := range locs { + pbLocs.Locations = append(pbLocs.Locations, &pb.Location{ + SourceIndex: int32(smc.index[loc.SourceMap]), + Ranges: loc.Ranges, + }) + } + + s.Locations[dgst.String()] = pbLocs } return s, nil diff --git a/client/llb/state_test.go b/client/llb/state_test.go index b602db7c..06ebdedb 100644 --- a/client/llb/state_test.go +++ b/client/llb/state_test.go @@ -4,6 +4,8 @@ import ( "context" "testing" + "github.com/moby/buildkit/solver/pb" + digest "github.com/opencontainers/go-digest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -53,6 +55,52 @@ func TestFormattingPatterns(t *testing.T) { assert.Equal(t, "/foo/bar1", getDirHelper(t, s2)) } +func TestStateSourceMapMarshal(t *testing.T) { + t.Parallel() + + sm1 := NewSourceMap(nil, "foo", []byte("data1")) + sm2 := NewSourceMap(nil, "bar", []byte("data2")) + + s := Image( + "myimage", + sm1.Location([]*pb.Range{{Start: pb.Position{Line: 7}}}), + sm2.Location([]*pb.Range{{Start: pb.Position{Line: 8}}}), + sm1.Location([]*pb.Range{{Start: pb.Position{Line: 9}}}), + ) + + def, err := s.Marshal(context.TODO()) + require.NoError(t, err) + + require.Equal(t, 2, len(def.Def)) + dgst := digest.FromBytes(def.Def[0]) + + require.Equal(t, 2, len(def.Source.Infos)) + require.Equal(t, 1, len(def.Source.Locations)) + + require.Equal(t, "foo", def.Source.Infos[0].Filename) + require.Equal(t, []byte("data1"), def.Source.Infos[0].Data) + require.Nil(t, def.Source.Infos[0].Definition) + + require.Equal(t, "bar", def.Source.Infos[1].Filename) + require.Equal(t, []byte("data2"), def.Source.Infos[1].Data) + require.Nil(t, def.Source.Infos[1].Definition) + + require.NotNil(t, def.Source.Locations[dgst.String()]) + require.Equal(t, 3, len(def.Source.Locations[dgst.String()].Locations)) + + require.Equal(t, int32(0), def.Source.Locations[dgst.String()].Locations[0].SourceIndex) + require.Equal(t, 1, len(def.Source.Locations[dgst.String()].Locations[0].Ranges)) + require.Equal(t, int32(7), def.Source.Locations[dgst.String()].Locations[0].Ranges[0].Start.Line) + + require.Equal(t, int32(1), def.Source.Locations[dgst.String()].Locations[1].SourceIndex) + require.Equal(t, 1, len(def.Source.Locations[dgst.String()].Locations[1].Ranges)) + require.Equal(t, int32(8), def.Source.Locations[dgst.String()].Locations[1].Ranges[0].Start.Line) + + require.Equal(t, int32(0), def.Source.Locations[dgst.String()].Locations[2].SourceIndex) + require.Equal(t, 1, len(def.Source.Locations[dgst.String()].Locations[2].Ranges)) + require.Equal(t, int32(9), def.Source.Locations[dgst.String()].Locations[2].Ranges[0].Start.Line) +} + func getEnvHelper(t *testing.T, s State, k string) (string, bool) { t.Helper() v, ok, err := s.GetEnv(context.TODO(), k) diff --git a/frontend/dockerfile/errors_test.go b/frontend/dockerfile/errors_test.go index e1f3ca41..0fc67071 100644 --- a/frontend/dockerfile/errors_test.go +++ b/frontend/dockerfile/errors_test.go @@ -105,7 +105,7 @@ env bar=baz`, next: for _, l := range tc.errorLine { - for _, l2 := range srcs[0].Locations { + for _, l2 := range srcs[0].Ranges { if l2.Start.Line == int32(l) { continue next } From fbee6cccbd1e4aa5c343cf8c97ed5f9835f73cc4 Mon Sep 17 00:00:00 2001 From: Edgar Lee Date: Wed, 20 May 2020 19:04:08 -0700 Subject: [PATCH 11/11] Fix source map test in client_test Signed-off-by: Edgar Lee --- client/client_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/client_test.go b/client/client_test.go index 2ff592a8..c9bfccc0 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -2716,9 +2716,9 @@ func testSourceMap(t *testing.T, sb integration.Sandbox) { require.Equal(t, []byte("data1"), srcs[0].Info.Data) require.Nil(t, srcs[0].Info.Definition) - require.Equal(t, 1, len(srcs[2].Ranges)) - require.Equal(t, int32(9), srcs[2].Ranges[0].Start.Line) - require.Equal(t, int32(0), srcs[2].Ranges[0].Start.Character) + require.Equal(t, 1, len(srcs[0].Ranges)) + require.Equal(t, int32(9), srcs[0].Ranges[0].Start.Line) + require.Equal(t, int32(0), srcs[0].Ranges[0].Start.Character) require.Equal(t, "bar", srcs[1].Info.Filename) require.Equal(t, []byte("data2"), srcs[1].Info.Data)