Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions arduino/libraries/librariesresolver/cpp.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ func ComputePriority(lib *libraries.Library, header, arch string) int {
priority += 600
} else if name == header || dirName == header {
priority += 500
} else if name == header+"-main" || dirName == header+"-main" {
priority += 410
} else if name == header+"-master" || dirName == header+"-master" {
priority += 400
} else if strings.HasPrefix(name, header) || strings.HasPrefix(dirName, header) {
Expand Down
2 changes: 2 additions & 0 deletions docs/sketch-build-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ The "library name priority" is determined as follows (in order of highest to low
| Rule | Example for `Arduino_Low_Power.h` |
| ------------------------------------------------------------------------- | --------------------------------- |
| The library name matches the include 100% | `Arduino Low Power` |
| The library name matches the include 100%, except with a `-main` suffix | `Arduino Low Power-main` |
| The library name matches the include 100%, except with a `-master` suffix | `Arduino Low Power-master` |
| The library name has a matching prefix | `Arduino Low Power Whatever` |
| The library name has a matching suffix | `Awesome Arduino Low Power` |
Expand All @@ -113,6 +114,7 @@ The "folder name priority" is determined as follows (in order of highest to lowe
| Rule | Example for `Servo.h` |
| ------------------------------------------------------------------------ | --------------------------- |
| The folder name matches the include 100% | `Servo` |
| The folder name matches the include 100%, except with a `-main` suffix | `Servo-main` |
| The folder name matches the include 100%, except with a `-master` suffix | `Servo-master` |
| The folder name has a matching prefix | `ServoWhatever` |
| The folder name has a matching suffix | `AwesomeServo` |
Expand Down