diff --git a/arduino/cores/fqbn.go b/arduino/cores/fqbn.go index 19b95d2f11c..11a5354493c 100644 --- a/arduino/cores/fqbn.go +++ b/arduino/cores/fqbn.go @@ -48,22 +48,41 @@ func ParseFQBN(fqbnIn string) (*FQBN, error) { return nil, fmt.Errorf("invalid fqbn: empty board identifier") } if len(fqbnParts) > 3 { - for _, pair := range strings.Split(fqbnParts[3], ",") { - parts := strings.SplitN(pair, "=", 2) - if len(parts) != 2 { - return nil, fmt.Errorf("invalid fqbn config: %s", pair) - } - k := strings.TrimSpace(parts[0]) - v := strings.TrimSpace(parts[1]) - if k == "" { - return nil, fmt.Errorf("invalid fqbn config: %s", pair) - } - fqbn.Configs.Set(k, v) + if err := fqbn.SetConfigs(strings.Split(fqbnParts[3], ",")); err != nil { + return nil, err } } return fqbn, nil } +// SetConfigs set the configs part of the FQBN with the provided config strings. +// Each config string must be a pair "config=value". +func (fqbn *FQBN) SetConfigs(configs []string) error { + for _, pair := range configs { + parts := strings.SplitN(pair, "=", 2) + if len(parts) != 2 { + return fmt.Errorf("invalid fqbn config: %s", pair) + } + k := strings.TrimSpace(parts[0]) + v := strings.TrimSpace(parts[1]) + if k == "" { + return fmt.Errorf("invalid fqbn config: %s", pair) + } + fqbn.Configs.Set(k, v) + } + return nil +} + +// MustParseFQBN extract an FQBN object from the input string or panics +// if there is an error parsing the FQBN +func MustParseFQBN(fqbnIn string) *FQBN { + res, err := ParseFQBN(fqbnIn) + if err != nil { + panic(err.Error()) + } + return res +} + func (fqbn *FQBN) String() string { res := fqbn.StringWithoutConfig() if fqbn.Configs.Size() > 0 { diff --git a/arduino/cores/packagemanager/package_manager.go b/arduino/cores/packagemanager/package_manager.go index 7c7437d0384..33819d8a75e 100644 --- a/arduino/cores/packagemanager/package_manager.go +++ b/arduino/cores/packagemanager/package_manager.go @@ -38,6 +38,7 @@ import ( type PackageManager struct { Log logrus.FieldLogger Packages cores.Packages + Registry *BoardsRegistry IndexDir *paths.Path PackagesDir *paths.Path DownloadDir *paths.Path @@ -47,9 +48,12 @@ type PackageManager struct { // NewPackageManager returns a new instance of the PackageManager func NewPackageManager(indexDir, packagesDir, downloadDir, tempDir *paths.Path) *PackageManager { + registry, _ := LoadBoardRegistry(nil) // TODO ... + return &PackageManager{ Log: logrus.StandardLogger(), Packages: cores.NewPackages(), + Registry: registry, IndexDir: indexDir, PackagesDir: packagesDir, DownloadDir: downloadDir, @@ -112,13 +116,23 @@ func (pm *PackageManager) FindBoardsWithID(id string) []*cores.Board { return res } -// FindBoardWithFQBN returns the board identified by the fqbn, or an error -func (pm *PackageManager) FindBoardWithFQBN(fqbnIn string) (*cores.Board, error) { - fqbn, err := cores.ParseFQBN(fqbnIn) +// FindBoard search the board identified by boardArg (board alias or board fqbn). +// It returns FQBN, RegistereBoard and Board or an error if not found. +// The board may be present in registry but not installed, in this case o +func (pm *PackageManager) FindBoard(boardArg string, config []string) (*cores.FQBN, *RegisteredBoard, *cores.Board, error) { + fqbn, registeredBoard, err := pm.Registry.FindBoard(boardArg) if err != nil { - return nil, fmt.Errorf("parsing fqbn: %s", err) + return fqbn, registeredBoard, nil, err + } + if config != nil { + fqbn.SetConfigs(config) } + board, err := pm.FindBoardWithFQBN(fqbn) + return fqbn, registeredBoard, board, err +} +// FindBoardWithFQBN returns the board identified by the fqbn, or an error +func (pm *PackageManager) FindBoardWithFQBN(fqbn *cores.FQBN) (*cores.Board, error) { _, _, board, _, _, err := pm.ResolveFQBN(fqbn) return board, err } diff --git a/arduino/cores/packagemanager/package_manager_test.go b/arduino/cores/packagemanager/package_manager_test.go index 3e6de20d054..2da20c389a2 100644 --- a/arduino/cores/packagemanager/package_manager_test.go +++ b/arduino/cores/packagemanager/package_manager_test.go @@ -41,12 +41,12 @@ func TestFindBoardWithFQBN(t *testing.T) { pm := packagemanager.NewPackageManager(customHardware, customHardware, customHardware, customHardware) pm.LoadHardwareFromDirectory(customHardware) - board, err := pm.FindBoardWithFQBN("arduino:avr:uno") + _, _, board, err := pm.FindBoard("arduino:avr:uno", nil) require.Nil(t, err) require.NotNil(t, board) require.Equal(t, board.Name(), "Arduino/Genuino Uno") - board, err = pm.FindBoardWithFQBN("arduino:avr:mega") + _, _, board, err = pm.FindBoard("arduino:avr:mega", nil) require.Nil(t, err) require.NotNil(t, board) require.Equal(t, board.Name(), "Arduino/Genuino Mega or Mega 2560") @@ -178,7 +178,7 @@ func TestBoardOptionsFunctions(t *testing.T) { pm := packagemanager.NewPackageManager(customHardware, customHardware, customHardware, customHardware) pm.LoadHardwareFromDirectory(customHardware) - nano, err := pm.FindBoardWithFQBN("arduino:avr:nano") + _, _, nano, err := pm.FindBoard("arduino:avr:nano", nil) require.Nil(t, err) require.NotNil(t, nano) require.Equal(t, nano.Name(), "Arduino Nano") @@ -194,7 +194,7 @@ func TestBoardOptionsFunctions(t *testing.T) { expectedNanoCPUValues.Set("atmega168", "ATmega168") require.EqualValues(t, expectedNanoCPUValues, nanoCPUValues) - esp8266, err := pm.FindBoardWithFQBN("esp8266:esp8266:generic") + _, _, esp8266, err := pm.FindBoard("esp8266:esp8266:generic", nil) require.Nil(t, err) require.NotNil(t, esp8266) require.Equal(t, esp8266.Name(), "Generic ESP8266 Module") @@ -230,7 +230,7 @@ func TestFindToolsRequiredForBoard(t *testing.T) { loadIndex("http://arduino.esp8266.com/stable/package_esp8266com_index.json") loadIndex("https://adafruit.github.io/arduino-board-index/package_adafruit_index.json") require.NoError(t, pm.LoadHardware()) - esp32, err := pm.FindBoardWithFQBN("esp32:esp32:esp32") + _, _, esp32, err := pm.FindBoard("esp32:esp32:esp32", nil) require.NoError(t, err) esptool231 := pm.FindToolDependency(&cores.ToolDependency{ ToolPackager: "esp32", @@ -266,7 +266,7 @@ func TestFindToolsRequiredForBoard(t *testing.T) { testConflictingToolsInDifferentPackages() testConflictingToolsInDifferentPackages() - feather, err := pm.FindBoardWithFQBN("adafruit:samd:adafruit_feather_m0_express") + _, _, feather, err := pm.FindBoard("adafruit:samd:adafruit_feather_m0_express", nil) require.NoError(t, err) require.NotNil(t, feather) featherTools, err := pm.FindToolsRequiredForBoard(feather) diff --git a/arduino/cores/packagemanager/registry.go b/arduino/cores/packagemanager/registry.go new file mode 100644 index 00000000000..b87cb424ce9 --- /dev/null +++ b/arduino/cores/packagemanager/registry.go @@ -0,0 +1,107 @@ +// 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 packagemanager + +import ( + "net/url" + "strings" + + "github.com/arduino/arduino-cli/arduino/cores" + "github.com/arduino/go-paths-helper" +) + +// BoardsRegistry is a database with a list of registered boards +type BoardsRegistry struct { + Boards []*RegisteredBoard + fqbnToBoard map[string]*RegisteredBoard + aliastToBoard map[string]*RegisteredBoard +} + +// RegisteredBoard contains manifest information for a board +type RegisteredBoard struct { + FQBN *cores.FQBN + Alias string + Name string + ExternalPlatformURL *url.URL +} + +// NewBoardRegistry creates a new BoardsRegistry instance +func NewBoardRegistry() *BoardsRegistry { + return &BoardsRegistry{ + Boards: []*RegisteredBoard{}, + fqbnToBoard: map[string]*RegisteredBoard{}, + aliastToBoard: map[string]*RegisteredBoard{}, + } +} + +func (r *BoardsRegistry) addBoard(board *RegisteredBoard) { + r.Boards = append(r.Boards, board) + r.fqbnToBoard[board.FQBN.String()] = board + r.aliastToBoard[board.Alias] = board +} + +// FindBoard gets a RegisteredBoard using FQBN or Board Alias +func (r *BoardsRegistry) FindBoard(fqbnOrAlias string) (*cores.FQBN, *RegisteredBoard, error) { + if found, ok := r.aliastToBoard[fqbnOrAlias]; ok { + return found.FQBN, found, nil + } + fqbn, err := cores.ParseFQBN(fqbnOrAlias) + if err != nil { + return nil, nil, err + } + if found, ok := r.fqbnToBoard[fqbn.StringWithoutConfig()]; ok { + return fqbn, found, nil + } + return fqbn, nil, nil +} + +// SearchBoards search for a RegisteredBoard using a query string +func (r *BoardsRegistry) SearchBoards(query string) []*RegisteredBoard { + found := []*RegisteredBoard{} + contains := func(a string, b string) bool { + return strings.Contains(strings.ToLower(a), strings.ToLower(b)) + } + for _, board := range r.Boards { + if contains(board.Name, query) || contains(board.Alias, query) { + found = append(found, board) + } + } + return found +} + +// LoadBoardRegistry retrieve a board registry from a file. WIP... +func LoadBoardRegistry(file *paths.Path) (*BoardsRegistry, error) { + + // TODO... + + fake := NewBoardRegistry() + fake.addBoard(&RegisteredBoard{ + Name: "Arduino Uno", + FQBN: cores.MustParseFQBN("arduino:avr:uno"), + Alias: "uno", + }) + fake.addBoard(&RegisteredBoard{ + Name: "Arduino Nano", + FQBN: cores.MustParseFQBN("arduino:avr:nano"), + Alias: "nano", + }) + fake.addBoard(&RegisteredBoard{ + Name: "Arduino Zero", + FQBN: cores.MustParseFQBN("arduino:samd:arduino_zero_edbg"), + Alias: "zero", + }) + return fake, nil +} diff --git a/cli/board/board.go b/cli/board/board.go index 613130a28b7..fa17886fcc5 100644 --- a/cli/board/board.go +++ b/cli/board/board.go @@ -37,6 +37,8 @@ func NewCommand() *cobra.Command { boardCommand.AddCommand(initDetailsCommand()) boardCommand.AddCommand(initListCommand()) boardCommand.AddCommand(listAllCommand) - + boardCommand.AddCommand(initInstallCommand()) + boardCommand.AddCommand(initUninstallCommand()) + boardCommand.AddCommand(initSearchCommand()) return boardCommand } diff --git a/cli/board/details.go b/cli/board/details.go index 1b3d4ebe00a..c43ac92cf9a 100644 --- a/cli/board/details.go +++ b/cli/board/details.go @@ -18,6 +18,8 @@ package board import ( "context" "fmt" + "os" + "github.com/arduino/arduino-cli/cli/errorcodes" "github.com/arduino/arduino-cli/cli/feedback" "github.com/arduino/arduino-cli/cli/instance" @@ -26,14 +28,11 @@ import ( "github.com/arduino/arduino-cli/table" "github.com/fatih/color" "github.com/spf13/cobra" - "os" ) -var showFullDetails bool - func initDetailsCommand() *cobra.Command { var detailsCommand = &cobra.Command{ - Use: "details ", + Use: "details ", Short: "Print details about a board.", Long: "Show information about a board, in particular if the board has options to be specified in the FQBN.", Example: " " + os.Args[0] + " board details arduino:avr:nano", @@ -41,11 +40,17 @@ func initDetailsCommand() *cobra.Command { Run: runDetailsCommand, } - detailsCommand.Flags().BoolVarP(&showFullDetails, "full", "f", false, "Include full details in text output") - + detailsCommand.Flags().BoolVarP(&detailsFlags.showFullDetails, "full", "f", false, "Include full details in text output") + detailsFlags.boardConfig = + detailsCommand.Flags().StringSliceP("board-conf", "c", nil, "set a board configuration value. The flag can be used multiple times.\n"+"Example: "+os.Args[0]+" board details arduino:avr:nano -c cpu=atmega168") return detailsCommand } +var detailsFlags struct { + showFullDetails bool + boardConfig *[]string +} + func runDetailsCommand(cmd *cobra.Command, args []string) { inst, err := instance.CreateInstance() if err != nil { @@ -54,8 +59,9 @@ func runDetailsCommand(cmd *cobra.Command, args []string) { } res, err := board.Details(context.Background(), &rpc.BoardDetailsReq{ - Instance: inst, - Fqbn: args[0], + Instance: inst, + Board: args[0], + BoardConfig: *detailsFlags.boardConfig, }) if err != nil { @@ -131,7 +137,7 @@ func (dr detailsResult) String() string { t.AddRow() // get some space from above for _, tool := range details.ToolsDependencies { t.AddRow("Required tools:", tool.Packager+":"+tool.Name, "", tool.Version) - if showFullDetails { + if detailsFlags.showFullDetails { for _, sys := range tool.Systems { t.AddRow("", "OS:", "", sys.Host) t.AddRow("", "File:", "", sys.ArchiveFileName) diff --git a/cli/board/install.go b/cli/board/install.go new file mode 100644 index 00000000000..c1f226957af --- /dev/null +++ b/cli/board/install.go @@ -0,0 +1,67 @@ +// 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 board + +import ( + "context" + "os" + + "github.com/arduino/arduino-cli/cli/errorcodes" + "github.com/arduino/arduino-cli/cli/feedback" + "github.com/arduino/arduino-cli/cli/instance" + "github.com/arduino/arduino-cli/cli/output" + "github.com/arduino/arduino-cli/commands/board" + rpc "github.com/arduino/arduino-cli/rpc/commands" + "github.com/sirupsen/logrus" + "github.com/spf13/cobra" +) + +func initInstallCommand() *cobra.Command { + installCommand := &cobra.Command{ + Use: "install ", + Short: "Installs SDK for a board.", + Long: "Installs the platform and tools to support build and upload for the specified board.\n" + + "The board may be specified via FQBN or board alias.", + Example: " # install the SDK for the Arduino Zero.\n" + + " " + os.Args[0] + " board install zero\n\n" + + " # install the SDK for the Arduino UNO using the FQBN as parameter.\n" + + " " + os.Args[0] + " board install arduino:avr:uno", + Args: cobra.ExactArgs(1), + Run: runInstallCommand, + } + return installCommand +} + +func runInstallCommand(cmd *cobra.Command, args []string) { + inst, err := instance.CreateInstance() + if err != nil { + feedback.Errorf("Error installing: %v", err) + os.Exit(errorcodes.ErrGeneric) + } + + boardArg := args[0] + logrus.WithField("board", boardArg).Info("Executing `board install`") + + boardInstallReq := &rpc.BoardInstallReq{ + Instance: inst, + Board: boardArg, + } + _, err = board.Install(context.Background(), boardInstallReq, output.ProgressBar(), output.TaskProgress()) + if err != nil { + feedback.Errorf("Error installing board: %v", err) + os.Exit(errorcodes.ErrGeneric) + } +} diff --git a/cli/board/search.go b/cli/board/search.go new file mode 100644 index 00000000000..4944795529f --- /dev/null +++ b/cli/board/search.go @@ -0,0 +1,100 @@ +// 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 board + +import ( + "context" + "os" + "sort" + "strings" + + "github.com/arduino/arduino-cli/cli/errorcodes" + "github.com/arduino/arduino-cli/cli/feedback" + "github.com/arduino/arduino-cli/cli/instance" + "github.com/arduino/arduino-cli/commands/board" + rpc "github.com/arduino/arduino-cli/rpc/commands" + "github.com/arduino/arduino-cli/table" + "github.com/sirupsen/logrus" + "github.com/spf13/cobra" +) + +func initSearchCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "search ...", + Short: "Search for a board.", + Long: "List all boards that have name or description or other properties matching \n" + + "the provided KEYWORDS.", + Example: " # search info about Arduino Zero.\n" + + " " + os.Args[0] + " board search zero", + Args: cobra.MinimumNArgs(1), + Run: runSearchCommand, + } + return cmd +} + +func runSearchCommand(cmd *cobra.Command, args []string) { + inst, err := instance.CreateInstance() + if err != nil { + feedback.Errorf("Error searching: %v", err) + os.Exit(errorcodes.ErrGeneric) + } + + query := strings.Join(args[1:], " ") + logrus.WithField("query", query).Info("Executing `board search`") + + boardSearchReq := &rpc.BoardSearchReq{ + Instance: inst, + Query: query, + } + if res, err := board.Search(context.Background(), boardSearchReq); err != nil { + feedback.Errorf("Error searching for board: %v", err) + os.Exit(errorcodes.ErrGeneric) + } else { + feedback.PrintResult(searchResult{res.GetBoards()}) + } +} + +// output from this command requires special formatting, let's create a dedicated +// feedback.Result implementation +type searchResult struct { + boards []*rpc.SearchedBoard +} + +func (res searchResult) Data() interface{} { + return res.boards +} + +func (res searchResult) String() string { + if len(res.boards) == 0 { + return "No boards found." + } + + sort.Slice(res.boards, func(i, j int) bool { + x, y := res.boards[i], res.boards[j] + return x.GetName() < y.GetName() + }) + + t := table.New() + t.SetHeader("Board", "Board Name", "FQBN", "Platform") + for _, board := range res.boards { + platform := "Arduino" + if board.GetExternalPlatformUrl() != "" { + platform = "3rd party" + } + t.AddRow(board.GetAlias(), board.GetName(), board.GetFqbn(), platform) + } + return t.Render() +} diff --git a/cli/board/uninstall.go b/cli/board/uninstall.go new file mode 100644 index 00000000000..203c18e5ce5 --- /dev/null +++ b/cli/board/uninstall.go @@ -0,0 +1,67 @@ +// 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 board + +import ( + "context" + "os" + + "github.com/arduino/arduino-cli/cli/errorcodes" + "github.com/arduino/arduino-cli/cli/feedback" + "github.com/arduino/arduino-cli/cli/instance" + "github.com/arduino/arduino-cli/cli/output" + "github.com/arduino/arduino-cli/commands/board" + rpc "github.com/arduino/arduino-cli/rpc/commands" + "github.com/sirupsen/logrus" + "github.com/spf13/cobra" +) + +func initUninstallCommand() *cobra.Command { + installCommand := &cobra.Command{ + Use: "uninstall ", + Short: "Uninstalls SDK for a board.", + Long: "Uninstalls the platform and tools to support build and upload for the specified board.\n" + + "The board may be specified via FQBN or board alias.", + Example: " # uninstall the SDK for the Arduino Zero.\n" + + " " + os.Args[0] + " board uninstall zero\n\n" + + " # uninstall the SDK for the Arduino UNO using the FQBN as parameter.\n" + + " " + os.Args[0] + " board uninstall arduino:avr:uno", + Args: cobra.ExactArgs(1), + Run: runUninstallCommand, + } + return installCommand +} + +func runUninstallCommand(cmd *cobra.Command, args []string) { + inst, err := instance.CreateInstance() + if err != nil { + feedback.Errorf("Error uninstalling: %v", err) + os.Exit(errorcodes.ErrGeneric) + } + + boardArg := args[1] + logrus.WithField("board", boardArg).Info("Executing `board uninstall`") + + boardUninstallReq := &rpc.BoardUninstallReq{ + Instance: inst, + Board: boardArg, + } + _, err = board.Uninstall(context.Background(), boardUninstallReq, output.TaskProgress()) + if err != nil { + feedback.Errorf("Error uninstalling board: %v", err) + os.Exit(errorcodes.ErrGeneric) + } +} diff --git a/cli/compile/compile.go b/cli/compile/compile.go index 0ddaf97232f..139eec7890f 100644 --- a/cli/compile/compile.go +++ b/cli/compile/compile.go @@ -33,7 +33,9 @@ import ( ) var ( - fqbn string // Fully Qualified Board Name, e.g.: arduino:avr:uno. + boardArg string // Board Alias or Board FQBN + boardConfig *[]string // Board Configuration + showProperties bool // Show all build preferences used instead of compiling. preprocess bool // Print preprocessed code to stdout. buildCachePath string // Builds of 'core.a' are saved into this path to be cached and reused. @@ -63,7 +65,11 @@ func NewCommand() *cobra.Command { Run: run, } - command.Flags().StringVarP(&fqbn, "fqbn", "b", "", "Fully Qualified Board Name, e.g.: arduino:avr:uno") + command.Flags().StringVarP(&boardArg, "board", "b", "", "Board Alias or Board FQBN (e.g. 'arduino:avr:uno')") + boardConfig = + command.Flags().StringSliceP("board-conf", "c", nil, "set a board configuration value. The flag can be used multiple times.\n"+"Example: "+os.Args[0]+" board details arduino:avr:nano -c cpu=atmega168") + command.Flags().StringVarP(&boardArg, "fqbn", "", "", "") + command.Flags().MarkDeprecated("fqbn", "use --board instead.") command.Flags().BoolVar(&showProperties, "show-properties", false, "Show all build properties used instead of compiling.") command.Flags().BoolVar(&preprocess, "preprocess", false, "Print preprocessed code to stdout instead of compiling.") command.Flags().StringVar(&buildCachePath, "build-cache-path", "", "Builds of 'core.a' are saved into this path to be cached and reused.") @@ -104,7 +110,8 @@ func run(cmd *cobra.Command, args []string) { _, err = compile.Compile(context.Background(), &rpc.CompileReq{ Instance: inst, - Fqbn: fqbn, + Board: boardArg, + BoardConfig: *boardConfig, SketchPath: sketchPath.String(), ShowProperties: showProperties, Preprocess: preprocess, @@ -129,7 +136,7 @@ func run(cmd *cobra.Command, args []string) { if uploadAfterCompile { _, err := upload.Upload(context.Background(), &rpc.UploadReq{ Instance: inst, - Fqbn: fqbn, + Board: boardArg, SketchPath: sketchPath.String(), Port: port, Verbose: verbose, diff --git a/cli/upload/upload.go b/cli/upload/upload.go index c5a735add97..e4d0a57da29 100644 --- a/cli/upload/upload.go +++ b/cli/upload/upload.go @@ -30,7 +30,9 @@ import ( ) var ( - fqbn string + boardArg string + boardConfig *[]string + port string verbose bool verify bool @@ -48,7 +50,11 @@ func NewCommand() *cobra.Command { Run: run, } - uploadCommand.Flags().StringVarP(&fqbn, "fqbn", "b", "", "Fully Qualified Board Name, e.g.: arduino:avr:uno") + uploadCommand.Flags().StringVarP(&boardArg, "board", "b", "", "Fully Qualified Board Name, e.g.: arduino:avr:uno") + boardConfig = + uploadCommand.Flags().StringSliceP("board-conf", "c", nil, "set a board configuration value. The flag can be used multiple times.\n"+"Example: "+os.Args[0]+" board details arduino:avr:nano -c cpu=atmega168") + uploadCommand.Flags().StringVarP(&boardArg, "fqbn", "", "", "") + uploadCommand.Flags().MarkDeprecated("fqbn", "use --board instead.") uploadCommand.Flags().StringVarP(&port, "port", "p", "", "Upload port, e.g.: COM10 or /dev/ttyACM0") uploadCommand.Flags().StringVarP(&importFile, "input", "i", "", "Input file to be uploaded.") uploadCommand.Flags().BoolVarP(&verify, "verify", "t", false, "Verify uploaded binary after the upload.") @@ -72,7 +78,7 @@ func run(command *cobra.Command, args []string) { if _, err := upload.Upload(context.Background(), &rpc.UploadReq{ Instance: instance, - Fqbn: fqbn, + Board: boardArg, SketchPath: sketchPath.String(), Port: port, Verbose: verbose, diff --git a/commands/board/details.go b/commands/board/details.go index 9fb440c1f57..f4c7e0c45ca 100644 --- a/commands/board/details.go +++ b/commands/board/details.go @@ -18,9 +18,7 @@ package board import ( "context" "errors" - "fmt" - "github.com/arduino/arduino-cli/arduino/cores" "github.com/arduino/arduino-cli/commands" rpc "github.com/arduino/arduino-cli/rpc/commands" ) @@ -33,14 +31,18 @@ func Details(ctx context.Context, req *rpc.BoardDetailsReq) (*rpc.BoardDetailsRe return nil, errors.New("invalid instance") } - fqbn, err := cores.ParseFQBN(req.GetFqbn()) - if err != nil { - return nil, fmt.Errorf("parsing fqbn: %s", err) + boardArg := req.GetBoard() + if boardArg == "" { + boardArg = req.GetFqbn() // Deprecated: use FQBN for old client. } - boardPackage, boardPlatform, board, _, _, err := pm.ResolveFQBN(fqbn) + fqbn, _, board, err := pm.FindBoard(boardArg, req.GetBoardConfig()) + boardPlatform := board.PlatformRelease + boardPackage := boardPlatform.Platform.Package + + // TODO: do not ignore *RegisteredBoard result, but output data from it? if err != nil { - return nil, fmt.Errorf("loading board data: %s", err) + return nil, err } details := &rpc.BoardDetailsResp{} diff --git a/commands/board/install.go b/commands/board/install.go new file mode 100644 index 00000000000..6723a9d89b2 --- /dev/null +++ b/commands/board/install.go @@ -0,0 +1,50 @@ +// 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 board + +import ( + "context" + + "github.com/arduino/arduino-cli/commands" + "github.com/arduino/arduino-cli/commands/core" + rpc "github.com/arduino/arduino-cli/rpc/commands" + "github.com/pkg/errors" +) + +// Install FIXMEDOC +func Install(ctx context.Context, req *rpc.BoardInstallReq, + downloadCB commands.DownloadProgressCB, taskCB commands.TaskProgressCB) (r *rpc.BoardInstallResp, e error) { + + pm := commands.GetPackageManager(req.GetInstance().GetId()) + if pm == nil { + return nil, errors.New("invalid instance") + } + + fqbn, _, _, err := pm.FindBoard(req.GetBoard(), nil) + if err != nil { + return nil, errors.Errorf("board '%s' not found: %s", req.GetBoard(), err) + } + + platformInstallReq := &rpc.PlatformInstallReq{ + Instance: req.GetInstance(), + PlatformPackage: fqbn.Package, + Architecture: fqbn.PlatformArch, + } + if _, err := core.PlatformInstall(ctx, platformInstallReq, downloadCB, taskCB); err != nil { + return nil, errors.WithMessage(err, "installing board platforms") + } + return &rpc.BoardInstallResp{}, nil +} diff --git a/commands/board/search.go b/commands/board/search.go new file mode 100644 index 00000000000..9bc0fcef328 --- /dev/null +++ b/commands/board/search.go @@ -0,0 +1,51 @@ +// 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 board + +import ( + "context" + + "github.com/arduino/arduino-cli/commands" + rpc "github.com/arduino/arduino-cli/rpc/commands" + "github.com/pkg/errors" +) + +// Search FIXMEDOC +func Search(ctx context.Context, req *rpc.BoardSearchReq) (r *rpc.BoardSearchResp, e error) { + pm := commands.GetPackageManager(req.GetInstance().GetId()) + if pm == nil { + return nil, errors.New("invalid instance") + } + + boards := pm.Registry.SearchBoards(req.GetQuery()) + resBoards := []*rpc.SearchedBoard{} + for _, board := range boards { + extURL := "" + if board.ExternalPlatformURL != nil { + extURL = board.ExternalPlatformURL.String() + } + resBoards = append(resBoards, &rpc.SearchedBoard{ + Name: board.Name, + Alias: board.Alias, + Fqbn: board.FQBN.String(), + ExternalPlatformUrl: extURL, + }) + } + res := &rpc.BoardSearchResp{ + Boards: resBoards, + } + return res, nil +} diff --git a/commands/board/uninstall.go b/commands/board/uninstall.go new file mode 100644 index 00000000000..f13c919f0d5 --- /dev/null +++ b/commands/board/uninstall.go @@ -0,0 +1,31 @@ +// 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 board + +import ( + "context" + + "github.com/arduino/arduino-cli/commands" + rpc "github.com/arduino/arduino-cli/rpc/commands" +) + +// Uninstall FIXMEDOC +func Uninstall(ctx context.Context, req *rpc.BoardUninstallReq, taskCB commands.TaskProgressCB) (r *rpc.BoardUninstallResp, e error) { + + // TODO + + return nil, nil +} diff --git a/commands/compile/compile.go b/commands/compile/compile.go index 3f67c6da063..db008da1dd6 100644 --- a/commands/compile/compile.go +++ b/commands/compile/compile.go @@ -17,7 +17,6 @@ package compile import ( "context" - "errors" "fmt" "io" "path/filepath" @@ -25,7 +24,6 @@ import ( "strconv" "strings" - "github.com/arduino/arduino-cli/arduino/cores" "github.com/arduino/arduino-cli/arduino/cores/packagemanager" "github.com/arduino/arduino-cli/arduino/sketches" "github.com/arduino/arduino-cli/commands" @@ -37,6 +35,7 @@ import ( "github.com/arduino/arduino-cli/telemetry" paths "github.com/arduino/go-paths-helper" properties "github.com/arduino/go-properties-orderedmap" + "github.com/pkg/errors" "github.com/segmentio/stats/v4" "github.com/sirupsen/logrus" "github.com/spf13/viper" @@ -46,6 +45,7 @@ import ( func Compile(ctx context.Context, req *rpc.CompileReq, outStream, errStream io.Writer, debug bool) (r *rpc.CompileResp, e error) { tags := map[string]string{ + "board": req.Board, "fqbn": req.Fqbn, "sketchPath": telemetry.Sanitize(req.SketchPath), "showProperties": strconv.FormatBool(req.ShowProperties), @@ -75,7 +75,12 @@ func Compile(ctx context.Context, req *rpc.CompileReq, outStream, errStream io.W return nil, errors.New("invalid instance") } - logrus.Tracef("Compile %s for %s started", req.GetSketchPath(), req.GetFqbn()) + boardArg := req.GetBoard() + if boardArg == "" { + boardArg = req.GetFqbn() // DEPRECATED: Keep Fqbn field working for old clients. + } + + logrus.Tracef("Compile %s for %s started", req.GetSketchPath(), boardArg) if req.GetSketchPath() == "" { return nil, fmt.Errorf("missing sketchPath") } @@ -85,16 +90,16 @@ func Compile(ctx context.Context, req *rpc.CompileReq, outStream, errStream io.W return nil, fmt.Errorf("opening sketch: %s", err) } - fqbnIn := req.GetFqbn() - if fqbnIn == "" && sketch != nil && sketch.Metadata != nil { - fqbnIn = sketch.Metadata.CPU.Fqbn + if boardArg == "" && sketch != nil && sketch.Metadata != nil { + boardArg = sketch.Metadata.CPU.Fqbn } - if fqbnIn == "" { - return nil, fmt.Errorf("no FQBN provided") + if boardArg == "" { + return nil, errors.Errorf("no board provided") } - fqbn, err := cores.ParseFQBN(fqbnIn) + + fqbn, _, _, err := pm.FindBoard(boardArg, req.GetBoardConfig()) if err != nil { - return nil, fmt.Errorf("incorrect FQBN: %s", err) + return nil, errors.Errorf("board '%s' not found: %s", req.GetBoard(), err) } targetPlatform := pm.FindPlatform(&packagemanager.PlatformReference{ @@ -249,6 +254,6 @@ func Compile(ctx context.Context, req *rpc.CompileReq, outStream, errStream io.W } } - logrus.Tracef("Compile %s for %s successful", sketch.Name, fqbnIn) + logrus.Tracef("Compile %s for %s successful", sketch.Name, boardArg) return &rpc.CompileResp{}, nil } diff --git a/commands/daemon/daemon.go b/commands/daemon/daemon.go index 2dd088beff9..7288f74f5f1 100644 --- a/commands/daemon/daemon.go +++ b/commands/daemon/daemon.go @@ -69,6 +69,34 @@ func (s *ArduinoCoreServerImpl) BoardAttach(req *rpc.BoardAttachReq, stream rpc. return stream.Send(resp) } +// BoardInstall FIXMEDOC +func (s *ArduinoCoreServerImpl) BoardInstall(req *rpc.BoardInstallReq, stream rpc.ArduinoCore_BoardInstallServer) error { + resp, err := board.Install(stream.Context(), req, + func(p *rpc.DownloadProgress) { stream.Send(&rpc.BoardInstallResp{DownloadProgress: p}) }, + func(p *rpc.TaskProgress) { stream.Send(&rpc.BoardInstallResp{TaskProgress: p}) }, + ) + if err != nil { + return err + } + return stream.Send(resp) +} + +// BoardUninstall FIXMEDOC +func (s *ArduinoCoreServerImpl) BoardUninstall(req *rpc.BoardUninstallReq, stream rpc.ArduinoCore_BoardUninstallServer) error { + resp, err := board.Uninstall(stream.Context(), req, + func(p *rpc.TaskProgress) { stream.Send(&rpc.BoardUninstallResp{TaskProgress: p}) }, + ) + if err != nil { + return err + } + return stream.Send(resp) +} + +// BoardSearch FIXMEDOC +func (s *ArduinoCoreServerImpl) BoardSearch(ctx context.Context, req *rpc.BoardSearchReq) (*rpc.BoardSearchResp, error) { + return board.Search(ctx, req) +} + // Destroy FIXMEDOC func (s *ArduinoCoreServerImpl) Destroy(ctx context.Context, req *rpc.DestroyReq) (*rpc.DestroyResp, error) { return commands.Destroy(ctx, req) diff --git a/commands/upload/upload.go b/commands/upload/upload.go index 4b68dd4eb25..09358b65033 100644 --- a/commands/upload/upload.go +++ b/commands/upload/upload.go @@ -33,6 +33,7 @@ import ( rpc "github.com/arduino/arduino-cli/rpc/commands" paths "github.com/arduino/go-paths-helper" properties "github.com/arduino/go-properties-orderedmap" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "go.bug.st/serial" ) @@ -67,19 +68,22 @@ func Upload(ctx context.Context, req *rpc.UploadReq, outStream io.Writer, errStr return nil, fmt.Errorf("no upload port provided") } - fqbnIn := req.GetFqbn() - if fqbnIn == "" && sketch != nil && sketch.Metadata != nil { - fqbnIn = sketch.Metadata.CPU.Fqbn + boardArg := req.GetBoard() + if boardArg == "" { + boardArg = req.GetFqbn() // DEPRECATION: Keep compatiblity with old clients using Fqbn } - if fqbnIn == "" { - return nil, fmt.Errorf("no Fully Qualified Board Name provided") + if boardArg == "" && sketch != nil && sketch.Metadata != nil { + boardArg = sketch.Metadata.CPU.Fqbn } - fqbn, err := cores.ParseFQBN(fqbnIn) - if err != nil { - return nil, fmt.Errorf("incorrect FQBN: %s", err) + if boardArg == "" { + return nil, errors.Errorf("no board specified") } pm := commands.GetPackageManager(req.GetInstance().GetId()) + fqbn, _, _, err := pm.FindBoard(boardArg, req.GetBoardConfig()) + if err != nil { + return nil, errors.Errorf("board '%s' not found: %s", req.GetBoard(), err) + } // Find target board and board properties _, _, board, boardProperties, _, err := pm.ResolveFQBN(fqbn) @@ -266,7 +270,7 @@ func Upload(ctx context.Context, req *rpc.UploadReq, outStream io.Writer, errStr return nil, fmt.Errorf("uploading error: %s", err) } - logrus.Tracef("Upload %s on %s successful", sketch.Name, fqbnIn) + logrus.Tracef("Upload %s on %s successful", sketch.Name, boardArg) return &rpc.UploadResp{}, nil } diff --git a/rpc/commands/board.pb.go b/rpc/commands/board.pb.go index 865d1f3989d..ea5c9333119 100644 --- a/rpc/commands/board.pb.go +++ b/rpc/commands/board.pb.go @@ -23,9 +23,12 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type BoardDetailsReq struct { // Arduino Core Service instance from the `Init` response. Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + // DEPRECATED: use "board" and "board_config" fields instead. + Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` // Deprecated: Do not use. // The fully qualified board name of the board you want information about - // (e.g., `arduino:avr:uno`). - Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` + // (e.g., `arduino:avr:uno`) or the board alias. + Board string `protobuf:"bytes,3,opt,name=board,proto3" json:"board,omitempty"` + BoardConfig []string `protobuf:"bytes,4,rep,name=board_config,json=boardConfig,proto3" json:"board_config,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -63,6 +66,7 @@ func (m *BoardDetailsReq) GetInstance() *Instance { return nil } +// Deprecated: Do not use. func (m *BoardDetailsReq) GetFqbn() string { if m != nil { return m.Fqbn @@ -70,6 +74,20 @@ func (m *BoardDetailsReq) GetFqbn() string { return "" } +func (m *BoardDetailsReq) GetBoard() string { + if m != nil { + return m.Board + } + return "" +} + +func (m *BoardDetailsReq) GetBoardConfig() []string { + if m != nil { + return m.BoardConfig + } + return nil +} + type BoardDetailsResp struct { // The fully qualified board name of the board. Fqbn string `protobuf:"bytes,1,opt,name=fqbn,proto3" json:"fqbn,omitempty"` @@ -967,6 +985,335 @@ func (m *BoardListResp) GetPorts() []*DetectedPort { return nil } +type BoardInstallReq struct { + Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + Board string `protobuf:"bytes,2,opt,name=board,proto3" json:"board,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BoardInstallReq) Reset() { *m = BoardInstallReq{} } +func (m *BoardInstallReq) String() string { return proto.CompactTextString(m) } +func (*BoardInstallReq) ProtoMessage() {} +func (*BoardInstallReq) Descriptor() ([]byte, []int) { + return fileDescriptor_0882eeddaa6507ab, []int{15} +} + +func (m *BoardInstallReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BoardInstallReq.Unmarshal(m, b) +} +func (m *BoardInstallReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BoardInstallReq.Marshal(b, m, deterministic) +} +func (m *BoardInstallReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoardInstallReq.Merge(m, src) +} +func (m *BoardInstallReq) XXX_Size() int { + return xxx_messageInfo_BoardInstallReq.Size(m) +} +func (m *BoardInstallReq) XXX_DiscardUnknown() { + xxx_messageInfo_BoardInstallReq.DiscardUnknown(m) +} + +var xxx_messageInfo_BoardInstallReq proto.InternalMessageInfo + +func (m *BoardInstallReq) GetInstance() *Instance { + if m != nil { + return m.Instance + } + return nil +} + +func (m *BoardInstallReq) GetBoard() string { + if m != nil { + return m.Board + } + return "" +} + +type BoardInstallResp struct { + DownloadProgress *DownloadProgress `protobuf:"bytes,1,opt,name=download_progress,json=downloadProgress,proto3" json:"download_progress,omitempty"` + TaskProgress *TaskProgress `protobuf:"bytes,2,opt,name=task_progress,json=taskProgress,proto3" json:"task_progress,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BoardInstallResp) Reset() { *m = BoardInstallResp{} } +func (m *BoardInstallResp) String() string { return proto.CompactTextString(m) } +func (*BoardInstallResp) ProtoMessage() {} +func (*BoardInstallResp) Descriptor() ([]byte, []int) { + return fileDescriptor_0882eeddaa6507ab, []int{16} +} + +func (m *BoardInstallResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BoardInstallResp.Unmarshal(m, b) +} +func (m *BoardInstallResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BoardInstallResp.Marshal(b, m, deterministic) +} +func (m *BoardInstallResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoardInstallResp.Merge(m, src) +} +func (m *BoardInstallResp) XXX_Size() int { + return xxx_messageInfo_BoardInstallResp.Size(m) +} +func (m *BoardInstallResp) XXX_DiscardUnknown() { + xxx_messageInfo_BoardInstallResp.DiscardUnknown(m) +} + +var xxx_messageInfo_BoardInstallResp proto.InternalMessageInfo + +func (m *BoardInstallResp) GetDownloadProgress() *DownloadProgress { + if m != nil { + return m.DownloadProgress + } + return nil +} + +func (m *BoardInstallResp) GetTaskProgress() *TaskProgress { + if m != nil { + return m.TaskProgress + } + return nil +} + +type BoardUninstallReq struct { + Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + Board string `protobuf:"bytes,2,opt,name=board,proto3" json:"board,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BoardUninstallReq) Reset() { *m = BoardUninstallReq{} } +func (m *BoardUninstallReq) String() string { return proto.CompactTextString(m) } +func (*BoardUninstallReq) ProtoMessage() {} +func (*BoardUninstallReq) Descriptor() ([]byte, []int) { + return fileDescriptor_0882eeddaa6507ab, []int{17} +} + +func (m *BoardUninstallReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BoardUninstallReq.Unmarshal(m, b) +} +func (m *BoardUninstallReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BoardUninstallReq.Marshal(b, m, deterministic) +} +func (m *BoardUninstallReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoardUninstallReq.Merge(m, src) +} +func (m *BoardUninstallReq) XXX_Size() int { + return xxx_messageInfo_BoardUninstallReq.Size(m) +} +func (m *BoardUninstallReq) XXX_DiscardUnknown() { + xxx_messageInfo_BoardUninstallReq.DiscardUnknown(m) +} + +var xxx_messageInfo_BoardUninstallReq proto.InternalMessageInfo + +func (m *BoardUninstallReq) GetInstance() *Instance { + if m != nil { + return m.Instance + } + return nil +} + +func (m *BoardUninstallReq) GetBoard() string { + if m != nil { + return m.Board + } + return "" +} + +type BoardUninstallResp struct { + TaskProgress *TaskProgress `protobuf:"bytes,1,opt,name=task_progress,json=taskProgress,proto3" json:"task_progress,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BoardUninstallResp) Reset() { *m = BoardUninstallResp{} } +func (m *BoardUninstallResp) String() string { return proto.CompactTextString(m) } +func (*BoardUninstallResp) ProtoMessage() {} +func (*BoardUninstallResp) Descriptor() ([]byte, []int) { + return fileDescriptor_0882eeddaa6507ab, []int{18} +} + +func (m *BoardUninstallResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BoardUninstallResp.Unmarshal(m, b) +} +func (m *BoardUninstallResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BoardUninstallResp.Marshal(b, m, deterministic) +} +func (m *BoardUninstallResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoardUninstallResp.Merge(m, src) +} +func (m *BoardUninstallResp) XXX_Size() int { + return xxx_messageInfo_BoardUninstallResp.Size(m) +} +func (m *BoardUninstallResp) XXX_DiscardUnknown() { + xxx_messageInfo_BoardUninstallResp.DiscardUnknown(m) +} + +var xxx_messageInfo_BoardUninstallResp proto.InternalMessageInfo + +func (m *BoardUninstallResp) GetTaskProgress() *TaskProgress { + if m != nil { + return m.TaskProgress + } + return nil +} + +type BoardSearchReq struct { + Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BoardSearchReq) Reset() { *m = BoardSearchReq{} } +func (m *BoardSearchReq) String() string { return proto.CompactTextString(m) } +func (*BoardSearchReq) ProtoMessage() {} +func (*BoardSearchReq) Descriptor() ([]byte, []int) { + return fileDescriptor_0882eeddaa6507ab, []int{19} +} + +func (m *BoardSearchReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BoardSearchReq.Unmarshal(m, b) +} +func (m *BoardSearchReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BoardSearchReq.Marshal(b, m, deterministic) +} +func (m *BoardSearchReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoardSearchReq.Merge(m, src) +} +func (m *BoardSearchReq) XXX_Size() int { + return xxx_messageInfo_BoardSearchReq.Size(m) +} +func (m *BoardSearchReq) XXX_DiscardUnknown() { + xxx_messageInfo_BoardSearchReq.DiscardUnknown(m) +} + +var xxx_messageInfo_BoardSearchReq proto.InternalMessageInfo + +func (m *BoardSearchReq) GetInstance() *Instance { + if m != nil { + return m.Instance + } + return nil +} + +func (m *BoardSearchReq) GetQuery() string { + if m != nil { + return m.Query + } + return "" +} + +type BoardSearchResp struct { + Boards []*SearchedBoard `protobuf:"bytes,1,rep,name=boards,proto3" json:"boards,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BoardSearchResp) Reset() { *m = BoardSearchResp{} } +func (m *BoardSearchResp) String() string { return proto.CompactTextString(m) } +func (*BoardSearchResp) ProtoMessage() {} +func (*BoardSearchResp) Descriptor() ([]byte, []int) { + return fileDescriptor_0882eeddaa6507ab, []int{20} +} + +func (m *BoardSearchResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BoardSearchResp.Unmarshal(m, b) +} +func (m *BoardSearchResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BoardSearchResp.Marshal(b, m, deterministic) +} +func (m *BoardSearchResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoardSearchResp.Merge(m, src) +} +func (m *BoardSearchResp) XXX_Size() int { + return xxx_messageInfo_BoardSearchResp.Size(m) +} +func (m *BoardSearchResp) XXX_DiscardUnknown() { + xxx_messageInfo_BoardSearchResp.DiscardUnknown(m) +} + +var xxx_messageInfo_BoardSearchResp proto.InternalMessageInfo + +func (m *BoardSearchResp) GetBoards() []*SearchedBoard { + if m != nil { + return m.Boards + } + return nil +} + +type SearchedBoard struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` + Fqbn string `protobuf:"bytes,3,opt,name=fqbn,proto3" json:"fqbn,omitempty"` + ExternalPlatformUrl string `protobuf:"bytes,4,opt,name=externalPlatformUrl,proto3" json:"externalPlatformUrl,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SearchedBoard) Reset() { *m = SearchedBoard{} } +func (m *SearchedBoard) String() string { return proto.CompactTextString(m) } +func (*SearchedBoard) ProtoMessage() {} +func (*SearchedBoard) Descriptor() ([]byte, []int) { + return fileDescriptor_0882eeddaa6507ab, []int{21} +} + +func (m *SearchedBoard) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SearchedBoard.Unmarshal(m, b) +} +func (m *SearchedBoard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SearchedBoard.Marshal(b, m, deterministic) +} +func (m *SearchedBoard) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchedBoard.Merge(m, src) +} +func (m *SearchedBoard) XXX_Size() int { + return xxx_messageInfo_SearchedBoard.Size(m) +} +func (m *SearchedBoard) XXX_DiscardUnknown() { + xxx_messageInfo_SearchedBoard.DiscardUnknown(m) +} + +var xxx_messageInfo_SearchedBoard proto.InternalMessageInfo + +func (m *SearchedBoard) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *SearchedBoard) GetAlias() string { + if m != nil { + return m.Alias + } + return "" +} + +func (m *SearchedBoard) GetFqbn() string { + if m != nil { + return m.Fqbn + } + return "" +} + +func (m *SearchedBoard) GetExternalPlatformUrl() string { + if m != nil { + return m.ExternalPlatformUrl + } + return "" +} + type DetectedPort struct { // Address of the port (e.g., `serial:///dev/ttyACM0`). Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` @@ -985,7 +1332,7 @@ func (m *DetectedPort) Reset() { *m = DetectedPort{} } func (m *DetectedPort) String() string { return proto.CompactTextString(m) } func (*DetectedPort) ProtoMessage() {} func (*DetectedPort) Descriptor() ([]byte, []int) { - return fileDescriptor_0882eeddaa6507ab, []int{15} + return fileDescriptor_0882eeddaa6507ab, []int{22} } func (m *DetectedPort) XXX_Unmarshal(b []byte) error { @@ -1048,7 +1395,7 @@ func (m *BoardListAllReq) Reset() { *m = BoardListAllReq{} } func (m *BoardListAllReq) String() string { return proto.CompactTextString(m) } func (*BoardListAllReq) ProtoMessage() {} func (*BoardListAllReq) Descriptor() ([]byte, []int) { - return fileDescriptor_0882eeddaa6507ab, []int{16} + return fileDescriptor_0882eeddaa6507ab, []int{23} } func (m *BoardListAllReq) XXX_Unmarshal(b []byte) error { @@ -1095,7 +1442,7 @@ func (m *BoardListAllResp) Reset() { *m = BoardListAllResp{} } func (m *BoardListAllResp) String() string { return proto.CompactTextString(m) } func (*BoardListAllResp) ProtoMessage() {} func (*BoardListAllResp) Descriptor() ([]byte, []int) { - return fileDescriptor_0882eeddaa6507ab, []int{17} + return fileDescriptor_0882eeddaa6507ab, []int{24} } func (m *BoardListAllResp) XXX_Unmarshal(b []byte) error { @@ -1137,7 +1484,7 @@ func (m *BoardListItem) Reset() { *m = BoardListItem{} } func (m *BoardListItem) String() string { return proto.CompactTextString(m) } func (*BoardListItem) ProtoMessage() {} func (*BoardListItem) Descriptor() ([]byte, []int) { - return fileDescriptor_0882eeddaa6507ab, []int{18} + return fileDescriptor_0882eeddaa6507ab, []int{25} } func (m *BoardListItem) XXX_Unmarshal(b []byte) error { @@ -1188,6 +1535,13 @@ func init() { proto.RegisterType((*BoardAttachResp)(nil), "cc.arduino.cli.commands.BoardAttachResp") proto.RegisterType((*BoardListReq)(nil), "cc.arduino.cli.commands.BoardListReq") proto.RegisterType((*BoardListResp)(nil), "cc.arduino.cli.commands.BoardListResp") + proto.RegisterType((*BoardInstallReq)(nil), "cc.arduino.cli.commands.BoardInstallReq") + proto.RegisterType((*BoardInstallResp)(nil), "cc.arduino.cli.commands.BoardInstallResp") + proto.RegisterType((*BoardUninstallReq)(nil), "cc.arduino.cli.commands.BoardUninstallReq") + proto.RegisterType((*BoardUninstallResp)(nil), "cc.arduino.cli.commands.BoardUninstallResp") + proto.RegisterType((*BoardSearchReq)(nil), "cc.arduino.cli.commands.BoardSearchReq") + proto.RegisterType((*BoardSearchResp)(nil), "cc.arduino.cli.commands.BoardSearchResp") + proto.RegisterType((*SearchedBoard)(nil), "cc.arduino.cli.commands.SearchedBoard") proto.RegisterType((*DetectedPort)(nil), "cc.arduino.cli.commands.DetectedPort") proto.RegisterType((*BoardListAllReq)(nil), "cc.arduino.cli.commands.BoardListAllReq") proto.RegisterType((*BoardListAllResp)(nil), "cc.arduino.cli.commands.BoardListAllResp") @@ -1197,72 +1551,83 @@ func init() { func init() { proto.RegisterFile("commands/board.proto", fileDescriptor_0882eeddaa6507ab) } var fileDescriptor_0882eeddaa6507ab = []byte{ - // 1066 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdf, 0x6e, 0x1b, 0xc5, - 0x17, 0xd6, 0xd6, 0x76, 0xec, 0x1c, 0x3b, 0x69, 0x3b, 0xbf, 0xfe, 0x60, 0x15, 0x44, 0x70, 0x57, - 0x14, 0x45, 0x44, 0x75, 0x44, 0x40, 0x42, 0x2a, 0x7f, 0xa4, 0x04, 0xab, 0xc2, 0x55, 0x28, 0x66, - 0x9a, 0x54, 0x08, 0x81, 0xcc, 0x78, 0x3c, 0xb6, 0x47, 0x59, 0xef, 0x6c, 0x66, 0x66, 0x83, 0xca, - 0x0b, 0x20, 0x1e, 0x81, 0x67, 0xe0, 0x96, 0x0b, 0x1e, 0x81, 0x3b, 0x5e, 0x09, 0xcd, 0xbf, 0xcd, - 0xba, 0xe9, 0x52, 0x01, 0xbd, 0xf2, 0x39, 0xdf, 0x9e, 0x6f, 0x66, 0xce, 0x39, 0xdf, 0x99, 0x31, - 0xdc, 0xa1, 0x62, 0xb5, 0x22, 0xd9, 0x4c, 0x1d, 0x4c, 0x05, 0x91, 0xb3, 0x41, 0x2e, 0x85, 0x16, - 0xe8, 0x75, 0x4a, 0x07, 0x44, 0xce, 0x0a, 0x9e, 0x89, 0x01, 0x4d, 0xf9, 0x20, 0x04, 0xed, 0xfc, - 0xbf, 0x0c, 0x37, 0x86, 0xc8, 0x5c, 0x7c, 0x32, 0x83, 0x9b, 0xc7, 0x86, 0x3e, 0x64, 0x9a, 0xf0, - 0x54, 0x61, 0x76, 0x81, 0x3e, 0x81, 0x0e, 0xcf, 0x94, 0x26, 0x19, 0x65, 0x71, 0xd4, 0x8f, 0xf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1241 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x17, 0x5b, 0x6f, 0x1b, 0x45, + 0x57, 0x1b, 0xdb, 0xb1, 0x73, 0x6c, 0xb7, 0xcd, 0xb4, 0x5f, 0xbf, 0x55, 0x11, 0xc5, 0x5d, 0x51, + 0x64, 0xa8, 0xea, 0x40, 0x41, 0x42, 0x2a, 0x17, 0xa9, 0xc6, 0xaa, 0x70, 0x15, 0x8a, 0x3b, 0x6d, + 0x2a, 0x84, 0x40, 0xee, 0x78, 0x77, 0x6c, 0x8f, 0xb2, 0xde, 0xd9, 0xcc, 0x8c, 0x5b, 0xca, 0x0b, + 0x8f, 0x88, 0x9f, 0xc0, 0x23, 0xcf, 0xbc, 0x22, 0xc4, 0x4f, 0xe0, 0x8d, 0xbf, 0x84, 0xe6, 0xb6, + 0x59, 0xc7, 0x71, 0xab, 0x42, 0x78, 0xf2, 0x39, 0x67, 0xcf, 0xfd, 0x3a, 0x86, 0x4b, 0x31, 0x5f, + 0x2c, 0x48, 0x96, 0xc8, 0xbd, 0x09, 0x27, 0x22, 0xe9, 0xe5, 0x82, 0x2b, 0x8e, 0xfe, 0x1f, 0xc7, + 0x3d, 0x22, 0x92, 0x25, 0xcb, 0x78, 0x2f, 0x4e, 0x59, 0xcf, 0x33, 0x5d, 0xf9, 0x5f, 0xc1, 0xae, + 0x01, 0x9e, 0x59, 0xfe, 0xe8, 0x97, 0x00, 0xce, 0xf7, 0xb5, 0xfc, 0x80, 0x2a, 0xc2, 0x52, 0x89, + 0xe9, 0x11, 0xfa, 0x04, 0x1a, 0x2c, 0x93, 0x8a, 0x64, 0x31, 0x0d, 0x83, 0x4e, 0xd0, 0x6d, 0xde, + 0xba, 0xd6, 0xdb, 0xa0, 0xb6, 0x37, 0x74, 0x8c, 0xb8, 0x10, 0x41, 0x97, 0xa1, 0x3a, 0x3d, 0x9a, + 0x64, 0xe1, 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 0x4f, 0xd1, 0xaf, 0x01, 0xb4, 0xca, 0xf3, 0xa3, 0x2f, 0x17, 0x49, 0x92, 0xa2, 0x22, + 0x3b, 0xd8, 0xa3, 0xe6, 0x06, 0xea, 0xff, 0x0d, 0x31, 0xf7, 0xfb, 0xb3, 0xc0, 0xf5, 0x46, 0xf2, + 0xb0, 0xdb, 0xb0, 0xd6, 0xad, 0xb6, 0xa7, 0xda, 0x25, 0x7b, 0x9c, 0xae, 0xea, 0x4b, 0xd2, 0x55, + 0xac, 0x82, 0xa1, 0xa2, 0x8b, 0x22, 0x5d, 0x47, 0xae, 0x02, 0xfa, 0xc3, 0x9d, 0x33, 0x69, 0x59, + 0xbd, 0x6b, 0xed, 0x2a, 0x25, 0x62, 0xa6, 0x33, 0x5c, 0x31, 0xbb, 0xd6, 0x90, 0xee, 0x88, 0x99, + 0x8c, 0xb0, 0x9b, 0xef, 0xc2, 0xe4, 0x2b, 0x55, 0xfd, 0xf4, 0x30, 0x3e, 0x2c, 0xad, 0x3a, 0xfd, + 0xe1, 0xd4, 0xaa, 0x23, 0xa8, 0xde, 0x7d, 0xd0, 0xbf, 0xef, 0x8f, 0xb8, 0x86, 0xfb, 0x37, 0xbf, + 0xbe, 0x31, 0x63, 0x6a, 0xbe, 0x9c, 0x68, 0x0b, 0x7b, 0xce, 0xa2, 0xff, 0xbd, 0x19, 0xa7, 0x6c, + 0x4f, 0xe4, 0xf1, 0x9e, 0xb7, 0x3e, 0xd9, 0x36, 0xd9, 0x7f, 0xff, 0xef, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x4e, 0xab, 0xcd, 0x16, 0x2f, 0x0e, 0x00, 0x00, } diff --git a/rpc/commands/board.proto b/rpc/commands/board.proto index 1d3f5e1f57e..99732d8565a 100644 --- a/rpc/commands/board.proto +++ b/rpc/commands/board.proto @@ -24,9 +24,12 @@ import "commands/common.proto"; message BoardDetailsReq { // Arduino Core Service instance from the `Init` response. Instance instance = 1; + // DEPRECATED: use "board" and "board_config" fields instead. + string fqbn = 2 [deprecated=true]; // The fully qualified board name of the board you want information about - // (e.g., `arduino:avr:uno`). - string fqbn = 2; + // (e.g., `arduino:avr:uno`) or the board alias. + string board = 3; + repeated string board_config = 4; } message BoardDetailsResp { @@ -179,6 +182,41 @@ message BoardListResp { repeated DetectedPort ports = 1; } +message BoardInstallReq { + Instance instance = 1; + string board = 2; // Board FQBN or Board alias +} + +message BoardInstallResp { + DownloadProgress download_progress = 1; + TaskProgress task_progress = 2; +} + +message BoardUninstallReq { + Instance instance = 1; + string board = 2; // Board FQBN or Board alias +} + +message BoardUninstallResp { + TaskProgress task_progress = 1; +} + +message BoardSearchReq { + Instance instance = 1; + string query = 2; +} + +message BoardSearchResp { + repeated SearchedBoard boards = 1; +} + +message SearchedBoard { + string name = 1; + string alias = 2; + string fqbn = 3; + string externalPlatformUrl = 4; +} + message DetectedPort { // Address of the port (e.g., `serial:///dev/ttyACM0`). string address = 1; diff --git a/rpc/commands/commands.pb.go b/rpc/commands/commands.pb.go index 7aa41ab7f05..e608e221122 100644 --- a/rpc/commands/commands.pb.go +++ b/rpc/commands/commands.pb.go @@ -8,6 +8,8 @@ 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" ) @@ -552,76 +554,78 @@ func init() { func init() { proto.RegisterFile("commands/commands.proto", fileDescriptor_3690061a1131852d) } var fileDescriptor_3690061a1131852d = []byte{ - // 948 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x97, 0xdd, 0x52, 0x1b, 0x37, - 0x14, 0xc7, 0xb3, 0x24, 0x05, 0x7c, 0x0c, 0x24, 0x51, 0x9c, 0xe0, 0xf1, 0x95, 0xb3, 0x69, 0x8a, - 0x81, 0x62, 0x28, 0xed, 0xb4, 0x17, 0x9d, 0x5e, 0x90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af, 0x32, 0xd8, 0xee, 0xe9, 0x7a, 0x4d, 0x52, 0x72, 0xd5, 0x94, 0xec, 0x06, 0x1d, 0xb9, 0xe1, - 0x2b, 0x7e, 0xc9, 0x6b, 0x64, 0x79, 0x53, 0x6e, 0xc0, 0xba, 0x7e, 0xe7, 0xb0, 0x62, 0x1c, 0x76, - 0xb9, 0x36, 0xaa, 0x14, 0x72, 0xbb, 0xb5, 0x59, 0x9b, 0xb5, 0xab, 0x65, 0xec, 0xe3, 0x31, 0xaf, - 0x7c, 0xe1, 0x89, 0x29, 0xdf, 0x9a, 0x81, 0xb6, 0xab, 0x65, 0x3d, 0xd9, 0x30, 0xee, 0x95, 0xae, - 0xd6, 0x0d, 0xb6, 0x7c, 0xb5, 0xa6, 0xe0, 0x3a, 0xeb, 0x3f, 0x1e, 0x74, 0x8c, 0x2f, 0x20, 0x92, - 0xc5, 0x57, 0x64, 0x9f, 0x70, 0x92, 0x44, 0x24, 0x09, 0x29, 0x91, 0xe8, 0xfb, 0x2a, 0xc1, 0x29, - 0x41, 0xea, 0x45, 0x7e, 0xf8, 0xa4, 0x38, 0xc9, 0xd1, 0x07, 0x58, 0x36, 0x84, 0x59, 0x92, 0xf5, - 0x2a, 0xa5, 0xf1, 0x8e, 0x6c, 0xd4, 0x45, 0x25, 0x47, 0x7f, 0x40, 0xd3, 0x18, 0xf5, 0x86, 0xac, - 0x55, 0x85, 0xda, 0x05, 0xe9, 0xd5, 0x03, 0x25, 0x7f, 0xb5, 0xf5, 0x7e, 0xf3, 0x94, 0xa6, 0x67, - 0x97, 0x43, 0x85, 0x6c, 0x9b, 0x10, 0xfb, 0x77, 0x2b, 0x8c, 0xe9, 0xb6, 0xe0, 0xa1, 0xfb, 0x1d, - 0x3e, 0x9c, 0xd7, 0x3f, 0x75, 0xbf, 0xfd, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xd5, 0xf5, 0x48, 0xa1, - 0xa3, 0x0f, 0x00, 0x00, + // 985 bytes of a gzipped FileD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a3, 0x4f, + 0xdd, 0x6f, 0x66, 0xb4, 0xc8, 0x6b, 0xa2, 0xbb, 0xa3, 0xa2, 0x26, 0x79, 0x37, 0x55, 0xd4, 0x64, + 0xac, 0xc9, 0xbc, 0x7b, 0x28, 0x80, 0xa5, 0x97, 0xf2, 0xad, 0x3c, 0x24, 0x29, 0xa6, 0x91, 0x40, + 0xe5, 0x69, 0x19, 0xc7, 0x64, 0x84, 0xcd, 0x86, 0xa4, 0x60, 0x68, 0x08, 0x6d, 0x25, 0x3b, 0x48, + 0x53, 0x1c, 0x7c, 0xa8, 0xa8, 0xd1, 0x18, 0x55, 0x5d, 0xa3, 0x02, 0x28, 0xd8, 0x9e, 0x83, 0xde, + 0x41, 0x4b, 0x09, 0xdf, 0x50, 0x91, 0xa2, 0x17, 0xd5, 0x86, 0x92, 0x91, 0xfe, 0xbf, 0x6a, 0x82, + 0x09, 0x66, 0x93, 0x24, 0x05, 0x07, 0x51, 0x54, 0x97, 0x24, 0x8d, 0x35, 0x48, 0x92, 0x25, 0x05, + 0x43, 0x44, 0x07, 0x51, 0x97, 0x53, 0x7d, 0x10, 0x8d, 0x35, 0x08, 0x62, 0x49, 0x95, 0xa7, 0x0b, + 0x58, 0x51, 0xd2, 0xd3, 0x98, 0xea, 0x40, 0x5b, 0xd5, 0xe6, 0x16, 0x94, 0xa1, 0xb6, 0x1b, 0xb3, + 0x2a, 0xd8, 0x1f, 0xba, 0xf0, 0x27, 0x04, 0xf3, 0xfa, 0xc2, 0x67, 0x54, 0x83, 0xc2, 0x1b, 0x50, + 0xdd, 0xcd, 0x0b, 0xaf, 0xb2, 0x5f, 0x75, 0x15, 0x73, 0xa1, 0x89, 0xea, 0xb9, 0xb0, 0x90, 0xda, + 0x79, 0x0c, 0x0f, 0xdf, 0xea, 0x17, 0xd7, 0x14, 0xa4, 0xfc, 0xec, 0x13, 0xa4, 0x8c, 0xf3, 0x75, + 0x73, 0x58, 0xc5, 0xfb, 0x08, 0x8f, 0x8c, 0xc2, 0xbc, 0x1c, 0xa8, 0xde, 0x87, 0x41, 0x65, 0xc4, + 0x9d, 0x19, 0x68, 0x15, 0x32, 0x85, 0xc7, 0x46, 0x93, 0x37, 0x43, 0xbd, 0x97, 0x42, 0x3f, 0xf4, + 0x67, 0xc1, 0x27, 0x13, 0x7b, 0xca, 0xce, 0x39, 0x0e, 0x49, 0x83, 0xc4, 0x6a, 0xb2, 0x59, 0x62, + 0x2d, 0xac, 0xe2, 0x9d, 0xc0, 0xfc, 0xa9, 0xfa, 0x25, 0x5f, 0xf1, 0xe8, 0x64, 0x40, 0xf5, 0xa3, + 0x63, 0x18, 0xe5, 0x94, 0xc2, 0x8a, 0x89, 0xa6, 0x5b, 0x7b, 0xab, 0x76, 0x5b, 0x79, 0x77, 0x6f, + 0x37, 0x66, 0xb3, 0xbb, 0xc7, 0x48, 0xd5, 0xd5, 0xd6, 0xab, 0x35, 0x36, 0xb7, 0xdb, 0x66, 0x43, + 0x52, 0x30, 0x59, 0x94, 0xec, 0xdd, 0x19, 0xd9, 0xe6, 0x2b, 0xdf, 0xe4, 0x04, 0x59, 0x5d, 0x94, + 0x1b, 0xb0, 0xb9, 0x84, 0xb4, 0xe2, 0xa8, 0xf6, 0x12, 0x2a, 0x82, 0xd5, 0xf9, 0x9b, 0x64, 0xcd, + 0x68, 0x69, 0x79, 0xde, 0xe6, 0xb5, 0x1b, 0x2e, 0x74, 0xf9, 0xce, 0x0c, 0xb4, 0x19, 0x2d, 0xa3, + 0xc9, 0x9a, 0xf1, 0xa0, 0x72, 0xb4, 0x6e, 0xb0, 0xd5, 0xa3, 0x35, 0x05, 0x57, 0x51, 0xff, 0x71, + 0xc0, 0xd5, 0x3a, 0x9f, 0x88, 0x24, 0xba, 0x26, 0x87, 0x84, 0x91, 0x38, 0x24, 0x71, 0x40, 0x89, + 0x40, 0xdf, 0xd7, 0x39, 0x9c, 0x62, 0x24, 0x37, 0xf2, 0xc3, 0x27, 0xd9, 0x09, 0x86, 0xde, 0xc3, + 0xb2, 0x26, 0xf4, 0x90, 0x6c, 0xd6, 0x79, 0xca, 0x67, 0x64, 0xab, 0x29, 0x2a, 0x98, 0x7c, 0x65, + 0xb4, 0x50, 0x4d, 0xc8, 0x46, 0x9d, 0xa9, 0x19, 0x90, 0x5e, 0x33, 0x50, 0xb0, 0x97, 0x3b, 0xef, + 0xb6, 0xcf, 0x69, 0xfa, 0xe1, 0x6a, 0x28, 0x91, 0x5d, 0x6d, 0x62, 0xfe, 0xee, 0x04, 0x11, 0xdd, + 0xe5, 0x2c, 0xb0, 0x5f, 0x2f, 0x86, 0xf3, 0xea, 0x03, 0xc1, 0xb7, 0xff, 0x07, 0x00, 0x00, 0xff, + 0xff, 0x21, 0xf8, 0x69, 0x20, 0xd9, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // 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.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // ArduinoCoreClient is the client API for ArduinoCore service. // @@ -648,6 +652,9 @@ type ArduinoCoreClient interface { BoardList(ctx context.Context, in *BoardListReq, opts ...grpc.CallOption) (*BoardListResp, error) // List all the boards provided by installed platforms. BoardListAll(ctx context.Context, in *BoardListAllReq, opts ...grpc.CallOption) (*BoardListAllResp, error) + BoardInstall(ctx context.Context, in *BoardInstallReq, opts ...grpc.CallOption) (ArduinoCore_BoardInstallClient, error) + BoardUninstall(ctx context.Context, in *BoardUninstallReq, opts ...grpc.CallOption) (ArduinoCore_BoardUninstallClient, error) + BoardSearch(ctx context.Context, in *BoardSearchReq, opts ...grpc.CallOption) (*BoardSearchResp, error) Compile(ctx context.Context, in *CompileReq, opts ...grpc.CallOption) (ArduinoCore_CompileClient, error) // Download and install a platform and its tool dependencies. PlatformInstall(ctx context.Context, in *PlatformInstallReq, opts ...grpc.CallOption) (ArduinoCore_PlatformInstallClient, error) @@ -674,10 +681,10 @@ type ArduinoCoreClient interface { } type arduinoCoreClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewArduinoCoreClient(cc *grpc.ClientConn) ArduinoCoreClient { +func NewArduinoCoreClient(cc grpc.ClientConnInterface) ArduinoCoreClient { return &arduinoCoreClient{cc} } @@ -863,8 +870,81 @@ func (c *arduinoCoreClient) BoardListAll(ctx context.Context, in *BoardListAllRe return out, nil } +func (c *arduinoCoreClient) BoardInstall(ctx context.Context, in *BoardInstallReq, opts ...grpc.CallOption) (ArduinoCore_BoardInstallClient, error) { + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[4], "/cc.arduino.cli.commands.ArduinoCore/BoardInstall", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreBoardInstallClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ArduinoCore_BoardInstallClient interface { + Recv() (*BoardInstallResp, error) + grpc.ClientStream +} + +type arduinoCoreBoardInstallClient struct { + grpc.ClientStream +} + +func (x *arduinoCoreBoardInstallClient) Recv() (*BoardInstallResp, error) { + m := new(BoardInstallResp) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *arduinoCoreClient) BoardUninstall(ctx context.Context, in *BoardUninstallReq, opts ...grpc.CallOption) (ArduinoCore_BoardUninstallClient, error) { + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[5], "/cc.arduino.cli.commands.ArduinoCore/BoardUninstall", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreBoardUninstallClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ArduinoCore_BoardUninstallClient interface { + Recv() (*BoardUninstallResp, error) + grpc.ClientStream +} + +type arduinoCoreBoardUninstallClient struct { + grpc.ClientStream +} + +func (x *arduinoCoreBoardUninstallClient) Recv() (*BoardUninstallResp, error) { + m := new(BoardUninstallResp) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *arduinoCoreClient) BoardSearch(ctx context.Context, in *BoardSearchReq, opts ...grpc.CallOption) (*BoardSearchResp, error) { + out := new(BoardSearchResp) + err := c.cc.Invoke(ctx, "/cc.arduino.cli.commands.ArduinoCore/BoardSearch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *arduinoCoreClient) Compile(ctx context.Context, in *CompileReq, opts ...grpc.CallOption) (ArduinoCore_CompileClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[4], "/cc.arduino.cli.commands.ArduinoCore/Compile", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[6], "/cc.arduino.cli.commands.ArduinoCore/Compile", opts...) if err != nil { return nil, err } @@ -896,7 +976,7 @@ func (x *arduinoCoreCompileClient) Recv() (*CompileResp, error) { } func (c *arduinoCoreClient) PlatformInstall(ctx context.Context, in *PlatformInstallReq, opts ...grpc.CallOption) (ArduinoCore_PlatformInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[5], "/cc.arduino.cli.commands.ArduinoCore/PlatformInstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[7], "/cc.arduino.cli.commands.ArduinoCore/PlatformInstall", opts...) if err != nil { return nil, err } @@ -928,7 +1008,7 @@ func (x *arduinoCorePlatformInstallClient) Recv() (*PlatformInstallResp, error) } func (c *arduinoCoreClient) PlatformDownload(ctx context.Context, in *PlatformDownloadReq, opts ...grpc.CallOption) (ArduinoCore_PlatformDownloadClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[6], "/cc.arduino.cli.commands.ArduinoCore/PlatformDownload", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[8], "/cc.arduino.cli.commands.ArduinoCore/PlatformDownload", opts...) if err != nil { return nil, err } @@ -960,7 +1040,7 @@ func (x *arduinoCorePlatformDownloadClient) Recv() (*PlatformDownloadResp, error } func (c *arduinoCoreClient) PlatformUninstall(ctx context.Context, in *PlatformUninstallReq, opts ...grpc.CallOption) (ArduinoCore_PlatformUninstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[7], "/cc.arduino.cli.commands.ArduinoCore/PlatformUninstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[9], "/cc.arduino.cli.commands.ArduinoCore/PlatformUninstall", opts...) if err != nil { return nil, err } @@ -992,7 +1072,7 @@ func (x *arduinoCorePlatformUninstallClient) Recv() (*PlatformUninstallResp, err } func (c *arduinoCoreClient) PlatformUpgrade(ctx context.Context, in *PlatformUpgradeReq, opts ...grpc.CallOption) (ArduinoCore_PlatformUpgradeClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[8], "/cc.arduino.cli.commands.ArduinoCore/PlatformUpgrade", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[10], "/cc.arduino.cli.commands.ArduinoCore/PlatformUpgrade", opts...) if err != nil { return nil, err } @@ -1024,7 +1104,7 @@ func (x *arduinoCorePlatformUpgradeClient) Recv() (*PlatformUpgradeResp, error) } func (c *arduinoCoreClient) Upload(ctx context.Context, in *UploadReq, opts ...grpc.CallOption) (ArduinoCore_UploadClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[9], "/cc.arduino.cli.commands.ArduinoCore/Upload", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[11], "/cc.arduino.cli.commands.ArduinoCore/Upload", opts...) if err != nil { return nil, err } @@ -1074,7 +1154,7 @@ func (c *arduinoCoreClient) PlatformList(ctx context.Context, in *PlatformListRe } func (c *arduinoCoreClient) LibraryDownload(ctx context.Context, in *LibraryDownloadReq, opts ...grpc.CallOption) (ArduinoCore_LibraryDownloadClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[10], "/cc.arduino.cli.commands.ArduinoCore/LibraryDownload", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[12], "/cc.arduino.cli.commands.ArduinoCore/LibraryDownload", opts...) if err != nil { return nil, err } @@ -1106,7 +1186,7 @@ func (x *arduinoCoreLibraryDownloadClient) Recv() (*LibraryDownloadResp, error) } func (c *arduinoCoreClient) LibraryInstall(ctx context.Context, in *LibraryInstallReq, opts ...grpc.CallOption) (ArduinoCore_LibraryInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[11], "/cc.arduino.cli.commands.ArduinoCore/LibraryInstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[13], "/cc.arduino.cli.commands.ArduinoCore/LibraryInstall", opts...) if err != nil { return nil, err } @@ -1138,7 +1218,7 @@ func (x *arduinoCoreLibraryInstallClient) Recv() (*LibraryInstallResp, error) { } func (c *arduinoCoreClient) LibraryUninstall(ctx context.Context, in *LibraryUninstallReq, opts ...grpc.CallOption) (ArduinoCore_LibraryUninstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[12], "/cc.arduino.cli.commands.ArduinoCore/LibraryUninstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[14], "/cc.arduino.cli.commands.ArduinoCore/LibraryUninstall", opts...) if err != nil { return nil, err } @@ -1170,7 +1250,7 @@ func (x *arduinoCoreLibraryUninstallClient) Recv() (*LibraryUninstallResp, error } func (c *arduinoCoreClient) LibraryUpgradeAll(ctx context.Context, in *LibraryUpgradeAllReq, opts ...grpc.CallOption) (ArduinoCore_LibraryUpgradeAllClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[13], "/cc.arduino.cli.commands.ArduinoCore/LibraryUpgradeAll", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[15], "/cc.arduino.cli.commands.ArduinoCore/LibraryUpgradeAll", opts...) if err != nil { return nil, err } @@ -1251,6 +1331,9 @@ type ArduinoCoreServer interface { BoardList(context.Context, *BoardListReq) (*BoardListResp, error) // List all the boards provided by installed platforms. BoardListAll(context.Context, *BoardListAllReq) (*BoardListAllResp, error) + BoardInstall(*BoardInstallReq, ArduinoCore_BoardInstallServer) error + BoardUninstall(*BoardUninstallReq, ArduinoCore_BoardUninstallServer) error + BoardSearch(context.Context, *BoardSearchReq) (*BoardSearchResp, error) Compile(*CompileReq, ArduinoCore_CompileServer) error // Download and install a platform and its tool dependencies. PlatformInstall(*PlatformInstallReq, ArduinoCore_PlatformInstallServer) error @@ -1276,6 +1359,95 @@ 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) BoardInstall(req *BoardInstallReq, srv ArduinoCore_BoardInstallServer) error { + return status.Errorf(codes.Unimplemented, "method BoardInstall not implemented") +} +func (*UnimplementedArduinoCoreServer) BoardUninstall(req *BoardUninstallReq, srv ArduinoCore_BoardUninstallServer) error { + return status.Errorf(codes.Unimplemented, "method BoardUninstall not implemented") +} +func (*UnimplementedArduinoCoreServer) BoardSearch(ctx context.Context, req *BoardSearchReq) (*BoardSearchResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method BoardSearch 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) } @@ -1472,6 +1644,66 @@ func _ArduinoCore_BoardListAll_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _ArduinoCore_BoardInstall_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(BoardInstallReq) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ArduinoCoreServer).BoardInstall(m, &arduinoCoreBoardInstallServer{stream}) +} + +type ArduinoCore_BoardInstallServer interface { + Send(*BoardInstallResp) error + grpc.ServerStream +} + +type arduinoCoreBoardInstallServer struct { + grpc.ServerStream +} + +func (x *arduinoCoreBoardInstallServer) Send(m *BoardInstallResp) error { + return x.ServerStream.SendMsg(m) +} + +func _ArduinoCore_BoardUninstall_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(BoardUninstallReq) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ArduinoCoreServer).BoardUninstall(m, &arduinoCoreBoardUninstallServer{stream}) +} + +type ArduinoCore_BoardUninstallServer interface { + Send(*BoardUninstallResp) error + grpc.ServerStream +} + +type arduinoCoreBoardUninstallServer struct { + grpc.ServerStream +} + +func (x *arduinoCoreBoardUninstallServer) Send(m *BoardUninstallResp) error { + return x.ServerStream.SendMsg(m) +} + +func _ArduinoCore_BoardSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BoardSearchReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServer).BoardSearch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.cli.commands.ArduinoCore/BoardSearch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServer).BoardSearch(ctx, req.(*BoardSearchReq)) + } + return interceptor(ctx, in, info, handler) +} + func _ArduinoCore_Compile_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(CompileReq) if err := stream.RecvMsg(m); err != nil { @@ -1800,6 +2032,10 @@ var _ArduinoCore_serviceDesc = grpc.ServiceDesc{ MethodName: "BoardListAll", Handler: _ArduinoCore_BoardListAll_Handler, }, + { + MethodName: "BoardSearch", + Handler: _ArduinoCore_BoardSearch_Handler, + }, { MethodName: "PlatformSearch", Handler: _ArduinoCore_PlatformSearch_Handler, @@ -1842,6 +2078,16 @@ var _ArduinoCore_serviceDesc = grpc.ServiceDesc{ Handler: _ArduinoCore_BoardAttach_Handler, ServerStreams: true, }, + { + StreamName: "BoardInstall", + Handler: _ArduinoCore_BoardInstall_Handler, + ServerStreams: true, + }, + { + StreamName: "BoardUninstall", + Handler: _ArduinoCore_BoardUninstall_Handler, + ServerStreams: true, + }, { StreamName: "Compile", Handler: _ArduinoCore_Compile_Handler, diff --git a/rpc/commands/commands.proto b/rpc/commands/commands.proto index f2201d0f4f3..1f05ef0df94 100644 --- a/rpc/commands/commands.proto +++ b/rpc/commands/commands.proto @@ -65,6 +65,12 @@ service ArduinoCore { // List all the boards provided by installed platforms. rpc BoardListAll(BoardListAllReq) returns (BoardListAllResp); + rpc BoardInstall(BoardInstallReq) returns (stream BoardInstallResp); + + rpc BoardUninstall(BoardUninstallReq) returns (stream BoardUninstallResp); + + rpc BoardSearch(BoardSearchReq) returns (BoardSearchResp); + rpc Compile(CompileReq) returns (stream CompileResp); // Download and install a platform and its tool dependencies. diff --git a/rpc/commands/compile.pb.go b/rpc/commands/compile.pb.go index e215253816f..71fb76614a6 100644 --- a/rpc/commands/compile.pb.go +++ b/rpc/commands/compile.pb.go @@ -22,7 +22,7 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type CompileReq 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"` + Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` // Deprecated: Do not use. SketchPath string `protobuf:"bytes,3,opt,name=sketchPath,proto3" json:"sketchPath,omitempty"` ShowProperties bool `protobuf:"varint,4,opt,name=showProperties,proto3" json:"showProperties,omitempty"` Preprocess bool `protobuf:"varint,5,opt,name=preprocess,proto3" json:"preprocess,omitempty"` @@ -38,6 +38,8 @@ type CompileReq struct { Libraries []string `protobuf:"bytes,15,rep,name=libraries,proto3" json:"libraries,omitempty"` OptimizeForDebug bool `protobuf:"varint,16,opt,name=optimizeForDebug,proto3" json:"optimizeForDebug,omitempty"` DryRun bool `protobuf:"varint,17,opt,name=dryRun,proto3" json:"dryRun,omitempty"` + Board string `protobuf:"bytes,18,opt,name=board,proto3" json:"board,omitempty"` + BoardConfig []string `protobuf:"bytes,19,rep,name=board_config,json=boardConfig,proto3" json:"board_config,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -75,6 +77,7 @@ func (m *CompileReq) GetInstance() *Instance { return nil } +// Deprecated: Do not use. func (m *CompileReq) GetFqbn() string { if m != nil { return m.Fqbn @@ -187,6 +190,20 @@ func (m *CompileReq) GetDryRun() bool { return false } +func (m *CompileReq) GetBoard() string { + if m != nil { + return m.Board + } + return "" +} + +func (m *CompileReq) GetBoardConfig() []string { + if m != nil { + return m.BoardConfig + } + return nil +} + type CompileResp struct { OutStream []byte `protobuf:"bytes,1,opt,name=out_stream,json=outStream,proto3" json:"out_stream,omitempty"` ErrStream []byte `protobuf:"bytes,2,opt,name=err_stream,json=errStream,proto3" json:"err_stream,omitempty"` @@ -242,33 +259,35 @@ func init() { func init() { proto.RegisterFile("commands/compile.proto", fileDescriptor_86bc582849c76c3d) } var fileDescriptor_86bc582849c76c3d = []byte{ - // 437 bytes of a gzipped FileDescriptorProto + // 470 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xc1, 0x6f, 0xd3, 0x30, - 0x14, 0xc6, 0x95, 0xad, 0xed, 0x9a, 0xd7, 0xb1, 0x0d, 0x0b, 0x86, 0x35, 0x01, 0x0a, 0x3b, 0xa0, - 0x08, 0xb4, 0x54, 0x82, 0x33, 0x17, 0x86, 0x26, 0x21, 0x2e, 0x55, 0xb8, 0x71, 0x41, 0x89, 0xf3, - 0x68, 0x0c, 0x49, 0x9c, 0x3e, 0x3b, 0x2b, 0xf0, 0x5f, 0xf1, 0x1f, 0x22, 0xbf, 0x34, 0x6d, 0x55, - 0xc4, 0xc9, 0x7e, 0xbf, 0xf7, 0xf9, 0xf9, 0xb3, 0xf5, 0xc1, 0xa5, 0x32, 0x75, 0x9d, 0x35, 0x85, - 0x9d, 0x2b, 0x53, 0xb7, 0xba, 0xc2, 0xa4, 0x25, 0xe3, 0x8c, 0x78, 0xa2, 0x54, 0x92, 0x51, 0xd1, - 0xe9, 0xc6, 0x24, 0xaa, 0xd2, 0xc9, 0x20, 0xbb, 0x7a, 0xbc, 0x7f, 0xa0, 0x36, 0x4d, 0xaf, 0xbf, - 0xfe, 0x33, 0x02, 0xb8, 0xed, 0x27, 0xa4, 0xb8, 0x12, 0xef, 0x60, 0xaa, 0x1b, 0xeb, 0xb2, 0x46, - 0xa1, 0x0c, 0xa2, 0x20, 0x9e, 0xbd, 0x79, 0x91, 0xfc, 0x67, 0x62, 0xf2, 0x71, 0x23, 0x4c, 0xb7, - 0x47, 0x84, 0x80, 0xd1, 0xb7, 0x55, 0xde, 0xc8, 0xa3, 0x28, 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0x58, + 0x74, 0x81, 0x3d, 0x03, 0x00, 0x00, } diff --git a/rpc/commands/compile.proto b/rpc/commands/compile.proto index 63c8667a06f..e5167f413e3 100644 --- a/rpc/commands/compile.proto +++ b/rpc/commands/compile.proto @@ -23,7 +23,7 @@ import "commands/common.proto"; message CompileReq { Instance instance = 1; - string fqbn = 2; // Fully Qualified Board Name, e.g.: arduino:avr:uno. + string fqbn = 2 [deprecated=true]; // Fully Qualified Board Name, e.g.: arduino:avr:uno. DEPRECATED: use "board" and "board_config" fields instead. string sketchPath = 3; bool showProperties = 4; // Show all build preferences used instead of compiling. bool preprocess = 5; // Print preprocessed code to stdout. @@ -39,6 +39,8 @@ message CompileReq { repeated string libraries = 15; // List of custom libraries paths separated by commas. Or can be used multiple times for multiple libraries paths. bool optimizeForDebug = 16; // Optimize compile output for debug, not for release bool dryRun = 17; // When set to true the compiled binary will not be copied to the export directory + string board = 18; // Board FQBN or Board alias + repeated string board_config = 19; } message CompileResp { diff --git a/rpc/commands/upload.pb.go b/rpc/commands/upload.pb.go index 47d5b983876..c4ed7dbf66c 100644 --- a/rpc/commands/upload.pb.go +++ b/rpc/commands/upload.pb.go @@ -22,12 +22,14 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type UploadReq 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"` + Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` // Deprecated: Do not use. 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"` Verify bool `protobuf:"varint,6,opt,name=verify,proto3" json:"verify,omitempty"` ImportFile string `protobuf:"bytes,7,opt,name=import_file,json=importFile,proto3" json:"import_file,omitempty"` + Board string `protobuf:"bytes,8,opt,name=board,proto3" json:"board,omitempty"` + BoardConfig []string `protobuf:"bytes,9,rep,name=board_config,json=boardConfig,proto3" json:"board_config,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -65,6 +67,7 @@ func (m *UploadReq) GetInstance() *Instance { return nil } +// Deprecated: Do not use. func (m *UploadReq) GetFqbn() string { if m != nil { return m.Fqbn @@ -107,6 +110,20 @@ func (m *UploadReq) GetImportFile() string { return "" } +func (m *UploadReq) GetBoard() string { + if m != nil { + return m.Board + } + return "" +} + +func (m *UploadReq) GetBoardConfig() []string { + if m != nil { + return m.BoardConfig + } + return nil +} + type UploadResp struct { OutStream []byte `protobuf:"bytes,1,opt,name=out_stream,json=outStream,proto3" json:"out_stream,omitempty"` ErrStream []byte `protobuf:"bytes,2,opt,name=err_stream,json=errStream,proto3" json:"err_stream,omitempty"` @@ -162,24 +179,26 @@ func init() { func init() { proto.RegisterFile("commands/upload.proto", fileDescriptor_cd642cc079f8acdb) } var fileDescriptor_cd642cc079f8acdb = []byte{ - // 291 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x4f, 0x4b, 0xc4, 0x30, - 0x10, 0xc5, 0xe9, 0xba, 0xee, 0x9f, 0x59, 0x4f, 0x01, 0x35, 0x08, 0xe2, 0xba, 0xa7, 0x05, 0xd9, - 0x14, 0xf4, 0xec, 0xc5, 0x83, 0xa0, 0x27, 0xa9, 0x78, 0xf1, 0x52, 0xd2, 0x34, 0xb5, 0xc1, 0x36, - 0xc9, 0x26, 0xe9, 0x82, 0x5f, 0xd8, 0xcf, 0x21, 0x49, 0x1a, 0x3d, 0x79, 0xca, 0x64, 0x7e, 0xef, - 0xcd, 0x30, 0x0f, 0x4e, 0x99, 0xea, 0x7b, 0x2a, 0x6b, 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, - 0xd7, 0x0e, 0x95, 0x4f, 0x23, 0x1f, 0xd3, 0x49, 0xef, 0x8e, 0x75, 0x22, 0x37, 0x9a, 0xe5, 0x29, - 0xa9, 0x6a, 0x16, 0xa2, 0xbe, 0xfb, 0x09, 0x00, 0x00, 0xff, 0xff, 0xfc, 0xf8, 0xc5, 0x33, 0xb3, - 0x01, 0x00, 0x00, + // 328 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xcf, 0x4a, 0xf4, 0x30, + 0x14, 0xc5, 0x69, 0xe7, 0x6f, 0xef, 0xcc, 0x2a, 0x7c, 0xdf, 0x18, 0x04, 0xb1, 0x33, 0xab, 0x82, + 0x4c, 0x0b, 0xba, 0x76, 0x33, 0x82, 0xa0, 0x2b, 0x89, 0xb8, 0x71, 0x53, 0xd2, 0x34, 0x9d, 0x06, + 0xdb, 0xa4, 0x93, 0xa6, 0x03, 0x3e, 0x8f, 0x2f, 0x2a, 0x4d, 0x5a, 0x5d, 0xb9, 0xea, 0x3d, 0xe7, + 0x77, 0x72, 0x2f, 0x9c, 0xc2, 0x7f, 0xa6, 0xea, 0x9a, 0xca, 0xbc, 0x4d, 0xba, 0xa6, 0x52, 0x34, + 0x8f, 0x1b, 0xad, 0x8c, 0x42, 0x17, 0x8c, 0xc5, 0x54, 0xe7, 0x9d, 0x90, 0x2a, 0x66, 0x95, 0x88, + 0xc7, 0xd4, 0xe5, 0x6f, 0xbe, 0x1f, 0x94, 0x74, 0xf9, 0xdd, 0x97, 0x0f, 0xc1, 0x9b, 0x5d, 0x40, + 0xf8, 0x09, 0xdd, 0xc3, 0x52, 0xc8, 0xd6, 0x50, 0xc9, 0x38, 0xf6, 0x42, 0x2f, 0x5a, 0xdd, 0x6e, + 0xe3, 0x3f, 0x16, 0xc6, 0x4f, 0x43, 0x90, 0xfc, 0x3c, 0x41, 0x1b, 0x98, 0x16, 0xa7, 0x4c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xf0, 0x01, 0x00, 0x00, } diff --git a/rpc/commands/upload.proto b/rpc/commands/upload.proto index ad5b747643c..b84219eab93 100644 --- a/rpc/commands/upload.proto +++ b/rpc/commands/upload.proto @@ -22,13 +22,15 @@ option go_package = "github.com/arduino/arduino-cli/rpc/commands"; import "commands/common.proto"; message UploadReq { - Instance instance = 1; - string fqbn = 2; - string sketch_path = 3; + Instance instance = 1; + string fqbn = 2 [deprecated=true]; // DEPRECATED: use "board" and "board_config" fields instead. + string sketch_path = 3; string port = 4; bool verbose = 5; bool verify = 6; string import_file = 7; + string board = 8; + repeated string board_config = 9; } message UploadResp { diff --git a/rpc/debug/debug.pb.go b/rpc/debug/debug.pb.go index 1b80d774d02..0ef7d3c0fb4 100644 --- a/rpc/debug/debug.pb.go +++ b/rpc/debug/debug.pb.go @@ -9,6 +9,8 @@ import ( 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" ) @@ -252,11 +254,11 @@ var fileDescriptor_5ae24eab94cb53d5 = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // 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.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // DebugClient is the client API for Debug service. // @@ -266,10 +268,10 @@ type DebugClient interface { } type debugClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewDebugClient(cc *grpc.ClientConn) DebugClient { +func NewDebugClient(cc grpc.ClientConnInterface) DebugClient { return &debugClient{cc} } @@ -309,6 +311,14 @@ 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/monitor/monitor.pb.go b/rpc/monitor/monitor.pb.go index 74dc8680d57..3f68a33920f 100644 --- a/rpc/monitor/monitor.pb.go +++ b/rpc/monitor/monitor.pb.go @@ -9,6 +9,8 @@ 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" ) @@ -270,11 +272,11 @@ var fileDescriptor_94d5950496a7550d = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // 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.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // MonitorClient is the client API for Monitor service. // @@ -286,10 +288,10 @@ type MonitorClient interface { } type monitorClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewMonitorClient(cc *grpc.ClientConn) MonitorClient { +func NewMonitorClient(cc grpc.ClientConnInterface) MonitorClient { return &monitorClient{cc} } @@ -331,6 +333,14 @@ 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 fc5a583eb53..212048e452b 100644 --- a/rpc/settings/settings.pb.go +++ b/rpc/settings/settings.pb.go @@ -8,6 +8,8 @@ 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" ) @@ -279,11 +281,11 @@ var fileDescriptor_a4bfd59e429426d0 = []byte{ // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // 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.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // SettingsClient is the client API for Settings service. // @@ -300,10 +302,10 @@ type SettingsClient interface { } type settingsClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewSettingsClient(cc *grpc.ClientConn) SettingsClient { +func NewSettingsClient(cc grpc.ClientConnInterface) SettingsClient { return &settingsClient{cc} } @@ -355,6 +357,23 @@ 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) }