Add providesIncludes
field to library search scope
#1893
Labels
criticality: medium
Of moderate impact
topic: code
Related to content of the project itself
type: enhancement
Proposed improvement
Describe the request
Add the
providesIncludes
field of the library index to the search scope of thearduino-cli lib search
command.🙂 The chances of finding a library by searching for its header filename will be increased.
Describe the current behavior
The scope of
arduino-cli lib search
is the following fields of the library index:arduino-cli/commands/lib/search.go
Line 44 in 5730e2e
name
sentence
paragraph
The scope of the search in Arduino IDE 1.x is the following fields of the library index:
https://github.com/arduino/Arduino/blob/1.8.19/app/src/cc/arduino/contributions/libraries/ui/LibrariesIndexTableModel.java#L147-L153
name
sentence
paragraph
providesIncludes
Often when searching for a dependency of someone's code the only information the user has is the
#include
directive for the missing file and so that filename is the logical term to use in alib search
query. That filename is not necessarily present in the fields currently used bylib search
.The
includes
field of thelibrary.properties
metadata file of Arduino libraries contains a list of the names of the library's header files which should be added in#include
directives to a sketch when the library is selected from the Arduino IDE's Sketch > Include library menu. This list is the source of the elements of theprovidesIncludes
array field of the library index. For this reason, theprovidesIncludes
field is the source of highly relevant text for searches.🙁 It is sometimes difficult to find a dependency when the user only knows the header filename.
Arduino CLI version
5730e2e
Operating system
Windows
Operating system version
10
Additional context
Example of a user who would have benefited from this: #107 (comment)
Feature request for Arduino IDE 1.x: arduino/Arduino#7604
Arduino IDE 1.x implementation: arduino/Arduino@60021c1
Issue checklist
The text was updated successfully, but these errors were encountered: