Skip to content

Add library folder name priority promotion for -main suffix #2226

Closed
@RodrigoDornelles

Description

@RodrigoDornelles

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:

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

eca9d9a

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions