Closed
Description
Bug Report
Current behavior
./arduino-cli lib search
Running lib search will always force to update index.
Expected behavior
Donot force to update index every time.
Environment
- CLI version (output of
arduino-cli version
): Version: 0.20.2 Commit: 1378381 Date: 2021-12-07T16:41:50Z - OS and platform: macOS Monterey 12.1
Additional context
core search
works fine without forcing update index.
Activity
per1234 commentedon Jan 14, 2022
Related: #1043
cavonlee commentedon Jan 14, 2022
@per1234 OK, if update index is meant to do before every search, is fine, just a little slow. but the problem is that, the update index output format jsonmini is not working. and search outputs so many datas, it would be helpful to use jsonmini.
per1234 commentedon Jan 14, 2022
Hi @cavonlee. Thanks so much for your report. My comment was only intended to add some cross-references to related information.
I see that an index caching system was put in place for
core search
here: #1237 but that was not done forlib search
.cavonlee commentedon Jan 14, 2022
@per1234 OK, thanks too. If so I wanna ask why update index every time search? it slows down the search process. And if so, the update index is becoming usless. I suggest break them up, and let user decide when to update. Or maybe break into two level api, the high level one do both, makes it easier for beginners, if it is what concidering.
[-]lib search force update-index[/-][+]Avoid excessive libraries index downloads on `lib search`[/+]per1234 commentedon Jan 24, 2022
Since the bug of not all output being valid JSON when
--format jsonmini
is used is completely separate from the one of an index update being done on everylib search
command, I have moved it to a dedicated issue here: #1635.That will make it easier for us to track the two.
Thanks for your report @cavonlee!
cli: use cached index with lib search (arduino#1624)
7 remaining items