Skip to content

fix: scan libraries on install #2037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 19, 2023
Merged

Conversation

Bikappa
Copy link
Contributor

@Bikappa Bikappa commented Jan 18, 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?

Rescan libraries before installing new ones. Upon each installation request the libraries folders
are rescanned.

What is the current behavior?

The installed libraries are scanned only at initialization time. If other are added
while the program runs, especially in deamon mode, these are not known to the running instance.
This causes the execution to fail improperly if different installation attempts have an
overlap/conflict in dependencies.

What is the new behavior?

The installed libraries are reloaded before every installation request, so the logic has the updated
status.

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

Other information

Fixes #1802

@codecov
Copy link

codecov bot commented Jan 18, 2023

Codecov Report

Base: 36.53% // Head: 36.56% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (6e5a811) compared to base (271d241).
Patch coverage: 83.33% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2037      +/-   ##
==========================================
+ Coverage   36.53%   36.56%   +0.02%     
==========================================
  Files         229      229              
  Lines       19379    19385       +6     
==========================================
+ Hits         7080     7088       +8     
+ Misses      11463    11462       -1     
+ Partials      836      835       -1     
Flag Coverage Δ
unit 36.56% <83.33%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
arduino/libraries/librariesmanager/install.go 16.58% <0.00%> (-0.09%) ⬇️
...ino/libraries/librariesmanager/librariesmanager.go 53.27% <100.00%> (+1.99%) ⬆️
arduino/cores/packagemanager/package_manager.go 66.58% <0.00%> (+0.75%) ⬆️

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.

@Bikappa Bikappa self-assigned this Jan 19, 2023
@Bikappa Bikappa marked this pull request as ready for review January 19, 2023 08:28
Copy link
Contributor

@umbynos umbynos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM 🏁

@umbynos umbynos added type: enhancement Proposed improvement topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface labels Jan 19, 2023
@Bikappa Bikappa merged commit a58d5ad into master Jan 19, 2023
@Bikappa Bikappa deleted the fix/scan-libraries-on-install branch January 19, 2023 11:47
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 topic: gRPC Related to the gRPC interface type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Libraries are not re-scanned prior to install operation when in gRPC daemon mode
2 participants