-
-
Notifications
You must be signed in to change notification settings - Fork 405
Change core and lib search commands to use fuzzy search #1193
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like it's taking "fuzzy" a bit too far:
$ arduino-cli core search yun
Updating index: package_index.json downloaded
Updating index: package_index.json.sig downloaded
ID Version Name
Microsoft:win10 1.1.2 Windows 10 Iot Core
arduino-beta:mbed 1.3.1 [DEPRECATED] Arduino mbed-enabled Boards
arduino:avr 1.8.3 Arduino AVR Boards
arduino:samd 1.8.11 Arduino SAMD Boards (32-bits ARM Cortex-M0+)
For example, I don't see what would give a match to "yun" in the "Windows 10 Iot Core" platform entry:
Click to expand
{
"name": "Microsoft",
"maintainer": "Microsoft.IoT",
"websiteURL": "https://github.com/ms-iot/iot-utilities/tree/master/IotCoreAppDeployment/ArduinoIde/",
"email": "bfjelds@microsoft.com",
"help": {
"online": "http://developer.microsoft.com/en-us/windows/iot/IotCoreAppDeployment_ArduinoIde.htm"
},
"platforms": [
{
"name": "Windows 10 Iot Core",
"architecture": "win10",
"version": "1.0.0",
"category": "Contributed",
"help": {
"online": "http://developer.microsoft.com/en-us/windows/iot/IotCoreAppDeployment_ArduinoIde.htm"
},
"url": "https://github.com/ms-iot/iot-utilities/raw/master/IotCoreAppDeployment/ArduinoIde/release/win10_iotcore-1.0.0_ide-1.6.6.zip",
"archiveFileName": "win10_iotcore-1.0.0_ide-1.6.6.zip",
"checksum": "SHA-256:ed1b42b396217e242cd3a5b597ad5dad5957cb8117dd0f972376bafab7d8a0e5",
"size": "47325480",
"boards": [
{"name": "Windows 10 IoT Core"}
],
"toolsDependencies":[]
},
{
"name": "Windows 10 Iot Core",
"architecture": "win10",
"version": "1.1.0",
"category": "Contributed",
"help": {
"online": "http://developer.microsoft.com/en-us/windows/iot/IotCoreAppDeployment_ArduinoIde.htm"
},
"url": "https://github.com/ms-iot/iot-utilities/raw/master/IotCoreAppDeployment/ArduinoIde/release/win10_iotcore-1.1.0_ide-1.6.6.zip",
"archiveFileName": "win10_iotcore-1.1.0_ide-1.6.6.zip",
"checksum": "SHA-256:683dcb0a72e80b9d21117f6471e0860d8cc35cd9b86557ba6fd1ed255952413e",
"size": "48316890",
"boards": [
{"name": "Windows 10 IoT Core"}
],
"toolsDependencies":[]
},
{
"name": "Windows 10 Iot Core",
"architecture": "win10",
"version": "1.1.1",
"category": "Contributed",
"help": {
"online": "http://ms-iot.github.io/content/en-US/win10/IotCoreAppDeployment_ArduinoIde.htm"
},
"url": "https://github.com/ms-iot/iot-utilities/raw/master/IotCoreAppDeployment/ArduinoIde/release/win10_iotcore-1.1.1_ide-1.6.11.zip",
"archiveFileName": "win10_iotcore-1.1.1_ide-1.6.11.zip",
"checksum": "SHA-256:f455f2829164065faacde141b3c15604c51bb79b6874d55d1124c66aae372693",
"size": "48317624",
"boards": [
{"name": "Windows 10 IoT Core"}
],
"toolsDependencies":[]
},
{
"name": "Windows 10 Iot Core",
"architecture": "win10",
"version": "1.1.2",
"category": "Contributed",
"help": {
"online": "http://ms-iot.github.io/content/en-US/win10/IotCoreAppDeployment_ArduinoIde.htm"
},
"url": "https://github.com/ms-iot/iot-utilities/raw/master/IotCoreAppDeployment/ArduinoIde/release/win10_iotcore-1.1.2_ide-1.6.11.zip",
"archiveFileName": "win10_iotcore-1.1.2_ide-1.6.11.zip",
"checksum": "SHA-256:b1c9956b46f33bcebb7f500d29931b19ed4723c713ac0439681ea1fb172722d1",
"size": "48317648",
"boards": [
{"name": "Windows 10 IoT Core"}
],
"toolsDependencies":[]
}
],
"tools":[]
}
@per1234 I tested this while in a chat with @silvanocerza and I got to the same conclusion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pulled
built
tested
approved
Please check if the PR fulfills these requirements
before creating one)
UPGRADING.md
has been updated with a migration guide (for breaking changes)Enhances
core search
andlib search
commands and related gRPC interface functions by introducing fuzzy search.As of now
core search
andlib search
both do a plain text matching on several platforms or libraries parameters to find results, this required the user to write exactly a string that matched one of those parameters.This is frustrating since even a missing space or underscore would make the search fail.
For example calling
lib search
withArduino mkr iot carrier
orArduinomkriotcarrier
would never return the libraryArduino_MKRIoTCarrier
.Or calling
core search
withyun
instead ofyún
with the correct accent would never return thearduino:avr
platform.A fuzzy search is now done when calling
core search
andlib search
, this way the user won't be required to write exactly the string to search but it will manipulated to find matches. Accented chars are normalized, missing chars or typos are handled, and things like this. It's not magical but better than before.Now calling
lib search
withArduino mkr iot carrier
orArduinomkriotcarrier
will return the libraryArduino_MKRIoTCarrier
.Also calling
core search
withyun
without an accent will return thearduino:avr
platform.This also affects the gRPC interface.
Nope.
None.
See how to contribute