-
-
Notifications
You must be signed in to change notification settings - Fork 436
Description
Describe the request
Add the providesIncludes field of the library index to the search scope of the arduino-cli lib search command.
🙂 The chances of finding a library by searching for its header filename will be increased.
$ arduino-cli lib search painlessMesh
Downloading index: library_index.json.gz downloaded
Downloading index signature: library_index.json.sig downloaded
Name: "Painless Mesh"
Author: Coopdis,Scotty Franzyshen,Edwin van Leeuwen,Germán Martín,Maximilian Schwarz,Doanh Doanh
Maintainer: Edwin van Leeuwen
Sentence: A painless way to setup a mesh with ESP8266 and ESP32 devices
Paragraph: A painless way to setup a mesh with ESP8266 and ESP32 devices
Website: https://gitlab.com/painlessMesh/painlessMesh
Category: Communication
Architecture: esp8266, esp32
Types: Contributed
Versions: [0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.2.0, 0.2.1, 0.5.0, 0.5.4, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.5, 0.7.0, 1.0.0, 1.0.2, 1.0.3, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.2.8, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.4.10, 1.5.0]
Provides includes: painlessMesh.h
Dependencies: ArduinoJson, TaskScheduler
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
| toTest := []string{lib.Name, lib.Latest.Paragraph, lib.Latest.Sentence} |
namesentenceparagraph
The scope of the search in Arduino IDE 1.x is the following fields of the library index:
namesentenceparagraphprovidesIncludes
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 a lib search query. That filename is not necessarily present in the fields currently used by lib search.
The includes field of the library.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 the providesIncludes array field of the library index. For this reason, the providesIncludes 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
arduino-cli.exe Version: git-snapshot Commit: 5730e2eb Date: 2022-09-24T17:05:10Z
$ arduino-cli lib search painlessMesh
Downloading index: library_index.json.gz downloaded
Downloading index signature: library_index.json.sig downloaded
No libraries matching your search.
Arduino CLI version
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
- I searched for previous requests in the issue tracker
- I verified the feature was still missing when using the latest nightly build
- My request contains all necessary details