Skip to content

Use lexicographic distance as last chance to spot the right library #310

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

Conversation

facchinm
Copy link
Member

Should solve most "overload" cases in Create.

Eg:
Library ZZ_Sensor contains ZZ_Sensor.h but the name in library.properties is "ZZ Unified Sensor"
A sketch includes ZZ_Sensor.h and the resolve function fails every test (since the library name is not contained in any variation of the "include" string), so it uses another clashing library randomly.

Lexicographic distance should help avoiding any library with "very different" name (unless explicitly requested, of course).

@cmaglie @mbanzi @mastrolinux @rsora

@facchinm facchinm requested a review from cmaglie January 15, 2019 18:34
@ArduinoBot
Copy link
Contributor

✅ Build completed.

⬇️ Build URL: http://downloads.arduino.cc/PR/arduino-builder/arduino-builder-310.zip

ℹ️ To test this build:

  1. Replace arduino-builder binary (you can find it where you installed the IDE) with the provided one

Should solve most "overload" cases in Create.

Eg:
Library ZZ_Sensor contains ZZ_Sensor.h but the name in library.properties is "ZZ Unified Sensor"
A sketch includes ZZ_Sensor.h and the resolve function fails every test (since the library name is not contained in any variation of the "include" string), so it uses another clashing library randomly.

Lexicographic distance should help avoiding any library with "very different" name (unless explicitely requested, of course).
@facchinm facchinm force-pushed the lexicographic_distance_as_last_chance branch from 350621e to eff1eeb Compare January 16, 2019 09:35
@ArduinoBot
Copy link
Contributor

✅ Build completed.

⬇️ Build URL: http://downloads.arduino.cc/PR/arduino-builder/arduino-builder-310.zip

ℹ️ To test this build:

  1. Replace arduino-builder binary (you can find it where you installed the IDE) with the provided one

@facchinm facchinm merged commit 1096e48 into arduino:master Mar 7, 2019
@facchinm facchinm deleted the lexicographic_distance_as_last_chance branch March 7, 2019 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants