diff --git a/arduino/libraries/libraries.go b/arduino/libraries/libraries.go index b31f546aa74..25241d4f38a 100644 --- a/arduino/libraries/libraries.go +++ b/arduino/libraries/libraries.go @@ -17,6 +17,7 @@ package libraries import ( "github.com/arduino/arduino-cli/arduino/cores" + rpc "github.com/arduino/arduino-cli/rpc/commands" paths "github.com/arduino/go-paths-helper" properties "github.com/arduino/go-properties-orderedmap" semver "go.bug.st/relaxed-semver" @@ -58,9 +59,9 @@ type Library struct { InstallDir *paths.Path SourceDir *paths.Path UtilityDir *paths.Path - Location LibraryLocation + Location rpc.LibraryLocation ContainerPlatform *cores.PlatformRelease `json:""` - Layout LibraryLayout + Layout rpc.LibraryLayout RealName string DotALinkage bool Precompiled bool @@ -125,7 +126,7 @@ func (library *Library) SourceDirs() []SourceDir { dirs = append(dirs, SourceDir{ Dir: library.SourceDir, - Recurse: library.Layout == RecursiveLayout, + Recurse: library.Layout == rpc.LibraryLayout_recursive_layout, }) if library.UtilityDir != nil { dirs = append(dirs, diff --git a/arduino/libraries/libraries_layout.go b/arduino/libraries/libraries_layout.go deleted file mode 100644 index e2ec6b9950c..00000000000 --- a/arduino/libraries/libraries_layout.go +++ /dev/null @@ -1,67 +0,0 @@ -// This file is part of arduino-cli. -// -// Copyright 2020 ARDUINO SA (http://www.arduino.cc/) -// -// This software is released under the GNU General Public License version 3, -// which covers the main part of arduino-cli. -// The terms of this license can be found at: -// https://www.gnu.org/licenses/gpl-3.0.en.html -// -// You can be released from the requirements of the above licenses by purchasing -// a commercial license. Buying such a license is mandatory if you want to -// modify or otherwise use the software for commercial activities involving the -// Arduino software without disclosing the source code of your own applications. -// To purchase a commercial license, send an email to license@arduino.cc. - -package libraries - -import ( - "encoding/json" - "fmt" -) - -// LibraryLayout represents how the library source code is laid out in the library -type LibraryLayout uint16 - -const ( - // FlatLayout is a library without a `src` directory - FlatLayout LibraryLayout = iota - // RecursiveLayout is a library with `src` directory (that allows recursive build) - RecursiveLayout -) - -func (d *LibraryLayout) String() string { - switch *d { - case FlatLayout: - return "flat" - case RecursiveLayout: - return "recursive" - } - panic(fmt.Sprintf("invalid LibraryLayout value %d", *d)) -} - -// MarshalJSON implements the json.Marshaler interface -func (d *LibraryLayout) MarshalJSON() ([]byte, error) { - switch *d { - case FlatLayout: - return json.Marshal("flat") - case RecursiveLayout: - return json.Marshal("recursive") - } - return nil, fmt.Errorf("invalid library layout value: %d", *d) -} - -// UnmarshalJSON implements the json.Unmarshaler interface -func (d *LibraryLayout) UnmarshalJSON(b []byte) error { - var s string - if err := json.Unmarshal(b, &s); err != nil { - return err - } - switch s { - case "flat": - *d = FlatLayout - case "recursive": - *d = RecursiveLayout - } - return fmt.Errorf("invalid library layout: %s", s) -} diff --git a/arduino/libraries/libraries_location.go b/arduino/libraries/libraries_location.go deleted file mode 100644 index 1e36b4e3fd1..00000000000 --- a/arduino/libraries/libraries_location.go +++ /dev/null @@ -1,84 +0,0 @@ -// This file is part of arduino-cli. -// -// Copyright 2020 ARDUINO SA (http://www.arduino.cc/) -// -// This software is released under the GNU General Public License version 3, -// which covers the main part of arduino-cli. -// The terms of this license can be found at: -// https://www.gnu.org/licenses/gpl-3.0.en.html -// -// You can be released from the requirements of the above licenses by purchasing -// a commercial license. Buying such a license is mandatory if you want to -// modify or otherwise use the software for commercial activities involving the -// Arduino software without disclosing the source code of your own applications. -// To purchase a commercial license, send an email to license@arduino.cc. - -package libraries - -import ( - "encoding/json" - "fmt" -) - -// LibraryLocation represents where the library is installed -type LibraryLocation int - -// The enumeration is listed in ascending order of priority -const ( - // IDEBuiltIn are libraries bundled in the IDE - IDEBuiltIn = iota - // PlatformBuiltIn are libraries bundled in a PlatformRelease - PlatformBuiltIn - // ReferencedPlatformBuiltIn are libraries bundled in a PlatformRelease referenced for build - ReferencedPlatformBuiltIn - // User are user installed libraries - User -) - -func (d *LibraryLocation) String() string { - switch *d { - case IDEBuiltIn: - return "ide" - case PlatformBuiltIn: - return "platform" - case ReferencedPlatformBuiltIn: - return "ref-platform" - case User: - return "user" - } - panic(fmt.Sprintf("invalid LibraryLocation value %d", *d)) -} - -// MarshalJSON implements the json.Marshaler interface -func (d *LibraryLocation) MarshalJSON() ([]byte, error) { - switch *d { - case IDEBuiltIn: - return json.Marshal("ide") - case PlatformBuiltIn: - return json.Marshal("platform") - case ReferencedPlatformBuiltIn: - return json.Marshal("ref-platform") - case User: - return json.Marshal("user") - } - return nil, fmt.Errorf("invalid library location value: %d", *d) -} - -// UnmarshalJSON implements the json.Unmarshaler interface -func (d *LibraryLocation) UnmarshalJSON(b []byte) error { - var s string - if err := json.Unmarshal(b, &s); err != nil { - return err - } - switch s { - case "ide": - *d = IDEBuiltIn - case "platform": - *d = PlatformBuiltIn - case "ref-platform": - *d = ReferencedPlatformBuiltIn - case "user": - *d = User - } - return fmt.Errorf("invalid library location: %s", s) -} diff --git a/arduino/libraries/librariesmanager/install.go b/arduino/libraries/librariesmanager/install.go index b81fbdb72d6..9eefd2843c8 100644 --- a/arduino/libraries/librariesmanager/install.go +++ b/arduino/libraries/librariesmanager/install.go @@ -22,6 +22,7 @@ import ( "github.com/arduino/arduino-cli/arduino/libraries" "github.com/arduino/arduino-cli/arduino/libraries/librariesindex" "github.com/arduino/arduino-cli/arduino/utils" + rpc "github.com/arduino/arduino-cli/rpc/commands" paths "github.com/arduino/go-paths-helper" ) @@ -40,7 +41,7 @@ func (lm *LibrariesManager) InstallPrerequisiteCheck(indexLibrary *librariesinde var replaced *libraries.Library if installedLibs, have := lm.Libraries[saneName]; have { for _, installedLib := range installedLibs.Alternatives { - if installedLib.Location != libraries.User { + if installedLib.Location != rpc.LibraryLocation_user { continue } if installedLib.Version.Equal(indexLibrary.Version) { diff --git a/arduino/libraries/librariesmanager/librariesmanager.go b/arduino/libraries/librariesmanager/librariesmanager.go index b8d170f6820..4f1e003bf62 100644 --- a/arduino/libraries/librariesmanager/librariesmanager.go +++ b/arduino/libraries/librariesmanager/librariesmanager.go @@ -23,6 +23,7 @@ import ( "github.com/arduino/arduino-cli/arduino/libraries" "github.com/arduino/arduino-cli/arduino/libraries/librariesindex" "github.com/arduino/arduino-cli/arduino/utils" + rpc "github.com/arduino/arduino-cli/rpc/commands" paths "github.com/arduino/go-paths-helper" "github.com/pmylund/sortutil" "github.com/sirupsen/logrus" @@ -43,7 +44,7 @@ type LibrariesManager struct { // LibrariesDir is a directory containing libraries type LibrariesDir struct { Path *paths.Path - Location libraries.LibraryLocation + Location rpc.LibraryLocation PlatformRelease *cores.PlatformRelease } @@ -122,7 +123,7 @@ func (sc *LibrariesManager) LoadIndex() error { // AddLibrariesDir adds path to the list of directories // to scan when searching for libraries. If a path is already // in the list it is ignored. -func (sc *LibrariesManager) AddLibrariesDir(path *paths.Path, location libraries.LibraryLocation) { +func (sc *LibrariesManager) AddLibrariesDir(path *paths.Path, location rpc.LibraryLocation) { for _, dir := range sc.LibrariesDir { if dir.Path.EquivalentTo(path) { return @@ -138,7 +139,7 @@ func (sc *LibrariesManager) AddLibrariesDir(path *paths.Path, location libraries // AddPlatformReleaseLibrariesDir add the libraries directory in the // specified PlatformRelease to the list of directories to scan when // searching for libraries. -func (sc *LibrariesManager) AddPlatformReleaseLibrariesDir(plaftormRelease *cores.PlatformRelease, location libraries.LibraryLocation) { +func (sc *LibrariesManager) AddPlatformReleaseLibrariesDir(plaftormRelease *cores.PlatformRelease, location rpc.LibraryLocation) { path := plaftormRelease.GetLibrariesDir() if path == nil { return @@ -168,7 +169,7 @@ func (sc *LibrariesManager) RescanLibraries() error { func (sc *LibrariesManager) getUserLibrariesDir() *paths.Path { for _, dir := range sc.LibrariesDir { - if dir.Location == libraries.User { + if dir.Location == rpc.LibraryLocation_user { return dir.Path } } @@ -216,7 +217,7 @@ func (sc *LibrariesManager) FindByReference(libRef *librariesindex.Reference) *l // TODO: Move "search into user" into another method... if libRef.Version == nil { for _, candidate := range alternatives.Alternatives { - if candidate.Location == libraries.User { + if candidate.Location == rpc.LibraryLocation_user { return candidate } } diff --git a/arduino/libraries/librariesresolver/cpp.go b/arduino/libraries/librariesresolver/cpp.go index 9baf3d098c7..65d31bf3ddd 100644 --- a/arduino/libraries/librariesresolver/cpp.go +++ b/arduino/libraries/librariesresolver/cpp.go @@ -23,6 +23,7 @@ import ( "github.com/arduino/arduino-cli/arduino/libraries" "github.com/arduino/arduino-cli/arduino/libraries/librariesmanager" "github.com/arduino/arduino-cli/arduino/utils" + rpc "github.com/arduino/arduino-cli/rpc/commands" "github.com/schollz/closestmatch" "github.com/sirupsen/logrus" ) @@ -152,13 +153,13 @@ func computePriority(lib *libraries.Library, header, arch string) int { } switch lib.Location { - case libraries.IDEBuiltIn: + case rpc.LibraryLocation_ide_builtin: priority += 0 - case libraries.ReferencedPlatformBuiltIn: + case rpc.LibraryLocation_referenced_platform_builtin: priority++ - case libraries.PlatformBuiltIn: + case rpc.LibraryLocation_platform_builtin: priority += 2 - case libraries.User: + case rpc.LibraryLocation_user: priority += 3 default: panic(fmt.Sprintf("Invalid library location: %d", lib.Location)) diff --git a/arduino/libraries/librariesresolver/cpp_test.go b/arduino/libraries/librariesresolver/cpp_test.go index 0bea2dcbe0f..ff3f049801d 100644 --- a/arduino/libraries/librariesresolver/cpp_test.go +++ b/arduino/libraries/librariesresolver/cpp_test.go @@ -19,17 +19,18 @@ import ( "testing" "github.com/arduino/arduino-cli/arduino/libraries" + rpc "github.com/arduino/arduino-cli/rpc/commands" "github.com/stretchr/testify/require" ) -var l1 = &libraries.Library{Name: "Calculus Lib", Location: libraries.User} -var l2 = &libraries.Library{Name: "Calculus Lib-master", Location: libraries.User} -var l3 = &libraries.Library{Name: "Calculus Lib Improved", Location: libraries.User} -var l4 = &libraries.Library{Name: "Another Calculus Lib", Location: libraries.User} -var l5 = &libraries.Library{Name: "Yet Another Calculus Lib Improved", Location: libraries.User} -var l6 = &libraries.Library{Name: "Calculus Unified Lib", Location: libraries.User} -var l7 = &libraries.Library{Name: "AnotherLib", Location: libraries.User} -var bundleServo = &libraries.Library{Name: "Servo", Location: libraries.IDEBuiltIn, Architectures: []string{"avr", "sam", "samd"}} +var l1 = &libraries.Library{Name: "Calculus Lib", Location: rpc.LibraryLocation_user} +var l2 = &libraries.Library{Name: "Calculus Lib-master", Location: rpc.LibraryLocation_user} +var l3 = &libraries.Library{Name: "Calculus Lib Improved", Location: rpc.LibraryLocation_user} +var l4 = &libraries.Library{Name: "Another Calculus Lib", Location: rpc.LibraryLocation_user} +var l5 = &libraries.Library{Name: "Yet Another Calculus Lib Improved", Location: rpc.LibraryLocation_user} +var l6 = &libraries.Library{Name: "Calculus Unified Lib", Location: rpc.LibraryLocation_user} +var l7 = &libraries.Library{Name: "AnotherLib", Location: rpc.LibraryLocation_user} +var bundleServo = &libraries.Library{Name: "Servo", Location: rpc.LibraryLocation_ide_builtin, Architectures: []string{"avr", "sam", "samd"}} func runResolver(include string, arch string, libs ...*libraries.Library) *libraries.Library { libraryList := libraries.List{} @@ -42,19 +43,19 @@ func runResolver(include string, arch string, libs ...*libraries.Library) *libra func TestArchitecturePriority(t *testing.T) { userServo := &libraries.Library{ Name: "Servo", - Location: libraries.User, + Location: rpc.LibraryLocation_user, Architectures: []string{"avr", "sam", "samd"}} userServoAllArch := &libraries.Library{ Name: "Servo", - Location: libraries.User, + Location: rpc.LibraryLocation_user, Architectures: []string{"*"}} userServoNonavr := &libraries.Library{ Name: "Servo", - Location: libraries.User, + Location: rpc.LibraryLocation_user, Architectures: []string{"sam", "samd"}} userAnotherServo := &libraries.Library{ Name: "AnotherServo", - Location: libraries.User, + Location: rpc.LibraryLocation_user, Architectures: []string{"avr", "sam", "samd", "esp32"}} res := runResolver("Servo.h", "avr", bundleServo, userServo) @@ -79,11 +80,11 @@ func TestArchitecturePriority(t *testing.T) { userSDAllArch := &libraries.Library{ Name: "SD", - Location: libraries.User, + Location: rpc.LibraryLocation_user, Architectures: []string{"*"}} builtinSDesp := &libraries.Library{ Name: "SD", - Location: libraries.PlatformBuiltIn, + Location: rpc.LibraryLocation_platform_builtin, Architectures: []string{"esp8266"}} res = runResolver("SD.h", "esp8266", userSDAllArch, builtinSDesp) require.Equal(t, builtinSDesp, res, "selected library") diff --git a/arduino/libraries/loader.go b/arduino/libraries/loader.go index 221f28a11e6..4b70613e1e0 100644 --- a/arduino/libraries/loader.go +++ b/arduino/libraries/loader.go @@ -19,13 +19,14 @@ import ( "fmt" "strings" + rpc "github.com/arduino/arduino-cli/rpc/commands" "github.com/arduino/go-paths-helper" properties "github.com/arduino/go-properties-orderedmap" semver "go.bug.st/relaxed-semver" ) // Load loads a library from the given LibraryLocation -func Load(libDir *paths.Path, location LibraryLocation) (*Library, error) { +func Load(libDir *paths.Path, location rpc.LibraryLocation) (*Library, error) { if libDir.Join("library.properties").Exist() { return makeNewLibrary(libDir, location) } @@ -39,7 +40,7 @@ func addUtilityDirectory(library *Library) { } } -func makeNewLibrary(libraryDir *paths.Path, location LibraryLocation) (*Library, error) { +func makeNewLibrary(libraryDir *paths.Path, location rpc.LibraryLocation) (*Library, error) { libProperties, err := properties.Load(libraryDir.Join("library.properties").String()) if err != nil { return nil, fmt.Errorf("loading library.properties: %s", err) @@ -59,10 +60,10 @@ func makeNewLibrary(libraryDir *paths.Path, location LibraryLocation) (*Library, library.Location = location library.InstallDir = libraryDir if libraryDir.Join("src").Exist() { - library.Layout = RecursiveLayout + library.Layout = rpc.LibraryLayout_recursive_layout library.SourceDir = libraryDir.Join("src") } else { - library.Layout = FlatLayout + library.Layout = rpc.LibraryLayout_flat_layout library.SourceDir = libraryDir addUtilityDirectory(library) } @@ -110,12 +111,12 @@ func makeNewLibrary(libraryDir *paths.Path, location LibraryLocation) (*Library, return library, nil } -func makeLegacyLibrary(path *paths.Path, location LibraryLocation) (*Library, error) { +func makeLegacyLibrary(path *paths.Path, location rpc.LibraryLocation) (*Library, error) { library := &Library{ InstallDir: path, Location: location, SourceDir: path, - Layout: FlatLayout, + Layout: rpc.LibraryLayout_flat_layout, Name: path.Base(), Architectures: []string{"*"}, IsLegacy: true, diff --git a/cli/lib/list.go b/cli/lib/list.go index 2fb1b5d75d4..6d4722b4072 100644 --- a/cli/lib/list.go +++ b/cli/lib/list.go @@ -102,9 +102,9 @@ func (ir installedResult) String() string { lastName = name } - location := lib.GetLocation() + location := lib.GetLocation().String() if lib.ContainerPlatform != "" { - location = lib.GetContainerPlatform() + location += " " + lib.GetContainerPlatform() } if libMeta.GetRelease() != nil { diff --git a/commands/instances.go b/commands/instances.go index a995a525164..57c6cb01975 100644 --- a/commands/instances.go +++ b/commands/instances.go @@ -27,7 +27,6 @@ import ( "github.com/arduino/arduino-cli/arduino/cores" "github.com/arduino/arduino-cli/arduino/cores/packageindex" "github.com/arduino/arduino-cli/arduino/cores/packagemanager" - "github.com/arduino/arduino-cli/arduino/libraries" "github.com/arduino/arduino-cli/arduino/libraries/librariesmanager" "github.com/arduino/arduino-cli/cli/globals" "github.com/arduino/arduino-cli/configuration" @@ -323,19 +322,19 @@ func createInstance(ctx context.Context, getLibOnly bool) (*createInstanceResult // Add IDE builtin libraries dir if bundledLibsDir := configuration.IDEBundledLibrariesDir(); bundledLibsDir != nil { - res.Lm.AddLibrariesDir(bundledLibsDir, libraries.IDEBuiltIn) + res.Lm.AddLibrariesDir(bundledLibsDir, rpc.LibraryLocation_ide_builtin) } // Add user libraries dir libDir := configuration.LibrariesDir() - res.Lm.AddLibrariesDir(libDir, libraries.User) + res.Lm.AddLibrariesDir(libDir, rpc.LibraryLocation_user) // Add libraries dirs from installed platforms if res.Pm != nil { for _, targetPackage := range res.Pm.Packages { for _, platform := range targetPackage.Platforms { if platformRelease := res.Pm.GetInstalledPlatformRelease(platform); platformRelease != nil { - res.Lm.AddPlatformReleaseLibrariesDir(platformRelease, libraries.PlatformBuiltIn) + res.Lm.AddPlatformReleaseLibrariesDir(platformRelease, rpc.LibraryLocation_platform_builtin) } } } diff --git a/commands/lib/list.go b/commands/lib/list.go index 95410282935..5d76e2fa8e6 100644 --- a/commands/lib/list.go +++ b/commands/lib/list.go @@ -58,7 +58,7 @@ func listLibraries(lm *librariesmanager.LibrariesManager, updatable bool, all bo for _, libAlternatives := range lm.Libraries { for _, lib := range libAlternatives.Alternatives { if !all { - if lib.Location != libraries.User { + if lib.Location != rpc.LibraryLocation_user { continue } } @@ -107,9 +107,9 @@ func GetOutputLibrary(lib *libraries.Library) *rpc.Library { InstallDir: insdir, SourceDir: srcdir, UtilityDir: utldir, - Location: lib.Location.String(), + Location: lib.Location, ContainerPlatform: cntplat, - Layout: lib.Layout.String(), + Layout: lib.Layout, RealName: lib.RealName, DotALinkage: lib.DotALinkage, Precompiled: lib.Precompiled, diff --git a/legacy/builder/fail_if_imported_library_is_wrong.go b/legacy/builder/fail_if_imported_library_is_wrong.go index 5d7a9c0a665..e69e7625b7b 100644 --- a/legacy/builder/fail_if_imported_library_is_wrong.go +++ b/legacy/builder/fail_if_imported_library_is_wrong.go @@ -20,6 +20,7 @@ import ( "github.com/arduino/arduino-cli/legacy/builder/constants" "github.com/arduino/arduino-cli/legacy/builder/i18n" "github.com/arduino/arduino-cli/legacy/builder/types" + rpc "github.com/arduino/arduino-cli/rpc/commands" ) type FailIfImportedLibraryIsWrong struct{} @@ -41,7 +42,7 @@ func (s *FailIfImportedLibraryIsWrong) Run(ctx *types.Context) error { return i18n.ErrorfWithLogger(logger, constants.MSG_PROP_IN_LIBRARY, propName, library.InstallDir) } } - if library.Layout == libraries.RecursiveLayout { + if library.Layout == rpc.LibraryLayout_recursive_layout { if library.UtilityDir != nil { return i18n.ErrorfWithLogger(logger, constants.MSG_LIBRARY_CAN_USE_SRC_AND_UTILITY_FOLDERS, library.InstallDir) } diff --git a/legacy/builder/libraries_loader.go b/legacy/builder/libraries_loader.go index 6af87b5c57d..39ae79f0654 100644 --- a/legacy/builder/libraries_loader.go +++ b/legacy/builder/libraries_loader.go @@ -18,11 +18,11 @@ package builder import ( "os" - "github.com/arduino/arduino-cli/arduino/libraries" "github.com/arduino/arduino-cli/arduino/libraries/librariesmanager" "github.com/arduino/arduino-cli/arduino/libraries/librariesresolver" "github.com/arduino/arduino-cli/legacy/builder/i18n" "github.com/arduino/arduino-cli/legacy/builder/types" + rpc "github.com/arduino/arduino-cli/rpc/commands" ) type LibrariesLoader struct{} @@ -36,7 +36,7 @@ func (s *LibrariesLoader) Run(ctx *types.Context) error { return i18n.WrapError(err) } for _, folder := range builtInLibrariesFolders { - lm.AddLibrariesDir(folder, libraries.IDEBuiltIn) + lm.AddLibrariesDir(folder, rpc.LibraryLocation_ide_builtin) } debugLevel := ctx.DebugLevel @@ -45,16 +45,16 @@ func (s *LibrariesLoader) Run(ctx *types.Context) error { actualPlatform := ctx.ActualPlatform platform := ctx.TargetPlatform if actualPlatform != platform { - lm.AddPlatformReleaseLibrariesDir(actualPlatform, libraries.ReferencedPlatformBuiltIn) + lm.AddPlatformReleaseLibrariesDir(actualPlatform, rpc.LibraryLocation_referenced_platform_builtin) } - lm.AddPlatformReleaseLibrariesDir(platform, libraries.PlatformBuiltIn) + lm.AddPlatformReleaseLibrariesDir(platform, rpc.LibraryLocation_platform_builtin) librariesFolders := ctx.OtherLibrariesDirs if err := librariesFolders.ToAbs(); err != nil { return i18n.WrapError(err) } for _, folder := range librariesFolders { - lm.AddLibrariesDir(folder, libraries.User) + lm.AddLibrariesDir(folder, rpc.LibraryLocation_user) } if err := lm.RescanLibraries(); err != nil { diff --git a/legacy/builder/phases/libraries_builder.go b/legacy/builder/phases/libraries_builder.go index b01ffe70dc2..dca24d573cd 100644 --- a/legacy/builder/phases/libraries_builder.go +++ b/legacy/builder/phases/libraries_builder.go @@ -26,6 +26,7 @@ import ( "github.com/arduino/arduino-cli/legacy/builder/i18n" "github.com/arduino/arduino-cli/legacy/builder/types" "github.com/arduino/arduino-cli/legacy/builder/utils" + rpc "github.com/arduino/arduino-cli/rpc/commands" "github.com/arduino/go-paths-helper" "github.com/arduino/go-properties-orderedmap" ) @@ -191,7 +192,7 @@ func compileLibrary(ctx *types.Context, library *libraries.Library, buildPath *p } } - if library.Layout == libraries.RecursiveLayout { + if library.Layout == rpc.LibraryLayout_recursive_layout { libObjectFiles, err := builder_utils.CompileFilesRecursive(ctx, library.SourceDir, libraryBuildPath, buildProperties, includes) if err != nil { return nil, i18n.WrapError(err) 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, 0x69, 0x1b, 0x4e, 0x20, - 0xd2, 0x54, 0x75, 0x50, 0x91, 0x2a, 0x54, 0xa9, 0x42, 0x85, 0xb6, 0xa8, 0x28, 0xaa, 0xa2, 0xeb, - 0xc7, 0x03, 0x20, 0x9d, 0xd6, 0x77, 0x13, 0x7b, 0xe5, 0xf5, 0xed, 0x75, 0x77, 0xcf, 0x95, 0x79, - 0xe1, 0xeb, 0x95, 0x17, 0xde, 0x79, 0xe0, 0x05, 0x21, 0xf1, 0xc7, 0xf1, 0x37, 0xa0, 0xbd, 0xdd, - 0x3b, 0x7f, 0x24, 0x69, 0x03, 0x8a, 0x0a, 0xe2, 0x29, 0x37, 0x33, 0x3b, 0x33, 0xbf, 0x9d, 0x8f, - 0xdf, 0x3a, 0x40, 0x62, 0x31, 0x1e, 0xd3, 0x34, 0x51, 0xbb, 0x9c, 0xf5, 0x7b, 0x99, 0x14, 0x5a, - 0x90, 0x4b, 0x71, 0xdc, 0xa3, 0x32, 0xc9, 0x59, 0x2a, 0x7a, 0x31, 0x67, 0xbd, 0xf2, 0xc8, 0xe6, - 0x85, 0xea, 0xb0, 0xf9, 0x10, 0xa9, 0x3d, 0x1f, 0x7c, 0xef, 0x01, 0xd9, 0x63, 0x7d, 0x49, 0xe5, - 0xf4, 0xbe, 0x78, 0x99, 0x72, 0x41, 0x93, 0x10, 0x5f, 0x90, 0xbb, 0xd0, 0x60, 0xa9, 0xd2, 0x34, - 0x8d, 0xd1, 0xf7, 0xb6, 0xbc, 0xed, 0xd6, 0xad, 0x77, 0x7b, 0xc7, 0x44, 0xee, 0x3d, 0x72,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a9, 0x7d, 0xec, 0x05, 0x7f, - 0xd6, 0xe1, 0xdc, 0xa2, 0x95, 0x5c, 0x84, 0x15, 0x9a, 0xeb, 0xa1, 0x90, 0x2e, 0x95, 0x93, 0xe6, - 0x77, 0xa5, 0xb6, 0xb0, 0x2b, 0xe4, 0x2a, 0xc0, 0x98, 0xb2, 0x54, 0x53, 0x96, 0xa2, 0x74, 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, 0x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 0x16, 0x68, 0xae, 0xf6, 0x53, 0x61, 0x8f, 0xb2, 0xd2, 0xe4, 0xae, + 0xd4, 0xa6, 0x76, 0x85, 0xdc, 0x04, 0x18, 0x50, 0x96, 0x28, 0xca, 0x12, 0x14, 0x76, 0xa6, 0x26, + 0x34, 0x64, 0x1d, 0x1a, 0x12, 0x13, 0x85, 0x7a, 0x72, 0xce, 0x1b, 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, 0x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 0xc8, 0x36, 0x34, 0x78, + 0x1a, 0x51, 0xa5, 0x61, 0x78, 0x6d, 0xa7, 0x73, 0xf1, 0x98, 0xcf, 0x90, 0x72, 0xb9, 0xad, 0x7f, + 0x50, 0x45, 0x92, 0x8f, 0xf5, 0x97, 0xc0, 0x28, 0xcd, 0x95, 0x77, 0xcd, 0xe4, 0x78, 0xef, 0xc4, + 0x1c, 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; }