-
-
Notifications
You must be signed in to change notification settings - Fork 444
Description
Describe the request
The library dependency resolution process currently promotes the library folder name priority for the -master suffix:
https://arduino.github.io/arduino-cli/latest/sketch-build-process/#folder-name-priority
| } else if name == header+"-master" || dirName == header+"-master" { |
The reason for this is that when you use GitHub's "Download ZIP", the ref is appended to the folder name (e.g. if the repository name is "FooLib" and the user is downloading from the tip of the repository's master branch, the resulting folder name of the unzipped library will be FooLib-master).
The reason for this special treatment of -master is because in years past master was the default branch name of Git and GitHub repositories.
However, the default default branch name has since been changed to main:
- https://github.blog/changelog/2020-10-01-the-default-branch-for-newly-created-repositories-is-now-main/
- https://public-inbox.org/git/xmqq361ccvot.fsf@gitster.c.googlers.com/T/#t
- installer: offer to configure
init.defaultBranchgit-for-windows/build-extra#307 (comment) - https://about.gitlab.com/blog/2021/03/10/new-git-default-branch-name/
- https://community.atlassian.com/t5/Bitbucket-articles/Moving-away-from-Master-as-the-default-name-for-Branches-in-Git/ba-p/1414060
The folder name priority should be promoted for libraries with the -main suffix just the same as is already done for the -master suffix.
Describe the current behavior
Library folder name priority is promoted for the -master suffix but not the -main suffix.
Arduino CLI version
Operating system
All
Operating system version
Any
Issue checklist
- I searched for previous requests in the issue tracker
- I verified the feature was still missing when using the nightly build
- My request contains all necessary details