Skip to content

Avoid excessive libraries index downloads on lib search #1624

Closed
@cavonlee

Description

@cavonlee

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

added
topic: codeRelated to content of the project itself
type: imperfectionPerceived defect in any part of project
on Jan 14, 2022
per1234

per1234 commented on Jan 14, 2022

@per1234
Contributor

Related: #1043

cavonlee

cavonlee commented on Jan 14, 2022

@cavonlee
Author

@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

per1234 commented on Jan 14, 2022

@per1234
Contributor

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 for lib search.

cavonlee

cavonlee commented on Jan 14, 2022

@cavonlee
Author

@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.

changed the title [-]lib search force update-index[/-] [+]Avoid excessive libraries index downloads on `lib search`[/+] on Jan 24, 2022
added and removed
type: imperfectionPerceived defect in any part of project
on Jan 24, 2022
per1234

per1234 commented on Jan 24, 2022

@per1234
Contributor

the update index output format jsonmini is not working

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 every lib 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!

7 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

topic: codeRelated to content of the project itselftype: enhancementProposed improvement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Participants

    @cmaglie@silvanocerza@cavonlee@per1234@MatteoPologruto

    Issue actions

      Avoid excessive libraries index downloads on `lib search` · Issue #1624 · arduino/arduino-cli