From 1bc0bd5b283ee76b07d3cdd6fd4a3d522b452585 Mon Sep 17 00:00:00 2001 From: rsora Date: Thu, 19 Mar 2020 17:51:10 +0100 Subject: [PATCH 1/8] Remove hotfix adding --interpreter flag --- cli/debug/debug.go | 26 ++++--- commands/debug/debug.go | 30 ++++---- rpc/commands/commands.pb.go | 90 ++--------------------- rpc/debug/debug.pb.go | 137 +++++++++++++----------------------- rpc/debug/debug.proto | 13 ++-- rpc/monitor/monitor.pb.go | 18 ++--- rpc/settings/settings.pb.go | 27 ++----- 7 files changed, 97 insertions(+), 244 deletions(-) diff --git a/cli/debug/debug.go b/cli/debug/debug.go index 0c89a0aa610..3336ebd8aec 100644 --- a/cli/debug/debug.go +++ b/cli/debug/debug.go @@ -24,6 +24,7 @@ import ( "github.com/arduino/arduino-cli/cli/feedback" "github.com/arduino/arduino-cli/cli/instance" "github.com/arduino/arduino-cli/commands/debug" + rpc "github.com/arduino/arduino-cli/rpc/commands" dbg "github.com/arduino/arduino-cli/rpc/debug" "github.com/arduino/go-paths-helper" "github.com/sirupsen/logrus" @@ -31,11 +32,12 @@ import ( ) var ( - fqbn string - port string - verbose bool - verify bool - importFile string + fqbn string + port string + verbose bool + verify bool + interpreter string + importFile string ) // NewCommand created a new `upload` command @@ -50,7 +52,8 @@ func NewCommand() *cobra.Command { } debugCommand.Flags().StringVarP(&fqbn, "fqbn", "b", "", "Fully Qualified Board Name, e.g.: arduino:avr:uno") - debugCommand.Flags().StringVarP(&port, "port", "p", "", "Upload port, e.g.: COM10 or /dev/ttyACM0") + debugCommand.Flags().StringVarP(&port, "port", "p", "", "Debug port, e.g.: COM10 or /dev/ttyACM0") + debugCommand.Flags().StringVar(&interpreter, "interpreter", "console", "Debug interpreter e.g.: console, mi, mi1, mi2, mi3") debugCommand.Flags().StringVarP(&importFile, "input", "i", "", "Input file to be uploaded for debug.") return debugCommand @@ -74,11 +77,12 @@ func run(command *cobra.Command, args []string) { signal.Notify(ctrlc, os.Interrupt) if _, err := debug.Debug(context.Background(), &dbg.DebugConfigReq{ - Instance: &dbg.Instance{Id: instance.GetId()}, - Fqbn: fqbn, - SketchPath: sketchPath.String(), - Port: port, - ImportFile: importFile, + Instance: &rpc.Instance{Id: instance.GetId()}, + Fqbn: fqbn, + SketchPath: sketchPath.String(), + Port: port, + Interpreter: interpreter, + ImportFile: importFile, }, os.Stdin, os.Stdout, ctrlc); err != nil { feedback.Errorf("Error during Debug: %v", err) os.Exit(errorcodes.ErrGeneric) diff --git a/commands/debug/debug.go b/commands/debug/debug.go index dc73031e3ee..102ab2176c1 100644 --- a/commands/debug/debug.go +++ b/commands/debug/debug.go @@ -126,12 +126,6 @@ func getCommandLine(req *dbg.DebugConfigReq, pm *packagemanager.PackageManager) return nil, errors.Wrap(err, "opening sketch") } - // FIXME: make a specification on how a port is specified via command line - port := req.GetPort() - if port == "" { - return nil, fmt.Errorf("no debug port provided") - } - fqbnIn := req.GetFqbn() if fqbnIn == "" && sketch != nil && sketch.Metadata != nil { fqbnIn = sketch.Metadata.CPU.Fqbn @@ -227,19 +221,27 @@ func getCommandLine(req *dbg.DebugConfigReq, pm *packagemanager.PackageManager) } // Set debug port property - toolProperties.Set("debug.port", port) - if strings.HasPrefix(port, "/dev/") { - toolProperties.Set("debug.port.file", port[5:]) + port := req.GetPort() + if port != "" { + toolProperties.Set("debug.port", port) + if strings.HasPrefix(port, "/dev/") { + toolProperties.Set("debug.port.file", port[5:]) + } else { + toolProperties.Set("debug.port.file", port) + } + } + + // Set debugger interpreter (default value should be "console") + interpreter := req.GetInterpreter() + if interpreter != "" { + toolProperties.Set("interpreter", interpreter) } else { - toolProperties.Set("debug.port.file", port) + toolProperties.Set("interpreter", "console") } // Build recipe for tool recipe := toolProperties.Get("debug.pattern") - // REMOVEME: hotfix for samd core 1.8.5 - if recipe == `"{path}/{cmd}" --interpreter=mi2 -ex "set pagination off" -ex 'target extended-remote | {tools.openocd.path}/{tools.openocd.cmd} -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' {build.path}/{build.project_name}.elf` { - recipe = `"{path}/{cmd}" --interpreter=mi2 -ex "set remotetimeout 5" -ex "set pagination off" -ex 'target extended-remote | "{tools.openocd.path}/{tools.openocd.cmd}" -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' "{build.path}/{build.project_name}.elf"` - } + cmdLine := toolProperties.ExpandPropsInString(recipe) cmdArgs, err := properties.SplitQuotedString(cmdLine, `"'`, false) if err != nil { diff --git a/rpc/commands/commands.pb.go b/rpc/commands/commands.pb.go index 780bbed2f1e..59fe7937ed8 100644 --- a/rpc/commands/commands.pb.go +++ b/rpc/commands/commands.pb.go @@ -8,8 +8,6 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" math "math" ) @@ -599,11 +597,11 @@ var fileDescriptor_3690061a1131852d = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConnInterface +var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 +const _ = grpc.SupportPackageIsVersion4 // ArduinoCoreClient is the client API for ArduinoCore service. // @@ -643,10 +641,10 @@ type ArduinoCoreClient interface { } type arduinoCoreClient struct { - cc grpc.ClientConnInterface + cc *grpc.ClientConn } -func NewArduinoCoreClient(cc grpc.ClientConnInterface) ArduinoCoreClient { +func NewArduinoCoreClient(cc *grpc.ClientConn) ArduinoCoreClient { return &arduinoCoreClient{cc} } @@ -1232,86 +1230,6 @@ type ArduinoCoreServer interface { LibraryList(context.Context, *LibraryListReq) (*LibraryListResp, error) } -// UnimplementedArduinoCoreServer can be embedded to have forward compatible implementations. -type UnimplementedArduinoCoreServer struct { -} - -func (*UnimplementedArduinoCoreServer) Init(req *InitReq, srv ArduinoCore_InitServer) error { - return status.Errorf(codes.Unimplemented, "method Init not implemented") -} -func (*UnimplementedArduinoCoreServer) Destroy(ctx context.Context, req *DestroyReq) (*DestroyResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method Destroy not implemented") -} -func (*UnimplementedArduinoCoreServer) Rescan(ctx context.Context, req *RescanReq) (*RescanResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method Rescan not implemented") -} -func (*UnimplementedArduinoCoreServer) UpdateIndex(req *UpdateIndexReq, srv ArduinoCore_UpdateIndexServer) error { - return status.Errorf(codes.Unimplemented, "method UpdateIndex not implemented") -} -func (*UnimplementedArduinoCoreServer) UpdateLibrariesIndex(req *UpdateLibrariesIndexReq, srv ArduinoCore_UpdateLibrariesIndexServer) error { - return status.Errorf(codes.Unimplemented, "method UpdateLibrariesIndex not implemented") -} -func (*UnimplementedArduinoCoreServer) Version(ctx context.Context, req *VersionReq) (*VersionResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") -} -func (*UnimplementedArduinoCoreServer) BoardDetails(ctx context.Context, req *BoardDetailsReq) (*BoardDetailsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method BoardDetails not implemented") -} -func (*UnimplementedArduinoCoreServer) BoardAttach(req *BoardAttachReq, srv ArduinoCore_BoardAttachServer) error { - return status.Errorf(codes.Unimplemented, "method BoardAttach not implemented") -} -func (*UnimplementedArduinoCoreServer) BoardList(ctx context.Context, req *BoardListReq) (*BoardListResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method BoardList not implemented") -} -func (*UnimplementedArduinoCoreServer) BoardListAll(ctx context.Context, req *BoardListAllReq) (*BoardListAllResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method BoardListAll not implemented") -} -func (*UnimplementedArduinoCoreServer) Compile(req *CompileReq, srv ArduinoCore_CompileServer) error { - return status.Errorf(codes.Unimplemented, "method Compile not implemented") -} -func (*UnimplementedArduinoCoreServer) PlatformInstall(req *PlatformInstallReq, srv ArduinoCore_PlatformInstallServer) error { - return status.Errorf(codes.Unimplemented, "method PlatformInstall not implemented") -} -func (*UnimplementedArduinoCoreServer) PlatformDownload(req *PlatformDownloadReq, srv ArduinoCore_PlatformDownloadServer) error { - return status.Errorf(codes.Unimplemented, "method PlatformDownload not implemented") -} -func (*UnimplementedArduinoCoreServer) PlatformUninstall(req *PlatformUninstallReq, srv ArduinoCore_PlatformUninstallServer) error { - return status.Errorf(codes.Unimplemented, "method PlatformUninstall not implemented") -} -func (*UnimplementedArduinoCoreServer) PlatformUpgrade(req *PlatformUpgradeReq, srv ArduinoCore_PlatformUpgradeServer) error { - return status.Errorf(codes.Unimplemented, "method PlatformUpgrade not implemented") -} -func (*UnimplementedArduinoCoreServer) Upload(req *UploadReq, srv ArduinoCore_UploadServer) error { - return status.Errorf(codes.Unimplemented, "method Upload not implemented") -} -func (*UnimplementedArduinoCoreServer) PlatformSearch(ctx context.Context, req *PlatformSearchReq) (*PlatformSearchResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method PlatformSearch not implemented") -} -func (*UnimplementedArduinoCoreServer) PlatformList(ctx context.Context, req *PlatformListReq) (*PlatformListResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method PlatformList not implemented") -} -func (*UnimplementedArduinoCoreServer) LibraryDownload(req *LibraryDownloadReq, srv ArduinoCore_LibraryDownloadServer) error { - return status.Errorf(codes.Unimplemented, "method LibraryDownload not implemented") -} -func (*UnimplementedArduinoCoreServer) LibraryInstall(req *LibraryInstallReq, srv ArduinoCore_LibraryInstallServer) error { - return status.Errorf(codes.Unimplemented, "method LibraryInstall not implemented") -} -func (*UnimplementedArduinoCoreServer) LibraryUninstall(req *LibraryUninstallReq, srv ArduinoCore_LibraryUninstallServer) error { - return status.Errorf(codes.Unimplemented, "method LibraryUninstall not implemented") -} -func (*UnimplementedArduinoCoreServer) LibraryUpgradeAll(req *LibraryUpgradeAllReq, srv ArduinoCore_LibraryUpgradeAllServer) error { - return status.Errorf(codes.Unimplemented, "method LibraryUpgradeAll not implemented") -} -func (*UnimplementedArduinoCoreServer) LibraryResolveDependencies(ctx context.Context, req *LibraryResolveDependenciesReq) (*LibraryResolveDependenciesResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method LibraryResolveDependencies not implemented") -} -func (*UnimplementedArduinoCoreServer) LibrarySearch(ctx context.Context, req *LibrarySearchReq) (*LibrarySearchResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method LibrarySearch not implemented") -} -func (*UnimplementedArduinoCoreServer) LibraryList(ctx context.Context, req *LibraryListReq) (*LibraryListResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method LibraryList not implemented") -} - func RegisterArduinoCoreServer(s *grpc.Server, srv ArduinoCoreServer) { s.RegisterService(&_ArduinoCore_serviceDesc, srv) } diff --git a/rpc/debug/debug.pb.go b/rpc/debug/debug.pb.go index 9c9d0e663db..6fb1f3c5ea6 100644 --- a/rpc/debug/debug.pb.go +++ b/rpc/debug/debug.pb.go @@ -6,10 +6,9 @@ package debug import ( context "context" fmt "fmt" + commands "github.com/arduino/arduino-cli/rpc/commands" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" math "math" ) @@ -90,15 +89,16 @@ func (m *DebugReq) GetSendInterrupt() bool { } type DebugConfigReq struct { - Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` - SketchPath string `protobuf:"bytes,3,opt,name=sketch_path,json=sketchPath,proto3" json:"sketch_path,omitempty"` - Port string `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"` - Verbose bool `protobuf:"varint,5,opt,name=verbose,proto3" json:"verbose,omitempty"` - ImportFile string `protobuf:"bytes,7,opt,name=import_file,json=importFile,proto3" json:"import_file,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Instance *commands.Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` + SketchPath string `protobuf:"bytes,3,opt,name=sketch_path,json=sketchPath,proto3" json:"sketch_path,omitempty"` + Port string `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"` + Interpreter string `protobuf:"bytes,5,opt,name=interpreter,proto3" json:"interpreter,omitempty"` + Verbose bool `protobuf:"varint,6,opt,name=verbose,proto3" json:"verbose,omitempty"` + ImportFile string `protobuf:"bytes,7,opt,name=import_file,json=importFile,proto3" json:"import_file,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *DebugConfigReq) Reset() { *m = DebugConfigReq{} } @@ -126,7 +126,7 @@ func (m *DebugConfigReq) XXX_DiscardUnknown() { var xxx_messageInfo_DebugConfigReq proto.InternalMessageInfo -func (m *DebugConfigReq) GetInstance() *Instance { +func (m *DebugConfigReq) GetInstance() *commands.Instance { if m != nil { return m.Instance } @@ -154,6 +154,13 @@ func (m *DebugConfigReq) GetPort() string { return "" } +func (m *DebugConfigReq) GetInterpreter() string { + if m != nil { + return m.Interpreter + } + return "" +} + func (m *DebugConfigReq) GetVerbose() bool { if m != nil { return m.Verbose @@ -216,89 +223,49 @@ func (m *DebugResp) GetError() string { return "" } -// TODO remove this in next proto refactoring because is a duplicate from commands/common.proto -type Instance struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Instance) Reset() { *m = Instance{} } -func (m *Instance) String() string { return proto.CompactTextString(m) } -func (*Instance) ProtoMessage() {} -func (*Instance) Descriptor() ([]byte, []int) { - return fileDescriptor_5ae24eab94cb53d5, []int{3} -} - -func (m *Instance) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Instance.Unmarshal(m, b) -} -func (m *Instance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Instance.Marshal(b, m, deterministic) -} -func (m *Instance) XXX_Merge(src proto.Message) { - xxx_messageInfo_Instance.Merge(m, src) -} -func (m *Instance) XXX_Size() int { - return xxx_messageInfo_Instance.Size(m) -} -func (m *Instance) XXX_DiscardUnknown() { - xxx_messageInfo_Instance.DiscardUnknown(m) -} - -var xxx_messageInfo_Instance proto.InternalMessageInfo - -func (m *Instance) GetId() int32 { - if m != nil { - return m.Id - } - return 0 -} - func init() { proto.RegisterType((*DebugReq)(nil), "cc.arduino.cli.debug.DebugReq") proto.RegisterType((*DebugConfigReq)(nil), "cc.arduino.cli.debug.DebugConfigReq") proto.RegisterType((*DebugResp)(nil), "cc.arduino.cli.debug.DebugResp") - proto.RegisterType((*Instance)(nil), "cc.arduino.cli.debug.Instance") } func init() { proto.RegisterFile("debug/debug.proto", fileDescriptor_5ae24eab94cb53d5) } var fileDescriptor_5ae24eab94cb53d5 = []byte{ - // 356 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x51, 0x4b, 0xeb, 0x30, - 0x18, 0xbd, 0xd9, 0x5d, 0xef, 0xba, 0x6f, 0xd7, 0x81, 0x61, 0x0f, 0x65, 0x0f, 0xdb, 0x28, 0x0a, - 0x45, 0xb0, 0x93, 0x89, 0x2f, 0x3e, 0x89, 0x8a, 0xb0, 0x17, 0x91, 0xbc, 0x08, 0xbe, 0x8c, 0x36, - 0xcd, 0xd6, 0x60, 0x97, 0x64, 0x69, 0xea, 0x5f, 0xf0, 0xef, 0xf9, 0x93, 0x24, 0x69, 0x3b, 0x14, - 0xc6, 0x5e, 0xda, 0x93, 0x93, 0x73, 0x0e, 0xa7, 0x5f, 0x3f, 0x38, 0xcd, 0x58, 0x5a, 0x6d, 0xe6, - 0xee, 0x19, 0x2b, 0x2d, 0x8d, 0xc4, 0x23, 0x4a, 0xe3, 0x44, 0x67, 0x15, 0x17, 0x32, 0xa6, 0x05, - 0x8f, 0xdd, 0x5d, 0xf8, 0x89, 0xc0, 0x7f, 0xb4, 0x88, 0xb0, 0x1d, 0xbe, 0x03, 0x3f, 0x6b, 0x70, - 0x80, 0x66, 0x28, 0x1a, 0x2c, 0xce, 0xe2, 0x43, 0xae, 0xd8, 0x39, 0x1e, 0xa4, 0x58, 0x73, 0xab, - 0x25, 0x7b, 0x17, 0xc6, 0xd0, 0xcd, 0x12, 0x93, 0x04, 0x9d, 0x19, 0x8a, 0xfe, 0x13, 0x87, 0xf1, - 0x39, 0x0c, 0x4b, 0x26, 0xb2, 0x15, 0x17, 0x86, 0x69, 0x5d, 0x29, 0x13, 0xfc, 0x9d, 0xa1, 0xc8, - 0x27, 0x27, 0x96, 0x5d, 0xb6, 0x64, 0xf8, 0x85, 0x60, 0xf8, 0x3b, 0x17, 0xdf, 0x82, 0xcf, 0x45, - 0x69, 0x12, 0x41, 0x59, 0xd3, 0x67, 0x72, 0xb8, 0xcf, 0xb2, 0x51, 0x91, 0xbd, 0xde, 0x36, 0x59, - 0xef, 0x52, 0xe1, 0x9a, 0xf4, 0x89, 0xc3, 0x78, 0x0a, 0x83, 0xf2, 0x9d, 0x19, 0x9a, 0xaf, 0x54, - 0x62, 0x72, 0x57, 0xa3, 0x4f, 0xa0, 0xa6, 0x5e, 0x12, 0x93, 0x5b, 0x93, 0x92, 0xda, 0x04, 0xdd, - 0xda, 0x64, 0x31, 0x0e, 0xa0, 0xf7, 0xc1, 0x74, 0x2a, 0x4b, 0x16, 0x78, 0xae, 0x77, 0x7b, 0xb4, - 0x71, 0x7c, 0x6b, 0x35, 0xab, 0x35, 0x2f, 0x58, 0xd0, 0xab, 0xe3, 0x6a, 0xea, 0x89, 0x17, 0x2c, - 0xbc, 0x81, 0x7e, 0x33, 0xdb, 0x52, 0xed, 0x47, 0x83, 0x7e, 0x8c, 0x66, 0x04, 0x1e, 0xd3, 0x5a, - 0xea, 0xa6, 0x65, 0x7d, 0x08, 0xc7, 0xe0, 0xb7, 0x1f, 0x84, 0x87, 0xd0, 0xe1, 0x99, 0xf3, 0x78, - 0xa4, 0xc3, 0xb3, 0xc5, 0x2b, 0x78, 0x2e, 0x12, 0x3f, 0xb7, 0x60, 0x72, 0xe4, 0x17, 0x11, 0xb6, - 0x1b, 0x4f, 0x8f, 0xde, 0x97, 0x2a, 0xfc, 0x13, 0xa1, 0x2b, 0x74, 0x7f, 0xf1, 0x16, 0x6d, 0xb8, - 0xc9, 0xab, 0x34, 0xa6, 0x72, 0x3b, 0x6f, 0xf4, 0xed, 0xfb, 0x92, 0x16, 0x7c, 0xae, 0x15, 0xad, - 0x17, 0x2a, 0xfd, 0xe7, 0x36, 0xea, 0xfa, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x52, 0x1d, 0x1f, - 0x66, 0x02, 0x00, 0x00, + // 371 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xdf, 0x4b, 0xeb, 0x30, + 0x18, 0xbd, 0xb9, 0x77, 0x3f, 0xba, 0xec, 0x3a, 0x30, 0x4c, 0x08, 0x7b, 0x70, 0xb5, 0x28, 0x14, + 0xc1, 0x56, 0x26, 0x3e, 0x0a, 0xa2, 0x22, 0xec, 0x45, 0x24, 0x2f, 0x82, 0x2f, 0xa3, 0x4d, 0xb3, + 0x35, 0xd8, 0x25, 0x59, 0x9a, 0xfa, 0x2f, 0xf8, 0x17, 0xfb, 0x2e, 0x49, 0xdb, 0x31, 0x45, 0xf6, + 0xd2, 0x9e, 0x9c, 0x9c, 0xf3, 0xe5, 0x7c, 0x5f, 0x02, 0x0f, 0x33, 0x96, 0x56, 0xab, 0xd8, 0x7d, + 0x23, 0xa5, 0xa5, 0x91, 0x68, 0x4c, 0x69, 0x94, 0xe8, 0xac, 0xe2, 0x42, 0x46, 0xb4, 0xe0, 0x91, + 0xdb, 0x9b, 0x1c, 0x51, 0xb9, 0x5e, 0x27, 0x22, 0x2b, 0x63, 0x0b, 0xa4, 0xa8, 0xc5, 0xc1, 0x07, + 0x80, 0xde, 0x83, 0x15, 0x10, 0xb6, 0x41, 0xb7, 0xd0, 0xcb, 0x1a, 0x8c, 0x81, 0x0f, 0xc2, 0xe1, + 0xec, 0x34, 0xfa, 0xad, 0x58, 0xe4, 0x1c, 0xf7, 0x52, 0x2c, 0xb9, 0xd5, 0x92, 0xad, 0x0b, 0x21, + 0xd8, 0xc9, 0x12, 0x93, 0xe0, 0xbf, 0x3e, 0x08, 0xff, 0x13, 0x87, 0xd1, 0x19, 0x1c, 0x95, 0x4c, + 0x64, 0x0b, 0x2e, 0x0c, 0xd3, 0xba, 0x52, 0x06, 0xff, 0xf3, 0x41, 0xe8, 0x91, 0x03, 0xcb, 0xce, + 0x5b, 0x32, 0xf8, 0x04, 0x70, 0xf4, 0xbd, 0x2e, 0xba, 0x81, 0x1e, 0x17, 0xa5, 0x49, 0x04, 0x65, + 0x4d, 0x9e, 0x93, 0x9f, 0x79, 0xda, 0xae, 0xa2, 0x79, 0x23, 0x24, 0x5b, 0x8b, 0x0d, 0xb3, 0xdc, + 0xa4, 0xc2, 0x85, 0x19, 0x10, 0x87, 0xd1, 0x14, 0x0e, 0xcb, 0x37, 0x66, 0x68, 0xbe, 0x50, 0x89, + 0xc9, 0x5d, 0x92, 0x01, 0x81, 0x35, 0xf5, 0x9c, 0x98, 0xdc, 0x9a, 0x94, 0xd4, 0x06, 0x77, 0x6a, + 0x93, 0xc5, 0xc8, 0x87, 0x43, 0x17, 0x5e, 0x69, 0x66, 0x98, 0xc6, 0x5d, 0xb7, 0xb5, 0x4b, 0x21, + 0x0c, 0xfb, 0xef, 0x4c, 0xa7, 0xb2, 0x64, 0xb8, 0xe7, 0x9a, 0x6b, 0x97, 0xf6, 0x40, 0xbe, 0xb6, + 0x55, 0x16, 0x4b, 0x5e, 0x30, 0xdc, 0xaf, 0x0f, 0xac, 0xa9, 0x47, 0x5e, 0xb0, 0xe0, 0x1a, 0x0e, + 0x9a, 0x0b, 0x28, 0xd5, 0x76, 0x7e, 0x60, 0x67, 0x7e, 0x63, 0xd8, 0x65, 0x5a, 0x4b, 0xdd, 0xf4, + 0x51, 0x2f, 0x66, 0x2f, 0xb0, 0xeb, 0x6c, 0xe8, 0xa9, 0x05, 0xc7, 0x7b, 0xee, 0x8a, 0xb0, 0xcd, + 0x64, 0xba, 0x77, 0xbf, 0x54, 0xc1, 0x9f, 0x10, 0x5c, 0x82, 0xbb, 0xf3, 0xd7, 0x70, 0xc5, 0x4d, + 0x5e, 0xa5, 0x76, 0xb6, 0x71, 0xa3, 0x6f, 0xff, 0x17, 0xb4, 0xe0, 0xb1, 0x56, 0xb4, 0x7e, 0x70, + 0x69, 0xcf, 0x3d, 0xa2, 0xab, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x84, 0x9e, 0x9f, 0x40, 0x86, + 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConnInterface +var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 +const _ = grpc.SupportPackageIsVersion4 // DebugClient is the client API for Debug service. // @@ -308,10 +275,10 @@ type DebugClient interface { } type debugClient struct { - cc grpc.ClientConnInterface + cc *grpc.ClientConn } -func NewDebugClient(cc grpc.ClientConnInterface) DebugClient { +func NewDebugClient(cc *grpc.ClientConn) DebugClient { return &debugClient{cc} } @@ -351,14 +318,6 @@ type DebugServer interface { Debug(Debug_DebugServer) error } -// UnimplementedDebugServer can be embedded to have forward compatible implementations. -type UnimplementedDebugServer struct { -} - -func (*UnimplementedDebugServer) Debug(srv Debug_DebugServer) error { - return status.Errorf(codes.Unimplemented, "method Debug not implemented") -} - func RegisterDebugServer(s *grpc.Server, srv DebugServer) { s.RegisterService(&_Debug_serviceDesc, srv) } diff --git a/rpc/debug/debug.proto b/rpc/debug/debug.proto index 498e5d2b4ea..77b54cb4461 100644 --- a/rpc/debug/debug.proto +++ b/rpc/debug/debug.proto @@ -19,10 +19,12 @@ package cc.arduino.cli.debug; option go_package = "github.com/arduino/arduino-cli/rpc/debug"; +import "commands/common.proto"; // Service that abstract a debug Session usage service Debug { - rpc Debug(stream DebugReq) returns (stream DebugResp) { } + rpc Debug (stream DebugReq) returns (stream DebugResp) { + } } // The top-level message sent by the client for the `Debug` method. @@ -46,20 +48,17 @@ message DebugReq { } message DebugConfigReq { - Instance instance = 1; + cc.arduino.cli.commands.Instance instance = 1; string fqbn = 2; string sketch_path = 3; string port = 4; - bool verbose = 5; + string interpreter = 5; + bool verbose = 6; string import_file = 7; } - // message DebugResp { bytes data = 1; string error = 2; } - -// TODO remove this in next proto refactoring because is a duplicate from commands/common.proto -message Instance { int32 id = 1; } diff --git a/rpc/monitor/monitor.pb.go b/rpc/monitor/monitor.pb.go index 1a06ba48521..78238c1565a 100644 --- a/rpc/monitor/monitor.pb.go +++ b/rpc/monitor/monitor.pb.go @@ -9,8 +9,6 @@ import ( proto "github.com/golang/protobuf/proto" _struct "github.com/golang/protobuf/ptypes/struct" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" math "math" ) @@ -268,11 +266,11 @@ var fileDescriptor_94d5950496a7550d = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConnInterface +var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 +const _ = grpc.SupportPackageIsVersion4 // MonitorClient is the client API for Monitor service. // @@ -282,10 +280,10 @@ type MonitorClient interface { } type monitorClient struct { - cc grpc.ClientConnInterface + cc *grpc.ClientConn } -func NewMonitorClient(cc grpc.ClientConnInterface) MonitorClient { +func NewMonitorClient(cc *grpc.ClientConn) MonitorClient { return &monitorClient{cc} } @@ -325,14 +323,6 @@ type MonitorServer interface { StreamingOpen(Monitor_StreamingOpenServer) error } -// UnimplementedMonitorServer can be embedded to have forward compatible implementations. -type UnimplementedMonitorServer struct { -} - -func (*UnimplementedMonitorServer) StreamingOpen(srv Monitor_StreamingOpenServer) error { - return status.Errorf(codes.Unimplemented, "method StreamingOpen not implemented") -} - func RegisterMonitorServer(s *grpc.Server, srv MonitorServer) { s.RegisterService(&_Monitor_serviceDesc, srv) } diff --git a/rpc/settings/settings.pb.go b/rpc/settings/settings.pb.go index 0537c7d9e3a..1bbc54f255d 100644 --- a/rpc/settings/settings.pb.go +++ b/rpc/settings/settings.pb.go @@ -8,8 +8,6 @@ import ( fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" math "math" ) @@ -277,11 +275,11 @@ var fileDescriptor_a4bfd59e429426d0 = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConnInterface +var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 +const _ = grpc.SupportPackageIsVersion4 // SettingsClient is the client API for Settings service. // @@ -294,10 +292,10 @@ type SettingsClient interface { } type settingsClient struct { - cc grpc.ClientConnInterface + cc *grpc.ClientConn } -func NewSettingsClient(cc grpc.ClientConnInterface) SettingsClient { +func NewSettingsClient(cc *grpc.ClientConn) SettingsClient { return &settingsClient{cc} } @@ -345,23 +343,6 @@ type SettingsServer interface { SetValue(context.Context, *Value) (*SetValueResponse, error) } -// UnimplementedSettingsServer can be embedded to have forward compatible implementations. -type UnimplementedSettingsServer struct { -} - -func (*UnimplementedSettingsServer) GetAll(ctx context.Context, req *GetAllRequest) (*RawData, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAll not implemented") -} -func (*UnimplementedSettingsServer) Merge(ctx context.Context, req *RawData) (*MergeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Merge not implemented") -} -func (*UnimplementedSettingsServer) GetValue(ctx context.Context, req *GetValueRequest) (*Value, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValue not implemented") -} -func (*UnimplementedSettingsServer) SetValue(ctx context.Context, req *Value) (*SetValueResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetValue not implemented") -} - func RegisterSettingsServer(s *grpc.Server, srv SettingsServer) { s.RegisterService(&_Settings_serviceDesc, srv) } From e83f37a6aee69ba5997d6c6b827d75612ea66c8b Mon Sep 17 00:00:00 2001 From: rsora Date: Thu, 19 Mar 2020 18:25:44 +0100 Subject: [PATCH 2/8] Update client_example main file --- client_example/go.sum | 89 ++++++++++++++++++++++++++++++++++++++++-- client_example/main.go | 2 +- 2 files changed, 87 insertions(+), 4 deletions(-) diff --git a/client_example/go.sum b/client_example/go.sum index b101220d43c..84db6b43a3e 100644 --- a/client_example/go.sum +++ b/client_example/go.sum @@ -1,87 +1,146 @@ bou.ke/monkey v1.0.1/go.mod h1:FgHuK96Rv2Nlf+0u1OOVDpCMdsWyOFmeeketDHE7LIg= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/arduino/board-discovery v0.0.0-20180823133458-1ba29327fb0c/go.mod h1:HK7SpkEax/3P+0w78iRQx1sz1vCDYYw9RXwHjQTB5i8= github.com/arduino/go-paths-helper v1.0.1/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck= github.com/arduino/go-properties-orderedmap v0.0.0-20190828172252-05018b28ff6c/go.mod h1:kiSuHm7yz3chiy8rb2MphC7ECn3MlkQFAIe4SXmQg6o= github.com/arduino/go-timeutils v0.0.0-20171220113728-d1dd9e313b1b/go.mod h1:uwGy5PpN4lqW97FiLnbcx+xx8jly5YuPMJWfVwwjJiQ= github.com/arduino/go-win32-utils v0.0.0-20180330194947-ed041402e83b/go.mod h1:iIPnclBMYm1g32Q5kXoqng4jLhMStReIP7ZxaoUC2y8= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cmaglie/pb v1.0.27 h1:ynGj8vBXR+dtj4B7Q/W/qGt31771Ux5iFfRQBnwdQiA= github.com/cmaglie/pb v1.0.27/go.mod h1:GilkKZMXYjBA4NxItWFfO+lwkp59PLHQ+IOW/b/kmZI= github.com/codeclysm/cc v1.2.2/go.mod h1:XtW4ArCNgQwFphcRGG9+sPX5WM1J6/u0gMy5ZdV3obA= github.com/codeclysm/extract v2.2.0+incompatible/go.mod h1:2nhFMPHiU9At61hz+12bfrlpXSUrOnK+wR+KlGO4Uks= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/creack/goselect v0.1.1/go.mod h1:a/NhLweNvqIYMuxcMOuWY516Cimucms3DglDzQP3hKY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fluxio/iohelpers v0.0.0-20160419043813-3a4dd67a94d2/go.mod h1:c7sGIpDbBo0JZZ1tKyC1p5smWf8QcUjK4bFtZjHAecg= github.com/fluxio/multierror v0.0.0-20160419044231-9c68d39025e5/go.mod h1:BEUDl7FG1cc76sM0J0x8dqr6RhiL4uqvk6oFkwuNyuM= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/h2non/filetype v1.0.8/go.mod h1:isekKqOuhMj+s/7r3rIeTErIRy4Rub5uBWHfvMusLMU= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= github.com/juju/testing v0.0.0-20190429233213-dfc56b8c09fc/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-runewidth v0.0.2 h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mdlayher/genetlink v0.0.0-20190313224034-60417448a851/go.mod h1:EsbsAEUEs15qC1cosAwxgCWV0Qhd8TmkxnA9Kw1Vhl4= +github.com/mdlayher/netlink v0.0.0-20190313131330-258ea9dff42c/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= +github.com/mdlayher/taskstats v0.0.0-20190313225729-7cbba52ee072/go.mod h1:sGdS7A6CAETR53zkdjGkgoFlh1vSm7MtX+i8XfEsTMA= github.com/miekg/dns v1.0.5/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/oleksandr/bonjour v0.0.0-20160508152359-5dcf00d8b228/go.mod h1:MGuVJ1+5TX1SCoO2Sx0eAnjpdRytYla2uC1YIZfkC9c= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmylund/sortutil v0.0.0-20120526081524-abeda66eb583/go.mod h1:sFPiU/UgDcsQVu3vkqpZLCXWFwUoQRpHGu9ATihPAl0= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5/go.mod h1:GEXHk5HgEKCvEIIrSpFI3ozzG5xOKA2DVlEX/gGnewM= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= +github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e/go.mod h1:tm/wZFQ8e24NYaBGIlnO2WGCAi67re4HHuOm0sftE/M= +github.com/segmentio/objconv v1.0.1/go.mod h1:auayaH5k3137Cl4SoXTgrzQcuQDmvuVtZgS0fb1Ahys= +github.com/segmentio/stats/v4 v4.5.3/go.mod h1:LsaahUJR7iiSs8mnkvQvdQ/RLHAS5adGLxuntg0ydGo= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= go.bug.st/cleanup v1.0.0/go.mod h1:EqVmTg2IBk4znLbPD28xne3abjsJftMdqqJEjhn70bk= go.bug.st/downloader v1.1.0 h1:LipC9rqRCe8kwa+ah3ZDfCqneVaf34cB/TKjXZiZt54= @@ -89,6 +148,11 @@ go.bug.st/downloader v1.1.0/go.mod h1:l+RPbNbrTB+MoAIp8nrZsP22nRPDy26XJZQqmm4gNT go.bug.st/relaxed-semver v0.0.0-20190922224835-391e10178d18/go.mod h1:Cx1VqMtEhE9pIkEyUj3LVVVPkv89dgW8aCKrRPDR/uE= go.bug.st/serial v1.0.0/go.mod h1:rpXPISGjuNjPTRTcMlxi9lN6LoIPxd1ixVjBd8aSk/Q= go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45/go.mod h1:dRSl/CVCTf56CkXgJMDOdSwNfo2g1orOGE/gBGdvjZw= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -97,19 +161,28 @@ golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvx golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 h1:ZBzSG/7F4eNKz2L3GE9o300RX0Az1Bw5HF7PDraD+qU= @@ -120,6 +193,8 @@ golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -133,13 +208,21 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90 h1:7THRSvPuzF1bql5kyFzX0JM0vpGhwuhskgJrJsbZ80Y= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0 h1:AzbTB6ux+okLTzP8Ru1Xs41C303zdcfEht7MQnYJt5A= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/client_example/main.go b/client_example/main.go index 314c4b44edd..9d9ecda6bad 100644 --- a/client_example/main.go +++ b/client_example/main.go @@ -823,7 +823,7 @@ func callDebugger(debugStreamingOpenClient dbg.Debug_DebugClient, instance *rpc. log.Printf("Send debug request") err := debugStreamingOpenClient.Send(&dbg.DebugReq{ DebugReq: &dbg.DebugConfigReq{ - Instance: &dbg.Instance{Id: instance.GetId()}, + Instance: &rpc.Instance{Id: instance.GetId()}, Fqbn: "arduino:samd:mkr1000", SketchPath: filepath.Join(currDir, "hello"), Port: "none", From 02b4a023a7f4e0a83ba6c665abfea6c4e4a12f7e Mon Sep 17 00:00:00 2001 From: rsora Date: Thu, 19 Mar 2020 18:42:42 +0100 Subject: [PATCH 3/8] Fix test import --- commands/debug/debug_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/debug/debug_test.go b/commands/debug/debug_test.go index 73d0a1f4c43..03beabc9c96 100644 --- a/commands/debug/debug_test.go +++ b/commands/debug/debug_test.go @@ -22,6 +22,7 @@ import ( "testing" "github.com/arduino/arduino-cli/arduino/cores/packagemanager" + rpc "github.com/arduino/arduino-cli/rpc/commands" dbg "github.com/arduino/arduino-cli/rpc/debug" "github.com/arduino/go-paths-helper" "github.com/stretchr/testify/assert" @@ -45,7 +46,7 @@ func TestGetCommandLine(t *testing.T) { // Arduino Zero has an integrated debugger port, anc it could be debugged directly using USB req := &dbg.DebugConfigReq{ - Instance: &dbg.Instance{Id: 1}, + Instance: &rpc.Instance{Id: 1}, Fqbn: "arduino-test:samd:arduino_zero_edbg", SketchPath: sketchPath.String(), Port: "none", @@ -66,7 +67,7 @@ func TestGetCommandLine(t *testing.T) { // Other samd boards such as mkr1000 can be debugged using an external tool such as Atmel ICE connected to // the board debug port req2 := &dbg.DebugConfigReq{ - Instance: &dbg.Instance{Id: 1}, + Instance: &rpc.Instance{Id: 1}, Fqbn: "arduino-test:samd:mkr1000", SketchPath: sketchPath.String(), Port: "none", From 8ee69b47eb0dc49d9b58533da5c24a5ee5e81742 Mon Sep 17 00:00:00 2001 From: rsora Date: Thu, 19 Mar 2020 18:53:01 +0100 Subject: [PATCH 4/8] Add interpreter resolution in debug test --- commands/debug/debug_test.go | 13 ++++++------- .../custom_hardware/arduino-test/samd/platform.txt | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/commands/debug/debug_test.go b/commands/debug/debug_test.go index 03beabc9c96..29053e093c5 100644 --- a/commands/debug/debug_test.go +++ b/commands/debug/debug_test.go @@ -49,11 +49,10 @@ func TestGetCommandLine(t *testing.T) { Instance: &rpc.Instance{Id: 1}, Fqbn: "arduino-test:samd:arduino_zero_edbg", SketchPath: sketchPath.String(), - Port: "none", } goldCommand := fmt.Sprintf("%s/arduino-test/tools/arm-none-eabi-gcc/7-2017q4/bin//arm-none-eabi-gdb%s", dataDir, toolExtension) + - " -ex target extended-remote |" + + " --interpreter=console -ex target extended-remote |" + fmt.Sprintf(" %s/arduino-test/tools/openocd/0.10.0-arduino7/bin/openocd%s", dataDir, toolExtension) + fmt.Sprintf(" -s \"%s/arduino-test/tools/openocd/0.10.0-arduino7/share/openocd/scripts/\"", dataDir) + fmt.Sprintf(" --file \"%s/arduino-test/samd/variants/arduino_zero/openocd_scripts/arduino_zero.cfg\"", customHardware) + @@ -67,14 +66,14 @@ func TestGetCommandLine(t *testing.T) { // Other samd boards such as mkr1000 can be debugged using an external tool such as Atmel ICE connected to // the board debug port req2 := &dbg.DebugConfigReq{ - Instance: &rpc.Instance{Id: 1}, - Fqbn: "arduino-test:samd:mkr1000", - SketchPath: sketchPath.String(), - Port: "none", + Instance: &rpc.Instance{Id: 1}, + Fqbn: "arduino-test:samd:mkr1000", + SketchPath: sketchPath.String(), + Interpreter: "mi1", } goldCommand2 := fmt.Sprintf("%s/arduino-test/tools/arm-none-eabi-gcc/7-2017q4/bin//arm-none-eabi-gdb%s", dataDir, toolExtension) + - " -ex target extended-remote |" + + " --interpreter=mi1 -ex target extended-remote |" + fmt.Sprintf(" %s/arduino-test/tools/openocd/0.10.0-arduino7/bin/openocd%s", dataDir, toolExtension) + fmt.Sprintf(" -s \"%s/arduino-test/tools/openocd/0.10.0-arduino7/share/openocd/scripts/\"", dataDir) + fmt.Sprintf(" --file \"%s/arduino-test/samd/variants/mkr1000/openocd_scripts/arduino_zero.cfg\"", customHardware) + diff --git a/commands/debug/testdata/custom_hardware/arduino-test/samd/platform.txt b/commands/debug/testdata/custom_hardware/arduino-test/samd/platform.txt index ded30da7c9e..66b53f78a95 100644 --- a/commands/debug/testdata/custom_hardware/arduino-test/samd/platform.txt +++ b/commands/debug/testdata/custom_hardware/arduino-test/samd/platform.txt @@ -228,4 +228,4 @@ tools.gdb.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ tools.gdb.cmd=arm-none-eabi-gdb tools.gdb.cmd.windows=arm-none-eabi-gdb.exe -tools.gdb.debug.pattern="{path}/{cmd}" -ex 'target extended-remote | {tools.openocd.path}/{tools.openocd.cmd} -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0" -c init -c halt' {build.path}/{build.project_name}.elf \ No newline at end of file +tools.gdb.debug.pattern="{path}/{cmd}" --interpreter={interpreter} -ex 'target extended-remote | {tools.openocd.path}/{tools.openocd.cmd} -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0" -c init -c halt' {build.path}/{build.project_name}.elf From 15d0254d30b75c626edeebb496a7ac445ec936b0 Mon Sep 17 00:00:00 2001 From: rsora Date: Fri, 20 Mar 2020 17:12:20 +0100 Subject: [PATCH 5/8] Updated testdata debug tool name --- .../custom_hardware/arduino-test/samd/boards.txt | 4 ++-- .../custom_hardware/arduino-test/samd/platform.txt | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/commands/debug/testdata/custom_hardware/arduino-test/samd/boards.txt b/commands/debug/testdata/custom_hardware/arduino-test/samd/boards.txt index ce473db2ef9..033fb584fa7 100644 --- a/commands/debug/testdata/custom_hardware/arduino-test/samd/boards.txt +++ b/commands/debug/testdata/custom_hardware/arduino-test/samd/boards.txt @@ -20,7 +20,7 @@ arduino_zero_edbg.name=Arduino Zero (Programming Port) arduino_zero_edbg.vid.0=0x03eb arduino_zero_edbg.pid.0=0x2157 -arduino_zero_edbg.debug.tool=gdb +arduino_zero_edbg.debug.tool=gdb-openocd arduino_zero_edbg.upload.tool=openocd arduino_zero_edbg.upload.protocol=sam-ba arduino_zero_edbg.upload.maximum_size=262144 @@ -55,7 +55,7 @@ mkr1000.pid.2=0x824e mkr1000.vid.3=0x2341 mkr1000.pid.3=0x024e -mkr1000.debug.tool=gdb +mkr1000.debug.tool=gdb-openocd mkr1000.upload.tool=bossac mkr1000.upload.protocol=sam-ba mkr1000.upload.maximum_size=262144 diff --git a/commands/debug/testdata/custom_hardware/arduino-test/samd/platform.txt b/commands/debug/testdata/custom_hardware/arduino-test/samd/platform.txt index 66b53f78a95..5e61eb4db44 100644 --- a/commands/debug/testdata/custom_hardware/arduino-test/samd/platform.txt +++ b/commands/debug/testdata/custom_hardware/arduino-test/samd/platform.txt @@ -224,8 +224,8 @@ tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose # GDB (Debugger) # -tools.gdb.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ -tools.gdb.cmd=arm-none-eabi-gdb -tools.gdb.cmd.windows=arm-none-eabi-gdb.exe - -tools.gdb.debug.pattern="{path}/{cmd}" --interpreter={interpreter} -ex 'target extended-remote | {tools.openocd.path}/{tools.openocd.cmd} -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0" -c init -c halt' {build.path}/{build.project_name}.elf +tools.gdb-openocd.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +tools.gdb-openocd.cmd=arm-none-eabi-gdb +tools.gdb-openocd.cmd.windows=arm-none-eabi-gdb.exe +tools.gdb-openocd.interpreter=console +tools.gdb-openocd.debug.pattern="{path}/{cmd}" --interpreter={interpreter} -ex 'target extended-remote | {tools.openocd.path}/{tools.openocd.cmd} -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0" -c init -c halt' {build.path}/{build.project_name}.elf From 543a2cfcfbb2ff427e0671974535521031c1cbda Mon Sep 17 00:00:00 2001 From: rsora Date: Fri, 20 Mar 2020 17:13:11 +0100 Subject: [PATCH 6/8] Reintroduce hotfix to do not break debug support for samd core 1.8.5 and 1.8.6 --- commands/debug/debug.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands/debug/debug.go b/commands/debug/debug.go index 102ab2176c1..85a9cb095de 100644 --- a/commands/debug/debug.go +++ b/commands/debug/debug.go @@ -242,6 +242,11 @@ func getCommandLine(req *dbg.DebugConfigReq, pm *packagemanager.PackageManager) // Build recipe for tool recipe := toolProperties.Get("debug.pattern") + // REMOVEME: hotfix for samd core 1.8.5/1.8.6 + if recipe == `"{path}/{cmd}" --interpreter=mi2 -ex "set pagination off" -ex 'target extended-remote | {tools.openocd.path}/{tools.openocd.cmd} -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' {build.path}/{build.project_name}.elf` { + recipe = `"{path}/{cmd}" --interpreter=mi2 -ex "set remotetimeout 5" -ex "set pagination off" -ex 'target extended-remote | "{tools.openocd.path}/{tools.openocd.cmd}" -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' "{build.path}/{build.project_name}.elf"` + } + cmdLine := toolProperties.ExpandPropsInString(recipe) cmdArgs, err := properties.SplitQuotedString(cmdLine, `"'`, false) if err != nil { From 021d460ccc48ec877ad5fa6fa14cda8409054a2c Mon Sep 17 00:00:00 2001 From: rsora Date: Fri, 20 Mar 2020 17:49:21 +0100 Subject: [PATCH 7/8] Add interpreter variable in hotfix --- commands/debug/debug.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/debug/debug.go b/commands/debug/debug.go index 85a9cb095de..ea546acdae5 100644 --- a/commands/debug/debug.go +++ b/commands/debug/debug.go @@ -243,8 +243,8 @@ func getCommandLine(req *dbg.DebugConfigReq, pm *packagemanager.PackageManager) recipe := toolProperties.Get("debug.pattern") // REMOVEME: hotfix for samd core 1.8.5/1.8.6 - if recipe == `"{path}/{cmd}" --interpreter=mi2 -ex "set pagination off" -ex 'target extended-remote | {tools.openocd.path}/{tools.openocd.cmd} -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' {build.path}/{build.project_name}.elf` { - recipe = `"{path}/{cmd}" --interpreter=mi2 -ex "set remotetimeout 5" -ex "set pagination off" -ex 'target extended-remote | "{tools.openocd.path}/{tools.openocd.cmd}" -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' "{build.path}/{build.project_name}.elf"` + if recipe == `"{path}/{cmd}" --interpreter={interpreter} -ex "set pagination off" -ex 'target extended-remote | {tools.openocd.path}/{tools.openocd.cmd} -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' {build.path}/{build.project_name}.elf` { + recipe = `"{path}/{cmd}" --interpreter={interpreter} -ex "set remotetimeout 5" -ex "set pagination off" -ex 'target extended-remote | "{tools.openocd.path}/{tools.openocd.cmd}" -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' "{build.path}/{build.project_name}.elf"` } cmdLine := toolProperties.ExpandPropsInString(recipe) From afe580e071254a479ec8ccd70745ed78d5fe8d8c Mon Sep 17 00:00:00 2001 From: rsora Date: Fri, 20 Mar 2020 18:01:49 +0100 Subject: [PATCH 8/8] Fix interpreter bug --- commands/debug/debug.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/debug/debug.go b/commands/debug/debug.go index ea546acdae5..ecc62064b39 100644 --- a/commands/debug/debug.go +++ b/commands/debug/debug.go @@ -243,7 +243,7 @@ func getCommandLine(req *dbg.DebugConfigReq, pm *packagemanager.PackageManager) recipe := toolProperties.Get("debug.pattern") // REMOVEME: hotfix for samd core 1.8.5/1.8.6 - if recipe == `"{path}/{cmd}" --interpreter={interpreter} -ex "set pagination off" -ex 'target extended-remote | {tools.openocd.path}/{tools.openocd.cmd} -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' {build.path}/{build.project_name}.elf` { + if recipe == `"{path}/{cmd}" --interpreter=mi2 -ex "set pagination off" -ex 'target extended-remote | {tools.openocd.path}/{tools.openocd.cmd} -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' {build.path}/{build.project_name}.elf` { recipe = `"{path}/{cmd}" --interpreter={interpreter} -ex "set remotetimeout 5" -ex "set pagination off" -ex 'target extended-remote | "{tools.openocd.path}/{tools.openocd.cmd}" -s "{tools.openocd.path}/share/openocd/scripts/" --file "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "gdb_port pipe" -c "telnet_port 0"' "{build.path}/{build.project_name}.elf"` } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy