Skip to content

Conversation

MatteoPologruto
Copy link
Contributor

@MatteoPologruto MatteoPologruto commented Feb 13, 2023

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)

What kind of change does this PR introduce?

Code enhancement

What is the current behavior?

Executing lib search always downloads and updates library_index.json.

What is the new behavior?

A timeout has been introduced to avoid updating the index every time lib search is executed.

Does this PR introduce a breaking change, and is titled accordingly?

No

Other information

This is a duplicate of #1789. Since the original author did not make any recent update, I'm simply rebasing his commits and applying the suggestions. Once this PR is merged, the original can be closed.

Close #1789

@MatteoPologruto MatteoPologruto added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Feb 13, 2023
@MatteoPologruto MatteoPologruto self-assigned this Feb 13, 2023
@MatteoPologruto MatteoPologruto marked this pull request as ready for review February 13, 2023 11:58
@MatteoPologruto MatteoPologruto linked an issue Feb 13, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Base: 36.68% // Head: 36.65% // Decreases project coverage by -0.03% ⚠️

Coverage data is based on head (f8679ad) compared to base (396718f).
Patch coverage: 0.00% of modified lines in pull request are covered.

❗ Current head f8679ad differs from pull request most recent head 6c89894. Consider uploading reports for the commit 6c89894 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2072      +/-   ##
==========================================
- Coverage   36.68%   36.65%   -0.03%     
==========================================
  Files         228      228              
  Lines       19385    19400      +15     
==========================================
  Hits         7111     7111              
- Misses      11442    11457      +15     
  Partials      832      832              
Flag Coverage Δ
unit 36.65% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/cli/lib/search.go 0.00% <0.00%> (ø)
arduino/cores/packagemanager/package_manager.go 67.46% <0.00%> (-0.73%) ⬇️
commands/lib/search.go 92.10% <0.00%> (+3.94%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MatteoPologruto MatteoPologruto merged commit c222ad0 into arduino:master Feb 13, 2023
@MatteoPologruto MatteoPologruto deleted the cli/cached-lib-search branch February 13, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid excessive libraries index downloads on lib search
3 participants