-
-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[skip-changelog] refactor: Made
command
functions to access Package…
…Manager unavailable from public API (#2335) * Let instance commands require an *rpc.Instance Removed the shorthand of the InstanceCommand interface. This makes the API more coherent among the `commands` instance handling. * Moved 'command' package's instances functions inside internal package This change highlights the incorrect PackageManager access in 'cli' package. Now those are errors: package github.com/arduino/arduino-cli imports github.com/arduino/arduino-cli/internal/cli imports github.com/arduino/arduino-cli/internal/cli/board imports github.com/arduino/arduino-cli/internal/cli/arguments internal/cli/arguments/completion.go:23:2: use of internal package github.com/arduino/arduino-cli/commands/internal/instances not allowed package github.com/arduino/arduino-cli imports github.com/arduino/arduino-cli/internal/cli imports github.com/arduino/arduino-cli/internal/cli/board imports github.com/arduino/arduino-cli/internal/cli/arguments internal/cli/arguments/port.go:24:2: use of internal package github.com/arduino/arduino-cli/commands/internal/instances not allowed * Made CoreInstance private * Inlined coreInstancesContainer singleton methods * Removed all wrong accesses to package Explorer * Replaced DiscoveryManager.Watch with equivalent gRPC BoardListWatch call * Replaced direct access to PackageManager to get discovery protocols Previously the function GetConnectedBoards() counter-intuitively returned a list of port address. Now it has been reneamed GetAvailablePorts() and returns the full Port object that is mapped into an array of Addresses or into an array of Prorocols based on the auto-completion request.
- Loading branch information
Showing
31 changed files
with
237 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.