diff --git a/cli/Makefile b/cli/Makefile index 16048d7f20904..4b0d73f3a0288 100644 --- a/cli/Makefile +++ b/cli/Makefile @@ -31,9 +31,8 @@ go-turbo$(EXT): $(GENERATED_FILES) $(SRC_FILES) go.mod turborepo-ffi-install CGO_ENABLED=1 go build $(GO_FLAGS) -tags $(GO_TAG) -o go-turbo$(EXT) ./cmd/turbo .PHONY: turborepo-ffi-install -turborepo-ffi-install: turborepo-ffi turborepo-ffi-proto +turborepo-ffi-install: turborepo-ffi cp -r ../crates/turborepo-ffi/bindings.h \ - ../crates/turborepo-ffi/ffi/proto \ ../crates/turborepo-ffi/target/release/libturborepo_ffi.a \ ./internal/ffi @@ -43,7 +42,7 @@ turborepo-ffi: .PHONY: turborepo-ffi-proto turborepo-ffi-proto: - cd ../crates/turborepo-ffi && protoc --go_out=. messages.proto + protoc -I../crates/ ../crates/turborepo-ffi/messages.proto --go_out=./internal/ protoc: internal/turbodprotocol/turbod.proto protoc --go_out=. --go_opt=paths=source_relative \ diff --git a/cli/internal/ffi/proto/messages.pb.go b/cli/internal/ffi/proto/messages.pb.go index 011cc1bf56773..0837d2cf15208 100644 --- a/cli/internal/ffi/proto/messages.pb.go +++ b/cli/internal/ffi/proto/messages.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 -// protoc v3.20.3 -// source: messages.proto +// protoc-gen-go v1.28.1 +// protoc v3.21.12 +// source: turborepo-ffi/messages.proto package proto @@ -31,7 +31,7 @@ type TurboDataDirResp struct { func (x *TurboDataDirResp) Reset() { *x = TurboDataDirResp{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[0] + mi := &file_turborepo_ffi_messages_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -44,7 +44,7 @@ func (x *TurboDataDirResp) String() string { func (*TurboDataDirResp) ProtoMessage() {} func (x *TurboDataDirResp) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[0] + mi := &file_turborepo_ffi_messages_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,7 +57,7 @@ func (x *TurboDataDirResp) ProtoReflect() protoreflect.Message { // Deprecated: Use TurboDataDirResp.ProtoReflect.Descriptor instead. func (*TurboDataDirResp) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{0} + return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{0} } func (x *TurboDataDirResp) GetDir() string { @@ -81,7 +81,7 @@ type GlobReq struct { func (x *GlobReq) Reset() { *x = GlobReq{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[1] + mi := &file_turborepo_ffi_messages_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -94,7 +94,7 @@ func (x *GlobReq) String() string { func (*GlobReq) ProtoMessage() {} func (x *GlobReq) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[1] + mi := &file_turborepo_ffi_messages_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107,7 +107,7 @@ func (x *GlobReq) ProtoReflect() protoreflect.Message { // Deprecated: Use GlobReq.ProtoReflect.Descriptor instead. func (*GlobReq) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{1} + return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{1} } func (x *GlobReq) GetBasePath() string { @@ -152,7 +152,7 @@ type GlobResp struct { func (x *GlobResp) Reset() { *x = GlobResp{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[2] + mi := &file_turborepo_ffi_messages_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -165,7 +165,7 @@ func (x *GlobResp) String() string { func (*GlobResp) ProtoMessage() {} func (x *GlobResp) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[2] + mi := &file_turborepo_ffi_messages_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -178,7 +178,7 @@ func (x *GlobResp) ProtoReflect() protoreflect.Message { // Deprecated: Use GlobResp.ProtoReflect.Descriptor instead. func (*GlobResp) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{2} + return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{2} } func (m *GlobResp) GetResponse() isGlobResp_Response { @@ -229,7 +229,7 @@ type GlobRespList struct { func (x *GlobRespList) Reset() { *x = GlobRespList{} if protoimpl.UnsafeEnabled { - mi := &file_messages_proto_msgTypes[3] + mi := &file_turborepo_ffi_messages_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -242,7 +242,7 @@ func (x *GlobRespList) String() string { func (*GlobRespList) ProtoMessage() {} func (x *GlobRespList) ProtoReflect() protoreflect.Message { - mi := &file_messages_proto_msgTypes[3] + mi := &file_turborepo_ffi_messages_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -255,7 +255,7 @@ func (x *GlobRespList) ProtoReflect() protoreflect.Message { // Deprecated: Use GlobRespList.ProtoReflect.Descriptor instead. func (*GlobRespList) Descriptor() ([]byte, []int) { - return file_messages_proto_rawDescGZIP(), []int{3} + return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{3} } func (x *GlobRespList) GetFiles() []string { @@ -265,54 +265,55 @@ func (x *GlobRespList) GetFiles() []string { return nil } -var File_messages_proto protoreflect.FileDescriptor - -var file_messages_proto_rawDesc = []byte{ - 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x24, 0x0a, 0x10, 0x54, 0x75, 0x72, 0x62, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x44, 0x69, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x64, 0x69, 0x72, 0x22, 0x9b, 0x01, 0x0a, 0x07, 0x47, 0x6c, 0x6f, 0x62, 0x52, - 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, - 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, - 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x6f, - 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x73, - 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x55, 0x0a, 0x08, 0x47, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x25, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, - 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, - 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x0a, 0x0c, 0x47, - 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, - 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, - 0x73, 0x42, 0x0b, 0x5a, 0x09, 0x66, 0x66, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_turborepo_ffi_messages_proto protoreflect.FileDescriptor + +var file_turborepo_ffi_messages_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x74, 0x75, 0x72, 0x62, 0x6f, 0x72, 0x65, 0x70, 0x6f, 0x2d, 0x66, 0x66, 0x69, 0x2f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x24, + 0x0a, 0x10, 0x54, 0x75, 0x72, 0x62, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x44, 0x69, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x64, 0x69, 0x72, 0x22, 0x9b, 0x01, 0x0a, 0x07, 0x47, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, + 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x29, 0x0a, + 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x4f, 0x6e, + 0x6c, 0x79, 0x22, 0x55, 0x0a, 0x08, 0x47, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, + 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x47, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x05, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0a, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x0a, 0x0c, 0x47, 0x6c, 0x6f, + 0x62, 0x52, 0x65, 0x73, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x42, + 0x0b, 0x5a, 0x09, 0x66, 0x66, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( - file_messages_proto_rawDescOnce sync.Once - file_messages_proto_rawDescData = file_messages_proto_rawDesc + file_turborepo_ffi_messages_proto_rawDescOnce sync.Once + file_turborepo_ffi_messages_proto_rawDescData = file_turborepo_ffi_messages_proto_rawDesc ) -func file_messages_proto_rawDescGZIP() []byte { - file_messages_proto_rawDescOnce.Do(func() { - file_messages_proto_rawDescData = protoimpl.X.CompressGZIP(file_messages_proto_rawDescData) +func file_turborepo_ffi_messages_proto_rawDescGZIP() []byte { + file_turborepo_ffi_messages_proto_rawDescOnce.Do(func() { + file_turborepo_ffi_messages_proto_rawDescData = protoimpl.X.CompressGZIP(file_turborepo_ffi_messages_proto_rawDescData) }) - return file_messages_proto_rawDescData + return file_turborepo_ffi_messages_proto_rawDescData } -var file_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_messages_proto_goTypes = []interface{}{ +var file_turborepo_ffi_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_turborepo_ffi_messages_proto_goTypes = []interface{}{ (*TurboDataDirResp)(nil), // 0: TurboDataDirResp (*GlobReq)(nil), // 1: GlobReq (*GlobResp)(nil), // 2: GlobResp (*GlobRespList)(nil), // 3: GlobRespList } -var file_messages_proto_depIdxs = []int32{ +var file_turborepo_ffi_messages_proto_depIdxs = []int32{ 3, // 0: GlobResp.files:type_name -> GlobRespList 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type @@ -321,13 +322,13 @@ var file_messages_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_messages_proto_init() } -func file_messages_proto_init() { - if File_messages_proto != nil { +func init() { file_turborepo_ffi_messages_proto_init() } +func file_turborepo_ffi_messages_proto_init() { + if File_turborepo_ffi_messages_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_turborepo_ffi_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TurboDataDirResp); i { case 0: return &v.state @@ -339,7 +340,7 @@ func file_messages_proto_init() { return nil } } - file_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_turborepo_ffi_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GlobReq); i { case 0: return &v.state @@ -351,7 +352,7 @@ func file_messages_proto_init() { return nil } } - file_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_turborepo_ffi_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GlobResp); i { case 0: return &v.state @@ -363,7 +364,7 @@ func file_messages_proto_init() { return nil } } - file_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_turborepo_ffi_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GlobRespList); i { case 0: return &v.state @@ -376,7 +377,7 @@ func file_messages_proto_init() { } } } - file_messages_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_turborepo_ffi_messages_proto_msgTypes[2].OneofWrappers = []interface{}{ (*GlobResp_Files)(nil), (*GlobResp_Error)(nil), } @@ -384,18 +385,18 @@ func file_messages_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_messages_proto_rawDesc, + RawDescriptor: file_turborepo_ffi_messages_proto_rawDesc, NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_messages_proto_goTypes, - DependencyIndexes: file_messages_proto_depIdxs, - MessageInfos: file_messages_proto_msgTypes, + GoTypes: file_turborepo_ffi_messages_proto_goTypes, + DependencyIndexes: file_turborepo_ffi_messages_proto_depIdxs, + MessageInfos: file_turborepo_ffi_messages_proto_msgTypes, }.Build() - File_messages_proto = out.File - file_messages_proto_rawDesc = nil - file_messages_proto_goTypes = nil - file_messages_proto_depIdxs = nil + File_turborepo_ffi_messages_proto = out.File + file_turborepo_ffi_messages_proto_rawDesc = nil + file_turborepo_ffi_messages_proto_goTypes = nil + file_turborepo_ffi_messages_proto_depIdxs = nil }