From cf08dd66876f240fc967ea3ac62ef6758a2a2f19 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 10 Mar 2020 16:09:04 +0100 Subject: [PATCH] Use grpc enumerations for LibraryLayout and LibraryLocation --- arduino/libraries/libraries_layout.go | 13 ++ arduino/libraries/libraries_location.go | 32 ++++ cli/lib/list.go | 2 +- commands/lib/list.go | 4 +- rpc/commands/lib.pb.go | 211 ++++++++++++------------ rpc/commands/lib.proto | 10 +- 6 files changed, 159 insertions(+), 113 deletions(-) diff --git a/arduino/libraries/libraries_layout.go b/arduino/libraries/libraries_layout.go index e2ec6b9950c..a7f62e725fa 100644 --- a/arduino/libraries/libraries_layout.go +++ b/arduino/libraries/libraries_layout.go @@ -18,6 +18,8 @@ package libraries import ( "encoding/json" "fmt" + + rpc "github.com/arduino/arduino-cli/rpc/commands" ) // LibraryLayout represents how the library source code is laid out in the library @@ -65,3 +67,14 @@ func (d *LibraryLayout) UnmarshalJSON(b []byte) error { } return fmt.Errorf("invalid library layout: %s", s) } + +// ToRPCLibraryLayout converts this LibraryLayout to rpc.LibraryLayout +func (d *LibraryLayout) ToRPCLibraryLayout() rpc.LibraryLayout { + switch *d { + case FlatLayout: + return rpc.LibraryLayout_flat_layout + case RecursiveLayout: + return rpc.LibraryLayout_recursive_layout + } + panic(fmt.Sprintf("invalid LibraryLayout value %d", *d)) +} diff --git a/arduino/libraries/libraries_location.go b/arduino/libraries/libraries_location.go index 1e36b4e3fd1..5761652197f 100644 --- a/arduino/libraries/libraries_location.go +++ b/arduino/libraries/libraries_location.go @@ -18,6 +18,8 @@ package libraries import ( "encoding/json" "fmt" + + rpc "github.com/arduino/arduino-cli/rpc/commands" ) // LibraryLocation represents where the library is installed @@ -82,3 +84,33 @@ func (d *LibraryLocation) UnmarshalJSON(b []byte) error { } return fmt.Errorf("invalid library location: %s", s) } + +// ToRPCLibraryLocation converts this LibraryLocation to rpc.LibraryLocation +func (d *LibraryLocation) ToRPCLibraryLocation() rpc.LibraryLocation { + switch *d { + case IDEBuiltIn: + return rpc.LibraryLocation_ide_builtin + case PlatformBuiltIn: + return rpc.LibraryLocation_platform_builtin + case ReferencedPlatformBuiltIn: + return rpc.LibraryLocation_referenced_platform_builtin + case User: + return rpc.LibraryLocation_user + } + panic(fmt.Sprintf("invalid LibraryLocation value %d", *d)) +} + +// FromRPCLibraryLocation converts a rpc.LibraryLocation to a LibraryLocation +func FromRPCLibraryLocation(l rpc.LibraryLocation) LibraryLocation { + switch l { + case rpc.LibraryLocation_ide_builtin: + return IDEBuiltIn + case rpc.LibraryLocation_platform_builtin: + return PlatformBuiltIn + case rpc.LibraryLocation_referenced_platform_builtin: + return ReferencedPlatformBuiltIn + case rpc.LibraryLocation_user: + return User + } + panic(fmt.Sprintf("invalid rpc.LibraryLocation value %d", l)) +} diff --git a/cli/lib/list.go b/cli/lib/list.go index 2fb1b5d75d4..80eeb566ffb 100644 --- a/cli/lib/list.go +++ b/cli/lib/list.go @@ -102,7 +102,7 @@ func (ir installedResult) String() string { lastName = name } - location := lib.GetLocation() + location := lib.GetLocation().String() if lib.ContainerPlatform != "" { location = lib.GetContainerPlatform() } diff --git a/commands/lib/list.go b/commands/lib/list.go index 95410282935..5839e0f5424 100644 --- a/commands/lib/list.go +++ b/commands/lib/list.go @@ -107,9 +107,9 @@ func GetOutputLibrary(lib *libraries.Library) *rpc.Library { InstallDir: insdir, SourceDir: srcdir, UtilityDir: utldir, - Location: lib.Location.String(), + Location: lib.Location.ToRPCLibraryLocation(), ContainerPlatform: cntplat, - Layout: lib.Layout.String(), + Layout: lib.Layout.ToRPCLibraryLayout(), RealName: lib.RealName, DotALinkage: lib.DotALinkage, Precompiled: lib.Precompiled, diff --git a/rpc/commands/lib.pb.go b/rpc/commands/lib.pb.go index 1254821e687..cefe6232ee5 100644 --- a/rpc/commands/lib.pb.go +++ b/rpc/commands/lib.pb.go @@ -49,23 +49,23 @@ type LibraryLocation int32 const ( LibraryLocation_ide_builtin LibraryLocation = 0 - LibraryLocation_platform_builtin LibraryLocation = 1 - LibraryLocation_referenced_platform_builtin LibraryLocation = 2 - LibraryLocation_sketchbook LibraryLocation = 3 + LibraryLocation_user LibraryLocation = 1 + LibraryLocation_platform_builtin LibraryLocation = 2 + LibraryLocation_referenced_platform_builtin LibraryLocation = 3 ) var LibraryLocation_name = map[int32]string{ 0: "ide_builtin", - 1: "platform_builtin", - 2: "referenced_platform_builtin", - 3: "sketchbook", + 1: "user", + 2: "platform_builtin", + 3: "referenced_platform_builtin", } var LibraryLocation_value = map[string]int32{ "ide_builtin": 0, - "platform_builtin": 1, - "referenced_platform_builtin": 2, - "sketchbook": 3, + "user": 1, + "platform_builtin": 2, + "referenced_platform_builtin": 3, } func (x LibraryLocation) String() string { @@ -1149,9 +1149,7 @@ type Library struct { InstallDir string `protobuf:"bytes,10,opt,name=install_dir,json=installDir,proto3" json:"install_dir,omitempty"` SourceDir string `protobuf:"bytes,11,opt,name=source_dir,json=sourceDir,proto3" json:"source_dir,omitempty"` UtilityDir string `protobuf:"bytes,12,opt,name=utility_dir,json=utilityDir,proto3" json:"utility_dir,omitempty"` - Location string `protobuf:"bytes,13,opt,name=location,proto3" json:"location,omitempty"` ContainerPlatform string `protobuf:"bytes,14,opt,name=container_platform,json=containerPlatform,proto3" json:"container_platform,omitempty"` - Layout string `protobuf:"bytes,15,opt,name=layout,proto3" json:"layout,omitempty"` RealName string `protobuf:"bytes,16,opt,name=real_name,json=realName,proto3" json:"real_name,omitempty"` DotALinkage bool `protobuf:"varint,17,opt,name=dot_a_linkage,json=dotALinkage,proto3" json:"dot_a_linkage,omitempty"` Precompiled bool `protobuf:"varint,18,opt,name=precompiled,proto3" json:"precompiled,omitempty"` @@ -1160,6 +1158,8 @@ type Library struct { Version string `protobuf:"bytes,21,opt,name=version,proto3" json:"version,omitempty"` License string `protobuf:"bytes,22,opt,name=license,proto3" json:"license,omitempty"` Properties map[string]string `protobuf:"bytes,23,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Location LibraryLocation `protobuf:"varint,24,opt,name=location,proto3,enum=cc.arduino.cli.commands.LibraryLocation" json:"location,omitempty"` + Layout LibraryLayout `protobuf:"varint,25,opt,name=layout,proto3,enum=cc.arduino.cli.commands.LibraryLayout" json:"layout,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1274,13 +1274,6 @@ func (m *Library) GetUtilityDir() string { return "" } -func (m *Library) GetLocation() string { - if m != nil { - return m.Location - } - return "" -} - func (m *Library) GetContainerPlatform() string { if m != nil { return m.ContainerPlatform @@ -1288,13 +1281,6 @@ func (m *Library) GetContainerPlatform() string { return "" } -func (m *Library) GetLayout() string { - if m != nil { - return m.Layout - } - return "" -} - func (m *Library) GetRealName() string { if m != nil { return m.RealName @@ -1351,6 +1337,20 @@ func (m *Library) GetProperties() map[string]string { return nil } +func (m *Library) GetLocation() LibraryLocation { + if m != nil { + return m.Location + } + return LibraryLocation_ide_builtin +} + +func (m *Library) GetLayout() LibraryLayout { + if m != nil { + return m.Layout + } + return LibraryLayout_flat_layout +} + func init() { proto.RegisterEnum("cc.arduino.cli.commands.LibraryLayout", LibraryLayout_name, LibraryLayout_value) proto.RegisterEnum("cc.arduino.cli.commands.LibraryLocation", LibraryLocation_name, LibraryLocation_value) @@ -1382,84 +1382,85 @@ func init() { func init() { proto.RegisterFile("commands/lib.proto", fileDescriptor_9feed0d29806df6c) } var fileDescriptor_9feed0d29806df6c = []byte{ - // 1261 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xdd, 0x6f, 0x1b, 0x45, - 0x10, 0xe7, 0xec, 0x36, 0xb1, 0xc7, 0x71, 0xed, 0x6c, 0xd3, 0xf6, 0x48,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 0x33, - 0x35, 0xa7, 0x21, 0x9b, 0xd0, 0x50, 0x98, 0x6a, 0x34, 0x93, 0x73, 0xa6, 0xb0, 0x56, 0x32, 0x79, - 0x07, 0x9a, 0x19, 0x95, 0x74, 0x20, 0x69, 0x36, 0xf4, 0xcf, 0x16, 0xc6, 0x99, 0xc2, 0xe4, 0x7c, - 0x89, 0x7d, 0xc5, 0x34, 0xfa, 0x2b, 0x36, 0xa7, 0x13, 0x4d, 0xcc, 0x98, 0x6a, 0x1c, 0x08, 0x39, - 0xf5, 0x57, 0x6d, 0xcc, 0x52, 0x26, 0xef, 0x41, 0xdb, 0x34, 0x89, 0x69, 0x8c, 0x75, 0x2e, 0x51, - 0xf9, 0x8d, 0xad, 0xfa, 0x76, 0x33, 0x5c, 0x54, 0x9a, 0x81, 0xd4, 0xd3, 0x0c, 0x95, 0xdf, 0x2c, - 0xac, 0x56, 0x20, 0x9f, 0x43, 0x53, 0xa2, 0x12, 0xb9, 0x8c, 0x51, 0xf9, 0x70, 0x42, 0x6a, 0x0c, - 0x9d, 0x47, 0x38, 0xf3, 0x35, 0xd0, 0x39, 0x8b, 0x31, 0x55, 0xe8, 0xb7, 0x2c, 0x74, 0x27, 0x92, - 0x1b, 0xb0, 0x9e, 0x49, 0x31, 0x61, 0x09, 0xaa, 0x88, 0xa5, 0x31, 0xcf, 0x13, 0x54, 0xfe, 0x5a, - 0x01, 0xa2, 0x5b, 0x1a, 0x1e, 0x39, 0x3d, 0x79, 0xbc, 0xc4, 0x32, 0xed, 0x62, 0x3e, 0x77, 0x4e, - 0xce, 0x32, 0x4b, 0xfc, 0xf2, 0xbc, 0x5a, 0xb8, 0xd9, 0x91, 0x23, 0x97, 0xe2, 0x26, 0x10, 0xd7, - 0xdf, 0x28, 0x16, 0xa9, 0xd2, 0xd2, 0xf4, 0xd3, 0x75, 0x7e, 0xdd, 0x59, 0x3e, 0xab, 0x0c, 0xc1, - 0x2f, 0x1e, 0x74, 0x97, 0xcb, 0x61, 0x46,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 0x7f, 0x2e, 0xc6, 0xe6, 0x5d, 0xe8, 0x2c, 0x99, 0x8f, 0x78, 0xb8, 0x37, 0xe6, 0x1f, 0xee, - 0xe6, 0xdc, 0x7b, 0xbc, 0x73, 0x1b, 0xda, 0x25, 0x4d, 0xd8, 0x82, 0x77, 0xa0, 0x75, 0xc0, 0xa9, - 0x8e, 0x6c, 0xfd, 0xbb, 0x6f, 0x91, 0x0d, 0xe8, 0x4a, 0x8c, 0x73, 0xa9, 0xd8, 0x04, 0x4b, 0xad, - 0xb7, 0x33, 0x47, 0x2f, 0x65, 0xc7, 0x3b, 0xd0, 0x62, 0x09, 0x46, 0xfd, 0x9c, 0x71, 0xcd, 0x52, - 0xeb, 0x59, 0x36, 0xbe, 0xd2, 0x7a, 0xe4, 0x1a, 0x5c, 0x96, 0x78, 0x80, 0xd2, 0xac, 0x4c, 0x12, - 0x1d, 0x3a, 0x50, 0x23, 0xe7, 0x00, 0xd4, 0x08, 0x75, 0x3c, 0xec, 0x0b, 0x31, 0xea, 0xd6, 0x3f, - 0xbd, 0xf9, 0xe5, 0x8d, 0x01, 0xd3, 0xc3, 0xbc, 0x6f, 0x0a, 0xb3, 0xeb, 0x0a, 0x55, 0xfe, 0xbd, - 0x19, 0x73, 0xb6, 0x2b, 0xb3, 0x78, 0xb7, 0x2c, 0x5a, 0x7f, 0xa5, 0xf8, 0xd7, 0xfe, 0xa3, 0xbf, - 0x02, 0x00, 0x00, 0xff, 0xff, 0x02, 0x41, 0xe8, 0x67, 0x20, 0x10, 0x00, 0x00, + // 1276 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcd, 0x6f, 0xdc, 0x44, + 0x14, 0xaf, 0x77, 0xdb, 0x64, 0xf7, 0x6d, 0xd2, 0x38, 0xd3, 0xb4, 0x75, 0x53, 0xda, 0x2e, 0x16, + 0x1f, 0xdb, 0x54, 0xd9, 0xa0,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x1b, 0x6b, 0x25, 0x93, 0xb7, 0xa0, + 0x99, 0x51, 0x41, 0xfb, 0x82, 0x66, 0xfb, 0xde, 0x05, 0x63, 0x1c, 0x2b, 0xf4, 0x99, 0xaf, 0xb1, + 0x27, 0x99, 0x42, 0x6f, 0xa1, 0x38, 0xd3, 0x8a, 0x3a, 0x67, 0x44, 0x15, 0xf6, 0x53, 0x31, 0xf2, + 0x16, 0x8b, 0x9c, 0xa5, 0x4c, 0xde, 0x81, 0x65, 0xdd, 0x24, 0xa6, 0x30, 0x52, 0xb9, 0x40, 0xe9, + 0x35, 0xda, 0xf5, 0x4e, 0x33, 0x98, 0x56, 0xea, 0x81, 0x54, 0xa3, 0x0c, 0xa5, 0xd7, 0x34, 0xd6, + 0x42, 0x20, 0x9f, 0x43, 0x53, 0xa0, 0x4c, 0x73, 0x11, 0xa1, 0xf4, 0xe0, 0x94, 0xd4, 0x18, 0xd8, + 0x88, 0x60, 0x1c, 0xab, 0xa1, 0x73, 0x16, 0x61, 0x22, 0xd1, 0x6b, 0x15, 0xd0, 0xad, 0x48, 0xee, + 0xc0, 0x6a, 0x26, 0xd2, 0x21, 0x8b, 0x51, 0x86, 0x2c, 0x89, 0x78, 0x1e, 0xa3, 0xf4, 0x96, 0x0c, + 0x08, 0xb7, 0x34, 0x3c, 0xb1, 0x7a, 0xf2, 0x74, 0x86, 0x65, 0x96, 0xcd, 0x7c, 0x6e, 0x9c, 0x9e, + 0x65, 0x66, 0xf8, 0xe5, 0x65, 0xb5, 0x70, 0x63, 0x97, 0x23, 0x97, 0x62, 0x13, 0x88, 0xed, 0x6f, + 0x18, 0xa5, 0x89, 0x54, 0x42, 0xf7, 0xd3, 0x76, 0x7e, 0xd5, 0x5a, 0x3e, 0xab, 0x0c, 0xfe, 0x2f, + 0x0e, 0xb8, 0xb3, 0xd7, 0xa1, 0x47, 0x36, 0x17, 0xbc, 0x1c, 0xd9, 0x5c, 0x70, 0x4d, 0x57, 0xa6, + 0x0b, 0x43, 0x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x1c, 0xc6, 0x3b, 0xb0, 0x51, 0xeb, 0x0f, 0x60, 0x65, 0x06, 0xe4, 0x11, 0x9f, 0x02, 0x6b, 0x93, + 0x9f, 0x02, 0xcd, 0x89, 0x37, 0xfc, 0xc6, 0x3d, 0x58, 0x9e, 0xca, 0x4b, 0x56, 0xa0, 0xb5, 0xc7, + 0xa9, 0x0a, 0x8b, 0xf4, 0xee, 0x39, 0xb2, 0x06, 0xae, 0xc0, 0x28, 0x17, 0x92, 0x0d, 0xb1, 0xd4, + 0x3a, 0x1b, 0xd1, 0x98, 0xb0, 0xca, 0x4a, 0x56, 0xa0, 0xc5, 0x62, 0x0c, 0x7b, 0x39, 0xe3, 0x8a, + 0x25, 0xee, 0x39, 0xd2, 0x80, 0xf3, 0xb9, 0x44, 0xe1, 0x3a, 0x3a, 0x47, 0x39, 0x70, 0x95, 0xbd, + 0x46, 0x6e, 0xc1, 0x75, 0x81, 0x7b, 0x28, 0xf4, 0x3a, 0xc6, 0xe1, 0x21, 0x87, 0xfa, 0xa7, 0x9b, + 0x5f, 0xde, 0xe9, 0x33, 0xb5, 0x9f, 0xf7, 0xf4, 0x25, 0x6c, 0xd9, 0x4b, 0x29, 0xff, 0x6e, 0x46, + 0x9c, 0x6d, 0x89, 0x2c, 0xda, 0x2a, 0x2f, 0xa8, 0xb7, 0x60, 0x7e, 0x26, 0xf8, 0xf0, 0xaf, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x9c, 0x45, 0xeb, 0x72, 0x6c, 0x10, 0x00, 0x00, } diff --git a/rpc/commands/lib.proto b/rpc/commands/lib.proto index 2de44ab28e2..a1ddb861f83 100644 --- a/rpc/commands/lib.proto +++ b/rpc/commands/lib.proto @@ -149,9 +149,7 @@ message Library { string install_dir = 10; string source_dir = 11; string utility_dir = 12; - string location = 13; string container_platform = 14; - string layout = 15; string real_name = 16; bool dot_a_linkage = 17; bool precompiled = 18; @@ -160,6 +158,8 @@ message Library { string version = 21; string license = 22; map properties = 23; + LibraryLocation location = 24; + LibraryLayout layout = 25; } enum LibraryLayout { @@ -169,7 +169,7 @@ enum LibraryLayout { enum LibraryLocation { ide_builtin = 0; - platform_builtin = 1; - referenced_platform_builtin = 2; - sketchbook = 3; + user = 1; // (sketchbook) + platform_builtin = 2; + referenced_platform_builtin = 3; }