-
-
Notifications
You must be signed in to change notification settings - Fork 446
Commit b53fd99
Added gRPC functions to manage libraries in profiles (#3019)
* Added gRPC functions to manage libraries in profiles
* Removed ProfileDump gRPC command.
As stated by @per1234:
> Build profile data is already provided via the LoadSketch method, so it
> seems that even a mechanism that is truly for getting profile data should
> be implemented by simply expanding the SketchProfile message to contain
> all the data of the build profile (actually kind of silly that it
> currently only provides a subset of the profile data).
#3019 (comment)
* Moved SketchProfileLibraryReference in the proper commono.proto file
* linter: removed unneeded type specification
* Renamed SketchProfileLibraryReference -> ProfileLibraryReference
* Renamed InitProfile -> ProfileCreate
And also corresponding messages:
InitProfileRequest -> ProfileCreateRequest
InitProfileResponse -> ProfileCreateResponse
* Small refactoring, no code change
* Fixed error messages
* Removed unnecessary type specifier
* Refactored libraryResolveDependencies.
The function is now split into two functions:
- librariesGetAllInstalled that requires a librariesmanager.Explorer.
- libraryResolveDependencies that requires only a librariesindex.Index
and do not require anymore a librariesmanager.Explorer.
* Added support for 'dependency:' field in profiles libraries
* ProfileLibAdd and ProfileLibRemove can now cleanup unneeded dependencies
* Better error messages
* Simplified Profile.RemoveLibrary(...) method.
* Fixed algorithm for determination of required deps
* Updated docs
* Rename DuplicateProfileError -> ProfileAlreadyExitsError
* Removed useless field in gRPC ProfileCreateResponse
* fix: ProfileCreate sets the new profile as default only if asked to do so
* Improved docs
Co-authored-by: Per Tillisch <accounts@perglass.com>
* Applied code review suggestion
* Using cmp.Or helper
---------
Co-authored-by: Per Tillisch <accounts@perglass.com>1 parent 8f81c72 commit b53fd99
File tree
22 files changed
+3470
-704
lines changed- commands
- cmderrors
- docs
- internal
- arduino
- libraries/librariesindex
- sketch
- testdata/profiles
- cli/feedback/result
- integrationtest
- daemon
- rpc/cc/arduino/cli/commands/v1
22 files changed
+3470
-704
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | + | ||
35 | + | ||
36 | + | ||
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
212 | 215 | | |
213 | 216 | | |
214 | 217 | | |
218 | + | ||
219 | + | ||
220 | + | ||
221 | + | ||
222 | + | ||
223 | + | ||
224 | + | ||
225 | + | ||
226 | + | ||
227 | + | ||
228 | + | ||
229 | + | ||
230 | + | ||
231 | + | ||
215 | 232 | | |
216 | 233 | | |
217 | 234 | | |
| |||
456 | 473 | | |
457 | 474 | | |
458 | 475 | | |
459 | - | ||
476 | + | ||
460 | 477 | | |
461 | 478 | | |
462 | 479 | | |
| |||
904 | 921 | | |
905 | 922 | | |
906 | 923 | | |
924 | + | ||
925 | + | ||
926 | + | ||
927 | + | ||
928 | + | ||
929 | + | ||
930 | + | ||
931 | + | ||
932 | + | ||
933 | + | ||
934 | + | ||
935 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | - | ||
70 | + | ||
71 | 71 | | |
72 | - | ||
73 | - | ||
74 | - | ||
72 | + | ||
73 | + | ||
74 | + | ||
75 | 75 | | |
76 | + | ||
77 | + | ||
78 | + | ||
79 | + | ||
80 | + | ||
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
81 | 86 | | |
82 | 87 | | |
83 | - | ||
88 | + | ||
89 | + | ||
90 | + | ||
91 | + | ||
92 | + | ||
84 | 93 | | |
85 | 94 | | |
86 | 95 | | |
87 | 96 | | |
88 | 97 | | |
89 | - | ||
98 | + | ||
90 | 99 | | |
91 | - | ||
100 | + | ||
92 | 101 | | |
93 | 102 | | |
94 | - | ||
103 | + | ||
95 | 104 | | |
96 | 105 | | |
97 | 106 | | |
| |||
118 | 127 | | |
119 | 128 | | |
120 | 129 | | |
121 | - | ||
122 | - | ||
123 | - | ||
124 | - | ||
125 | - | ||
126 | - | ||
127 | - | ||
128 | - | ||
129 | - | ||
130 | - | ||
130 | + | ||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | - | ||
47 | - | ||
48 | - | ||
49 | - | ||
50 | - | ||
51 | - | ||
52 | - | ||
53 | - | ||
46 | + | ||
47 | + | ||
48 | + | ||
54 | 49 | | |
55 | - | ||
56 | - | ||
57 | - | ||
50 | + | ||
58 | 51 | | |
59 | 52 | | |
60 | 53 | | |
| |||
65 | 58 | | |
66 | 59 | | |
67 | 60 | | |
68 | - | ||
69 | - | ||
70 | - | ||
71 | - | ||
72 | - | ||
73 | - | ||
74 | - | ||
75 | - | ||
76 | - | ||
77 | - | ||
78 | - | ||
79 | - | ||
80 | - | ||
81 | - | ||
82 | - | ||
83 | - | ||
84 | - | ||
85 | - | ||
86 | - | ||
87 | - | ||
88 | - | ||
89 | - | ||
90 | - | ||
91 | - | ||
92 | - | ||
93 | - | ||
94 | - | ||
95 | 61 | | |
96 | 62 | | |
97 | 63 | | |
| |||
115 | 81 | | |
116 | 82 | | |
117 | 83 | | |
84 | + | ||
85 | + | ||
86 | + | ||
87 | + | ||
88 | + | ||
89 | + | ||
90 | + | ||
91 | + | ||
92 | + | ||
93 | + | ||
94 | + | ||
95 | + | ||
96 | + | ||
97 | + | ||
98 | + | ||
99 | + | ||
100 | + | ||
101 | + | ||
102 | + | ||
103 | + | ||
104 | + | ||
105 | + | ||
106 | + | ||
107 | + | ||
108 | + | ||
109 | + | ||
110 | + | ||
111 | + | ||
112 | + | ||
113 | + | ||
114 | + | ||
115 | + | ||
116 | + | ||
117 | + | ||
118 | + | ||
119 | + | ||
120 | + | ||
121 | + | ||
122 | + | ||
123 | + | ||
124 | + | ||
125 | + | ||
126 | + | ||
127 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | ||
43 | + | ||
44 | + | ||
45 | + | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | ||
51 | + | ||
52 | + | ||
53 | + | ||
54 | + | ||
55 | + | ||
56 | + | ||
57 | + | ||
58 | + | ||
59 | + | ||
60 | + | ||
61 | + | ||
62 | + | ||
63 | + | ||
64 | + | ||
65 | + | ||
66 | + | ||
67 | + | ||
68 | + | ||
69 | + | ||
70 | + | ||
71 | + | ||
72 | + | ||
73 | + | ||
74 | + | ||
75 | + | ||
76 | + | ||
77 | + | ||
78 | + | ||
79 | + | ||
80 | + | ||
81 | + | ||
82 | + | ||
83 | + | ||
84 | + | ||
85 | + | ||
86 | + | ||
87 | + | ||
88 | + | ||
89 | + | ||
90 | + | ||
91 | + | ||
92 | + | ||
93 | + | ||
94 | + | ||
95 | + | ||
96 | + | ||
97 | + | ||
98 | + | ||
99 | + | ||
100 | + | ||
101 | + | ||
102 | + | ||
103 | + | ||
104 | + | ||
0 commit comments