diff --git a/arduino/cores/cores.go b/arduino/cores/cores.go index ecb2ad38ade..16433020eb0 100644 --- a/arduino/cores/cores.go +++ b/arduino/cores/cores.go @@ -23,6 +23,7 @@ import ( "github.com/arduino/arduino-cli/arduino/resources" "github.com/arduino/arduino-cli/i18n" + rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" paths "github.com/arduino/go-paths-helper" properties "github.com/arduino/go-properties-orderedmap" semver "go.bug.st/relaxed-semver" @@ -342,6 +343,14 @@ func (release *PlatformRelease) String() string { return release.Platform.String() + "@" + version } +// ToRPCPlatformReference creates a gRPC PlatformReference message out of this PlatformRelease +func (release *PlatformRelease) ToRPCPlatformReference() *rpc.PlatformReference { + return &rpc.PlatformReference{ + Id: release.Platform.String(), + Version: release.Version.String(), + } +} + // MarshalJSON provides a more user friendly serialization for // PlatformRelease objects. func (release *PlatformRelease) MarshalJSON() ([]byte, error) { diff --git a/commands/compile/compile.go b/commands/compile/compile.go index a5bf230f4eb..0407e84fd77 100644 --- a/commands/compile/compile.go +++ b/commands/compile/compile.go @@ -217,6 +217,12 @@ func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream if p := builderCtx.BuildPath; p != nil { r.BuildPath = p.String() } + if pl := builderCtx.TargetPlatform; pl != nil { + r.BoardPlatform = pl.ToRPCPlatformReference() + } + if pl := builderCtx.ActualPlatform; pl != nil { + r.BuildPlatform = pl.ToRPCPlatformReference() + } }() // if --preprocess or --show-properties were passed, we can stop here @@ -291,11 +297,11 @@ func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream } importedLibs = append(importedLibs, rpcLib) } + r.UsedLibraries = importedLibs + + r.ExecutableSectionsSize = builderCtx.ExecutableSectionsSize.ToRPCExecutableSectionSizeArray() logrus.Tracef("Compile %s for %s successful", sk.Name, fqbnIn) - return &rpc.CompileResponse{ - UsedLibraries: importedLibs, - ExecutableSectionsSize: builderCtx.ExecutableSectionsSize.ToRPCExecutableSectionSizeArray(), - }, nil + return r, nil } diff --git a/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go b/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go index 636c3229d1c..452552c93ed 100644 --- a/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go @@ -11,6 +11,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // ArduinoCoreServiceClient is the client API for ArduinoCoreService service. @@ -126,7 +127,7 @@ func (c *arduinoCoreServiceClient) Create(ctx context.Context, in *CreateRequest } func (c *arduinoCoreServiceClient) Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (ArduinoCoreService_InitClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[0], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Init", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[0], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Init", opts...) if err != nil { return nil, err } @@ -167,7 +168,7 @@ func (c *arduinoCoreServiceClient) Destroy(ctx context.Context, in *DestroyReque } func (c *arduinoCoreServiceClient) UpdateIndex(ctx context.Context, in *UpdateIndexRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpdateIndexClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[1], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateIndex", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[1], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateIndex", opts...) if err != nil { return nil, err } @@ -199,7 +200,7 @@ func (x *arduinoCoreServiceUpdateIndexClient) Recv() (*UpdateIndexResponse, erro } func (c *arduinoCoreServiceClient) UpdateLibrariesIndex(ctx context.Context, in *UpdateLibrariesIndexRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpdateLibrariesIndexClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[2], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateLibrariesIndex", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[2], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateLibrariesIndex", opts...) if err != nil { return nil, err } @@ -231,7 +232,7 @@ func (x *arduinoCoreServiceUpdateLibrariesIndexClient) Recv() (*UpdateLibrariesI } func (c *arduinoCoreServiceClient) UpdateCoreLibrariesIndex(ctx context.Context, in *UpdateCoreLibrariesIndexRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpdateCoreLibrariesIndexClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[3], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateCoreLibrariesIndex", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[3], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateCoreLibrariesIndex", opts...) if err != nil { return nil, err } @@ -272,7 +273,7 @@ func (c *arduinoCoreServiceClient) Outdated(ctx context.Context, in *OutdatedReq } func (c *arduinoCoreServiceClient) Upgrade(ctx context.Context, in *UpgradeRequest, opts ...grpc.CallOption) (ArduinoCoreService_UpgradeClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[4], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Upgrade", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[4], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Upgrade", opts...) if err != nil { return nil, err } @@ -349,7 +350,7 @@ func (c *arduinoCoreServiceClient) BoardDetails(ctx context.Context, in *BoardDe } func (c *arduinoCoreServiceClient) BoardAttach(ctx context.Context, in *BoardAttachRequest, opts ...grpc.CallOption) (ArduinoCoreService_BoardAttachClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[5], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardAttach", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[5], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardAttach", opts...) if err != nil { return nil, err } @@ -408,7 +409,7 @@ func (c *arduinoCoreServiceClient) BoardSearch(ctx context.Context, in *BoardSea } func (c *arduinoCoreServiceClient) BoardListWatch(ctx context.Context, opts ...grpc.CallOption) (ArduinoCoreService_BoardListWatchClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[6], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardListWatch", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[6], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardListWatch", opts...) if err != nil { return nil, err } @@ -439,7 +440,7 @@ func (x *arduinoCoreServiceBoardListWatchClient) Recv() (*BoardListWatchResponse } func (c *arduinoCoreServiceClient) Compile(ctx context.Context, in *CompileRequest, opts ...grpc.CallOption) (ArduinoCoreService_CompileClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[7], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Compile", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[7], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Compile", opts...) if err != nil { return nil, err } @@ -471,7 +472,7 @@ func (x *arduinoCoreServiceCompileClient) Recv() (*CompileResponse, error) { } func (c *arduinoCoreServiceClient) PlatformInstall(ctx context.Context, in *PlatformInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[8], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformInstall", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[8], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformInstall", opts...) if err != nil { return nil, err } @@ -503,7 +504,7 @@ func (x *arduinoCoreServicePlatformInstallClient) Recv() (*PlatformInstallRespon } func (c *arduinoCoreServiceClient) PlatformDownload(ctx context.Context, in *PlatformDownloadRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformDownloadClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[9], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformDownload", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[9], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformDownload", opts...) if err != nil { return nil, err } @@ -535,7 +536,7 @@ func (x *arduinoCoreServicePlatformDownloadClient) Recv() (*PlatformDownloadResp } func (c *arduinoCoreServiceClient) PlatformUninstall(ctx context.Context, in *PlatformUninstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformUninstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[10], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformUninstall", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[10], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformUninstall", opts...) if err != nil { return nil, err } @@ -567,7 +568,7 @@ func (x *arduinoCoreServicePlatformUninstallClient) Recv() (*PlatformUninstallRe } func (c *arduinoCoreServiceClient) PlatformUpgrade(ctx context.Context, in *PlatformUpgradeRequest, opts ...grpc.CallOption) (ArduinoCoreService_PlatformUpgradeClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[11], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformUpgrade", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[11], "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformUpgrade", opts...) if err != nil { return nil, err } @@ -599,7 +600,7 @@ func (x *arduinoCoreServicePlatformUpgradeClient) Recv() (*PlatformUpgradeRespon } func (c *arduinoCoreServiceClient) Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (ArduinoCoreService_UploadClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[12], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Upload", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[12], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Upload", opts...) if err != nil { return nil, err } @@ -631,7 +632,7 @@ func (x *arduinoCoreServiceUploadClient) Recv() (*UploadResponse, error) { } func (c *arduinoCoreServiceClient) UploadUsingProgrammer(ctx context.Context, in *UploadUsingProgrammerRequest, opts ...grpc.CallOption) (ArduinoCoreService_UploadUsingProgrammerClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[13], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UploadUsingProgrammer", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[13], "/cc.arduino.cli.commands.v1.ArduinoCoreService/UploadUsingProgrammer", opts...) if err != nil { return nil, err } @@ -681,7 +682,7 @@ func (c *arduinoCoreServiceClient) ListProgrammersAvailableForUpload(ctx context } func (c *arduinoCoreServiceClient) BurnBootloader(ctx context.Context, in *BurnBootloaderRequest, opts ...grpc.CallOption) (ArduinoCoreService_BurnBootloaderClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[14], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BurnBootloader", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[14], "/cc.arduino.cli.commands.v1.ArduinoCoreService/BurnBootloader", opts...) if err != nil { return nil, err } @@ -731,7 +732,7 @@ func (c *arduinoCoreServiceClient) PlatformList(ctx context.Context, in *Platfor } func (c *arduinoCoreServiceClient) LibraryDownload(ctx context.Context, in *LibraryDownloadRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryDownloadClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[15], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryDownload", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[15], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryDownload", opts...) if err != nil { return nil, err } @@ -763,7 +764,7 @@ func (x *arduinoCoreServiceLibraryDownloadClient) Recv() (*LibraryDownloadRespon } func (c *arduinoCoreServiceClient) LibraryInstall(ctx context.Context, in *LibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[16], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryInstall", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[16], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryInstall", opts...) if err != nil { return nil, err } @@ -795,7 +796,7 @@ func (x *arduinoCoreServiceLibraryInstallClient) Recv() (*LibraryInstallResponse } func (c *arduinoCoreServiceClient) ZipLibraryInstall(ctx context.Context, in *ZipLibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_ZipLibraryInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[17], "/cc.arduino.cli.commands.v1.ArduinoCoreService/ZipLibraryInstall", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[17], "/cc.arduino.cli.commands.v1.ArduinoCoreService/ZipLibraryInstall", opts...) if err != nil { return nil, err } @@ -827,7 +828,7 @@ func (x *arduinoCoreServiceZipLibraryInstallClient) Recv() (*ZipLibraryInstallRe } func (c *arduinoCoreServiceClient) GitLibraryInstall(ctx context.Context, in *GitLibraryInstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_GitLibraryInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[18], "/cc.arduino.cli.commands.v1.ArduinoCoreService/GitLibraryInstall", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[18], "/cc.arduino.cli.commands.v1.ArduinoCoreService/GitLibraryInstall", opts...) if err != nil { return nil, err } @@ -859,7 +860,7 @@ func (x *arduinoCoreServiceGitLibraryInstallClient) Recv() (*GitLibraryInstallRe } func (c *arduinoCoreServiceClient) LibraryUninstall(ctx context.Context, in *LibraryUninstallRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUninstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[19], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryUninstall", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[19], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryUninstall", opts...) if err != nil { return nil, err } @@ -891,7 +892,7 @@ func (x *arduinoCoreServiceLibraryUninstallClient) Recv() (*LibraryUninstallResp } func (c *arduinoCoreServiceClient) LibraryUpgradeAll(ctx context.Context, in *LibraryUpgradeAllRequest, opts ...grpc.CallOption) (ArduinoCoreService_LibraryUpgradeAllClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[20], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryUpgradeAll", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[20], "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryUpgradeAll", opts...) if err != nil { return nil, err } @@ -950,7 +951,7 @@ func (c *arduinoCoreServiceClient) LibraryList(ctx context.Context, in *LibraryL } func (c *arduinoCoreServiceClient) Monitor(ctx context.Context, opts ...grpc.CallOption) (ArduinoCoreService_MonitorClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCoreService_serviceDesc.Streams[21], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Monitor", opts...) + stream, err := c.cc.NewStream(ctx, &ArduinoCoreService_ServiceDesc.Streams[21], "/cc.arduino.cli.commands.v1.ArduinoCoreService/Monitor", opts...) if err != nil { return nil, err } @@ -1221,8 +1222,8 @@ type UnsafeArduinoCoreServiceServer interface { mustEmbedUnimplementedArduinoCoreServiceServer() } -func RegisterArduinoCoreServiceServer(s *grpc.Server, srv ArduinoCoreServiceServer) { - s.RegisterService(&_ArduinoCoreService_serviceDesc, srv) +func RegisterArduinoCoreServiceServer(s grpc.ServiceRegistrar, srv ArduinoCoreServiceServer) { + s.RegisterService(&ArduinoCoreService_ServiceDesc, srv) } func _ArduinoCoreService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -2039,7 +2040,10 @@ func _ArduinoCoreService_EnumerateMonitorPortSettings_Handler(srv interface{}, c return interceptor(ctx, in, info, handler) } -var _ArduinoCoreService_serviceDesc = grpc.ServiceDesc{ +// ArduinoCoreService_ServiceDesc is the grpc.ServiceDesc for ArduinoCoreService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ArduinoCoreService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cc.arduino.cli.commands.v1.ArduinoCoreService", HandlerType: (*ArduinoCoreServiceServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/rpc/cc/arduino/cli/commands/v1/common.pb.go b/rpc/cc/arduino/cli/commands/v1/common.pb.go index 637a9557233..61bf195e536 100644 --- a/rpc/cc/arduino/cli/commands/v1/common.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/common.pb.go @@ -430,6 +430,63 @@ func (x *Platform) GetDeprecated() bool { return false } +type PlatformReference struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Platform ID (e.g., `arduino:avr`). + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Version of the platform. + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *PlatformReference) Reset() { + *x = PlatformReference{} + if protoimpl.UnsafeEnabled { + mi := &file_cc_arduino_cli_commands_v1_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlatformReference) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlatformReference) ProtoMessage() {} + +func (x *PlatformReference) ProtoReflect() protoreflect.Message { + mi := &file_cc_arduino_cli_commands_v1_common_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlatformReference.ProtoReflect.Descriptor instead. +func (*PlatformReference) Descriptor() ([]byte, []int) { + return file_cc_arduino_cli_commands_v1_common_proto_rawDescGZIP(), []int{5} +} + +func (x *PlatformReference) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PlatformReference) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + type Board struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -445,7 +502,7 @@ type Board struct { func (x *Board) Reset() { *x = Board{} if protoimpl.UnsafeEnabled { - mi := &file_cc_arduino_cli_commands_v1_common_proto_msgTypes[5] + mi := &file_cc_arduino_cli_commands_v1_common_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -458,7 +515,7 @@ func (x *Board) String() string { func (*Board) ProtoMessage() {} func (x *Board) ProtoReflect() protoreflect.Message { - mi := &file_cc_arduino_cli_commands_v1_common_proto_msgTypes[5] + mi := &file_cc_arduino_cli_commands_v1_common_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -471,7 +528,7 @@ func (x *Board) ProtoReflect() protoreflect.Message { // Deprecated: Use Board.ProtoReflect.Descriptor instead. func (*Board) Descriptor() ([]byte, []int) { - return file_cc_arduino_cli_commands_v1_common_proto_rawDescGZIP(), []int{5} + return file_cc_arduino_cli_commands_v1_common_proto_rawDescGZIP(), []int{6} } func (x *Board) GetName() string { @@ -537,15 +594,19 @@ var file_cc_arduino_cli_commands_v1_common_proto_rawDesc = []byte{ 0x08, 0x52, 0x11, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x22, 0x2f, 0x0a, 0x05, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x66, 0x71, 0x62, 0x6e, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x72, 0x64, 0x75, - 0x69, 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x63, 0x2f, 0x61, - 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x65, 0x64, 0x22, 0x3d, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x0a, 0x05, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x66, 0x71, 0x62, 0x6e, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, + 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x63, 0x2f, 0x61, 0x72, + 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -560,17 +621,18 @@ func file_cc_arduino_cli_commands_v1_common_proto_rawDescGZIP() []byte { return file_cc_arduino_cli_commands_v1_common_proto_rawDescData } -var file_cc_arduino_cli_commands_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_cc_arduino_cli_commands_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_cc_arduino_cli_commands_v1_common_proto_goTypes = []interface{}{ - (*Instance)(nil), // 0: cc.arduino.cli.commands.v1.Instance - (*DownloadProgress)(nil), // 1: cc.arduino.cli.commands.v1.DownloadProgress - (*TaskProgress)(nil), // 2: cc.arduino.cli.commands.v1.TaskProgress - (*Programmer)(nil), // 3: cc.arduino.cli.commands.v1.Programmer - (*Platform)(nil), // 4: cc.arduino.cli.commands.v1.Platform - (*Board)(nil), // 5: cc.arduino.cli.commands.v1.Board + (*Instance)(nil), // 0: cc.arduino.cli.commands.v1.Instance + (*DownloadProgress)(nil), // 1: cc.arduino.cli.commands.v1.DownloadProgress + (*TaskProgress)(nil), // 2: cc.arduino.cli.commands.v1.TaskProgress + (*Programmer)(nil), // 3: cc.arduino.cli.commands.v1.Programmer + (*Platform)(nil), // 4: cc.arduino.cli.commands.v1.Platform + (*PlatformReference)(nil), // 5: cc.arduino.cli.commands.v1.PlatformReference + (*Board)(nil), // 6: cc.arduino.cli.commands.v1.Board } var file_cc_arduino_cli_commands_v1_common_proto_depIdxs = []int32{ - 5, // 0: cc.arduino.cli.commands.v1.Platform.boards:type_name -> cc.arduino.cli.commands.v1.Board + 6, // 0: cc.arduino.cli.commands.v1.Platform.boards:type_name -> cc.arduino.cli.commands.v1.Board 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -645,6 +707,18 @@ func file_cc_arduino_cli_commands_v1_common_proto_init() { } } file_cc_arduino_cli_commands_v1_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlatformReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cc_arduino_cli_commands_v1_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Board); i { case 0: return &v.state @@ -663,7 +737,7 @@ func file_cc_arduino_cli_commands_v1_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cc_arduino_cli_commands_v1_common_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/rpc/cc/arduino/cli/commands/v1/common.proto b/rpc/cc/arduino/cli/commands/v1/common.proto index 29e0b160cad..4e9a5e3b8a9 100644 --- a/rpc/cc/arduino/cli/commands/v1/common.proto +++ b/rpc/cc/arduino/cli/commands/v1/common.proto @@ -80,6 +80,13 @@ message Platform { bool deprecated = 10; } +message PlatformReference { + // Platform ID (e.g., `arduino:avr`). + string id = 1; + // Version of the platform. + string version = 2; +} + message Board { // Name used to identify the board to humans. string name = 1; diff --git a/rpc/cc/arduino/cli/commands/v1/compile.pb.go b/rpc/cc/arduino/cli/commands/v1/compile.pb.go index becaf763077..a24fb712bda 100644 --- a/rpc/cc/arduino/cli/commands/v1/compile.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/compile.pb.go @@ -293,6 +293,10 @@ type CompileResponse struct { UsedLibraries []*Library `protobuf:"bytes,4,rep,name=used_libraries,json=usedLibraries,proto3" json:"used_libraries,omitempty"` // The size of the executable split by sections ExecutableSectionsSize []*ExecutableSectionSize `protobuf:"bytes,5,rep,name=executable_sections_size,json=executableSectionsSize,proto3" json:"executable_sections_size,omitempty"` + // The platform where the board is defined + BoardPlatform *PlatformReference `protobuf:"bytes,6,opt,name=board_platform,json=boardPlatform,proto3" json:"board_platform,omitempty"` + // The platform used for the build (if referenced from the board platform) + BuildPlatform *PlatformReference `protobuf:"bytes,7,opt,name=build_platform,json=buildPlatform,proto3" json:"build_platform,omitempty"` } func (x *CompileResponse) Reset() { @@ -362,6 +366,20 @@ func (x *CompileResponse) GetExecutableSectionsSize() []*ExecutableSectionSize { return nil } +func (x *CompileResponse) GetBoardPlatform() *PlatformReference { + if x != nil { + return x.BoardPlatform + } + return nil +} + +func (x *CompileResponse) GetBuildPlatform() *PlatformReference { + if x != nil { + return x.BuildPlatform + } + return nil +} + type ExecutableSectionSize struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -496,7 +514,7 @@ var file_cc_arduino_cli_commands_v1_compile_proto_rawDesc = []byte{ 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa7, 0x02, 0x0a, 0x0f, 0x43, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd3, 0x03, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1d, 0x0a, @@ -515,18 +533,28 @@ var file_cc_arduino_cli_commands_v1_compile_proto_rawDesc = []byte{ 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x16, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x53, 0x69, 0x7a, 0x65, 0x22, 0x5a, 0x0a, 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, - 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, - 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2d, 0x63, - 0x6c, 0x69, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, - 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, - 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x54, 0x0a, 0x0e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, + 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0d, 0x62, 0x6f, 0x61, + 0x72, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x54, 0x0a, 0x0e, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, + 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x52, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x22, 0x5a, 0x0a, 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x48, 0x5a, 0x46, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, + 0x6e, 0x6f, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72, + 0x70, 0x63, 0x2f, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, + 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -550,6 +578,7 @@ var file_cc_arduino_cli_commands_v1_compile_proto_goTypes = []interface{}{ (*Instance)(nil), // 4: cc.arduino.cli.commands.v1.Instance (*wrapperspb.BoolValue)(nil), // 5: google.protobuf.BoolValue (*Library)(nil), // 6: cc.arduino.cli.commands.v1.Library + (*PlatformReference)(nil), // 7: cc.arduino.cli.commands.v1.PlatformReference } var file_cc_arduino_cli_commands_v1_compile_proto_depIdxs = []int32{ 4, // 0: cc.arduino.cli.commands.v1.CompileRequest.instance:type_name -> cc.arduino.cli.commands.v1.Instance @@ -557,11 +586,13 @@ var file_cc_arduino_cli_commands_v1_compile_proto_depIdxs = []int32{ 5, // 2: cc.arduino.cli.commands.v1.CompileRequest.export_binaries:type_name -> google.protobuf.BoolValue 6, // 3: cc.arduino.cli.commands.v1.CompileResponse.used_libraries:type_name -> cc.arduino.cli.commands.v1.Library 2, // 4: cc.arduino.cli.commands.v1.CompileResponse.executable_sections_size:type_name -> cc.arduino.cli.commands.v1.ExecutableSectionSize - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 7, // 5: cc.arduino.cli.commands.v1.CompileResponse.board_platform:type_name -> cc.arduino.cli.commands.v1.PlatformReference + 7, // 6: cc.arduino.cli.commands.v1.CompileResponse.build_platform:type_name -> cc.arduino.cli.commands.v1.PlatformReference + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_cc_arduino_cli_commands_v1_compile_proto_init() } diff --git a/rpc/cc/arduino/cli/commands/v1/compile.proto b/rpc/cc/arduino/cli/commands/v1/compile.proto index 519898d90f8..ac97c590bad 100644 --- a/rpc/cc/arduino/cli/commands/v1/compile.proto +++ b/rpc/cc/arduino/cli/commands/v1/compile.proto @@ -93,6 +93,10 @@ message CompileResponse { repeated Library used_libraries = 4; // The size of the executable split by sections repeated ExecutableSectionSize executable_sections_size = 5; + // The platform where the board is defined + PlatformReference board_platform = 6; + // The platform used for the build (if referenced from the board platform) + PlatformReference build_platform = 7; } message ExecutableSectionSize { diff --git a/rpc/cc/arduino/cli/debug/v1/debug_grpc.pb.go b/rpc/cc/arduino/cli/debug/v1/debug_grpc.pb.go index 48d9ed99f38..87ad365dd49 100644 --- a/rpc/cc/arduino/cli/debug/v1/debug_grpc.pb.go +++ b/rpc/cc/arduino/cli/debug/v1/debug_grpc.pb.go @@ -11,6 +11,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // DebugServiceClient is the client API for DebugService service. @@ -31,7 +32,7 @@ func NewDebugServiceClient(cc grpc.ClientConnInterface) DebugServiceClient { } func (c *debugServiceClient) Debug(ctx context.Context, opts ...grpc.CallOption) (DebugService_DebugClient, error) { - stream, err := c.cc.NewStream(ctx, &_DebugService_serviceDesc.Streams[0], "/cc.arduino.cli.debug.v1.DebugService/Debug", opts...) + stream, err := c.cc.NewStream(ctx, &DebugService_ServiceDesc.Streams[0], "/cc.arduino.cli.debug.v1.DebugService/Debug", opts...) if err != nil { return nil, err } @@ -99,8 +100,8 @@ type UnsafeDebugServiceServer interface { mustEmbedUnimplementedDebugServiceServer() } -func RegisterDebugServiceServer(s *grpc.Server, srv DebugServiceServer) { - s.RegisterService(&_DebugService_serviceDesc, srv) +func RegisterDebugServiceServer(s grpc.ServiceRegistrar, srv DebugServiceServer) { + s.RegisterService(&DebugService_ServiceDesc, srv) } func _DebugService_Debug_Handler(srv interface{}, stream grpc.ServerStream) error { @@ -147,7 +148,10 @@ func _DebugService_GetDebugConfig_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -var _DebugService_serviceDesc = grpc.ServiceDesc{ +// DebugService_ServiceDesc is the grpc.ServiceDesc for DebugService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var DebugService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cc.arduino.cli.debug.v1.DebugService", HandlerType: (*DebugServiceServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/rpc/cc/arduino/cli/monitor/v1/monitor_grpc.pb.go b/rpc/cc/arduino/cli/monitor/v1/monitor_grpc.pb.go index 923bd13c61f..bd24416d142 100644 --- a/rpc/cc/arduino/cli/monitor/v1/monitor_grpc.pb.go +++ b/rpc/cc/arduino/cli/monitor/v1/monitor_grpc.pb.go @@ -11,6 +11,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // MonitorServiceClient is the client API for MonitorService service. @@ -31,7 +32,7 @@ func NewMonitorServiceClient(cc grpc.ClientConnInterface) MonitorServiceClient { } func (c *monitorServiceClient) StreamingOpen(ctx context.Context, opts ...grpc.CallOption) (MonitorService_StreamingOpenClient, error) { - stream, err := c.cc.NewStream(ctx, &_MonitorService_serviceDesc.Streams[0], "/cc.arduino.cli.monitor.v1.MonitorService/StreamingOpen", opts...) + stream, err := c.cc.NewStream(ctx, &MonitorService_ServiceDesc.Streams[0], "/cc.arduino.cli.monitor.v1.MonitorService/StreamingOpen", opts...) if err != nil { return nil, err } @@ -87,8 +88,8 @@ type UnsafeMonitorServiceServer interface { mustEmbedUnimplementedMonitorServiceServer() } -func RegisterMonitorServiceServer(s *grpc.Server, srv MonitorServiceServer) { - s.RegisterService(&_MonitorService_serviceDesc, srv) +func RegisterMonitorServiceServer(s grpc.ServiceRegistrar, srv MonitorServiceServer) { + s.RegisterService(&MonitorService_ServiceDesc, srv) } func _MonitorService_StreamingOpen_Handler(srv interface{}, stream grpc.ServerStream) error { @@ -117,7 +118,10 @@ func (x *monitorServiceStreamingOpenServer) Recv() (*StreamingOpenRequest, error return m, nil } -var _MonitorService_serviceDesc = grpc.ServiceDesc{ +// MonitorService_ServiceDesc is the grpc.ServiceDesc for MonitorService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var MonitorService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cc.arduino.cli.monitor.v1.MonitorService", HandlerType: (*MonitorServiceServer)(nil), Methods: []grpc.MethodDesc{}, diff --git a/rpc/cc/arduino/cli/settings/v1/settings_grpc.pb.go b/rpc/cc/arduino/cli/settings/v1/settings_grpc.pb.go index 2a5c87c6536..28ede224376 100644 --- a/rpc/cc/arduino/cli/settings/v1/settings_grpc.pb.go +++ b/rpc/cc/arduino/cli/settings/v1/settings_grpc.pb.go @@ -11,6 +11,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // SettingsServiceClient is the client API for SettingsService service. @@ -127,8 +128,8 @@ type UnsafeSettingsServiceServer interface { mustEmbedUnimplementedSettingsServiceServer() } -func RegisterSettingsServiceServer(s *grpc.Server, srv SettingsServiceServer) { - s.RegisterService(&_SettingsService_serviceDesc, srv) +func RegisterSettingsServiceServer(s grpc.ServiceRegistrar, srv SettingsServiceServer) { + s.RegisterService(&SettingsService_ServiceDesc, srv) } func _SettingsService_GetAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -221,7 +222,10 @@ func _SettingsService_Write_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } -var _SettingsService_serviceDesc = grpc.ServiceDesc{ +// SettingsService_ServiceDesc is the grpc.ServiceDesc for SettingsService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SettingsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cc.arduino.cli.settings.v1.SettingsService", HandlerType: (*SettingsServiceServer)(nil), Methods: []grpc.MethodDesc{