-
-
Notifications
You must be signed in to change notification settings - Fork 422
Commit 4b2a32b
[skip-changelog] refactor: Made
* 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.command
functions to access PackageManager unavailable from public API (#2335)1 parent 1e51cdc commit 4b2a32b
File tree
31 files changed
+237
-271
lines changed- commands
- board
- compile
- core
- debug
- internal/instances
- lib
- monitor
- upload
- internal
- cli/arguments
- integrationtest/completion
- rpc/cc/arduino/cli/commands/v1
31 files changed
+237
-271
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 | - | ||
24 | + | ||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 | - | ||
31 | + | ||
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
34 | - | ||
34 | + | ||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| |||
203 | 203 |
| |
204 | 204 |
| |
205 | 205 |
| |
206 | - | ||
206 | + | ||
207 | 207 |
| |
208 | 208 |
| |
209 | 209 |
| |
| |||
258 | 258 |
| |
259 | 259 |
| |
260 | 260 |
| |
261 | - | ||
261 | + | ||
262 | 262 |
| |
263 | 263 |
| |
264 | 264 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 | - | ||
26 | + | ||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 | - | ||
32 | + | ||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 | - | ||
25 | + | ||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
34 | - | ||
34 | + | ||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
33 | - | ||
33 | + | ||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 | - | ||
60 | + | ||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
65 | 65 |
| |
66 | - | ||
66 | + | ||
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 | + | ||
24 | 25 |
| |
25 | 26 |
| |
26 | 27 |
| |
| |||
29 | 30 |
| |
30 | 31 |
| |
31 | 32 |
| |
32 | - | ||
33 | + | ||
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 | + | ||
25 | 26 |
| |
26 | 27 |
| |
27 | 28 |
| |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
31 | - | ||
32 | + | ||
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 | + | ||
25 | 26 |
| |
26 | 27 |
| |
27 | 28 |
| |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
31 | - | ||
32 | + | ||
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
27 | + | ||
27 | 28 |
| |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
31 | 32 |
| |
32 | - | ||
33 | + | ||
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 | + | ||
24 | 25 |
| |
25 | 26 |
| |
26 | 27 |
| |
| |||
37 | 38 |
| |
38 | 39 |
| |
39 | 40 |
| |
40 | - | ||
41 | + | ||
41 | 42 |
| |
42 | 43 |
| |
43 | 44 |
| |
|
0 commit comments