Skip to content

Refactoring of LibraryManager libraries directory handling. #2477

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 6 commits into from
Dec 27, 2023

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Dec 22, 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)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

  • Factored some library_index.json URL globals
  • Simplified some functions
  • LibrariesManager.AddLibrariesDir now accepts explicit LibraryDir struct parameters
  • Removed weird --library loading hack in the library detector

What is the current behavior?

No changes

What is the new behavior?

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

Other information

…ruct

This is preparatory for the next commit
Previously the libraries detector had to load the single librares
provided via '--library' flag after a Rescan, because the library
manager wasn't able to handle a single folder library. Now it can so we
removed all the tricky machinery.
@cmaglie cmaglie added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Dec 22, 2023
@cmaglie cmaglie self-assigned this Dec 22, 2023
Copy link

codecov bot commented Dec 22, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (fb1b9a0) 67.55% compared to head (2728183) 67.64%.

Files Patch % Lines
...ino/libraries/librariesmanager/librariesmanager.go 81.48% 3 Missing and 2 partials ⚠️
commands/instances.go 94.44% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2477      +/-   ##
==========================================
+ Coverage   67.55%   67.64%   +0.09%     
==========================================
  Files         207      207              
  Lines       20759    20765       +6     
==========================================
+ Hits        14023    14047      +24     
+ Misses       5590     5578      -12     
+ Partials     1146     1140       -6     
Flag Coverage Δ
unit 67.64% <92.30%> (+0.09%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@alessio-perugini alessio-perugini left a comment

Choose a reason for hiding this comment

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

nice one!

@cmaglie cmaglie merged commit 8252c6b into arduino:master Dec 27, 2023
@cmaglie cmaglie deleted the transactional_libramanager_2 branch December 27, 2023 09:34
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.

2 participants