Commit 1911448
authored
Fix concurrent access to libraries manager gRPC functions. (#2480)
* Removed libraries index fields from LibraryManager
The presence of the Index* fileds inside LibraryManager didn't give any
functional benefit.
* Removed all references to LibraryManger.Index
* Removed unused tmp file creation
* downloadLibrary do not require a libmanager but just the downloadDir
* Inline method LibrariesManager.Install
* Move initializations closer to usage
* Use LibraryManager.FindAllInstalled instead of direct access to field
* Made LibraryManager.Libraries private
* Simplified libraries resolver init
* Made LibrariesManager.LibrariesDir private
* Removed DownloadsDir field from LibraryManager
* Removed librariesindex.Reference structure and related helpers
It does make things more complicated without any actual benefit.
* Removed state-altering methods from LibrariesManager
The original LibrariresManager has been split into three objects with
specific goals:
* The Builder object is used to construct a new LibrariesManager. It has
methods to add librarires directories and to build the LibrariesManager.
* The Explorer object is used to query the LibrariesManager about
installed libraries.
* The Installer object is used to rescan installed libraries and to
install and uninstall.
* Fixed test1 parent bba8f72 commit 1911448
File tree
24 files changed
+461
-396
lines changed- commands
- core
- internal/instances
- lib
- internal
- arduino
- builder/internal/detector
- libraries
- librariesindex
- librariesmanager
- librariesresolver
- integrationtest/completion
24 files changed
+461
-396
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
| 304 | + | |
309 | 305 | | |
310 | 306 | | |
311 | 307 | | |
312 | 308 | | |
313 | 309 | | |
314 | | - | |
| 310 | + | |
315 | 311 | | |
316 | 312 | | |
317 | 313 | | |
| |||
320 | 316 | | |
321 | 317 | | |
322 | 318 | | |
323 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
324 | 329 | | |
325 | 330 | | |
| 331 | + | |
326 | 332 | | |
| 333 | + | |
327 | 334 | | |
328 | 335 | | |
329 | 336 | | |
330 | 337 | | |
331 | | - | |
| 338 | + | |
332 | 339 | | |
333 | 340 | | |
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
337 | 344 | | |
338 | | - | |
| 345 | + | |
339 | 346 | | |
340 | 347 | | |
341 | 348 | | |
| |||
349 | 356 | | |
350 | 357 | | |
351 | 358 | | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
| 359 | + | |
| 360 | + | |
357 | 361 | | |
358 | 362 | | |
359 | 363 | | |
360 | 364 | | |
361 | 365 | | |
362 | | - | |
| 366 | + | |
363 | 367 | | |
364 | 368 | | |
365 | 369 | | |
| |||
369 | 373 | | |
370 | 374 | | |
371 | 375 | | |
372 | | - | |
| 376 | + | |
373 | 377 | | |
374 | 378 | | |
375 | 379 | | |
| |||
378 | 382 | | |
379 | 383 | | |
380 | 384 | | |
381 | | - | |
| 385 | + | |
382 | 386 | | |
383 | 387 | | |
384 | 388 | | |
385 | 389 | | |
386 | 390 | | |
387 | 391 | | |
388 | | - | |
389 | | - | |
390 | | - | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
391 | 402 | | |
392 | 403 | | |
393 | 404 | | |
| |||
409 | 420 | | |
410 | 421 | | |
411 | 422 | | |
412 | | - | |
| 423 | + | |
413 | 424 | | |
414 | 425 | | |
415 | 426 | | |
| 427 | + | |
| 428 | + | |
416 | 429 | | |
417 | | - | |
| 430 | + | |
418 | 431 | | |
419 | 432 | | |
420 | 433 | | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
| 434 | + | |
429 | 435 | | |
430 | 436 | | |
431 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
60 | 62 | | |
61 | 63 | | |
62 | 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 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
63 | 108 | | |
64 | 109 | | |
65 | 110 | | |
| |||
74 | 119 | | |
75 | 120 | | |
76 | 121 | | |
77 | | - | |
78 | | - | |
79 | 122 | | |
80 | 123 | | |
81 | 124 | | |
82 | 125 | | |
83 | 126 | | |
84 | 127 | | |
85 | | - | |
86 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
87 | 134 | | |
88 | 135 | | |
89 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
39 | 48 | | |
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
43 | 52 | | |
44 | 53 | | |
45 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
46 | 60 | | |
47 | 61 | | |
48 | 62 | | |
49 | 63 | | |
50 | | - | |
| 64 | + | |
51 | 65 | | |
52 | 66 | | |
53 | 67 | | |
54 | 68 | | |
55 | 69 | | |
56 | 70 | | |
57 | | - | |
| 71 | + | |
58 | 72 | | |
59 | 73 | | |
60 | 74 | | |
61 | 75 | | |
62 | 76 | | |
63 | 77 | | |
64 | 78 | | |
65 | | - | |
| 79 | + | |
66 | 80 | | |
67 | 81 | | |
68 | 82 | | |
| |||
0 commit comments