Skip to content

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

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

Closed
3 tasks done
RodrigoDornelles opened this issue Jun 24, 2023 · 0 comments · Fixed by #2233
Closed
3 tasks done

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

RodrigoDornelles opened this issue Jun 24, 2023 · 0 comments · Fixed by #2233
Labels
conclusion: resolved Issue was resolved topic: build-process Related to the sketch build process topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@RodrigoDornelles
Copy link
Contributor

RodrigoDornelles commented Jun 24, 2023

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
@RodrigoDornelles RodrigoDornelles added the type: enhancement Proposed improvement label Jun 24, 2023
@per1234 per1234 changed the title Library Name Priority: name matches the include 100% a -main suffix Add library folder name priority promotion for -main suffix Jun 26, 2023
@per1234 per1234 added topic: code Related to content of the project itself topic: build-process Related to the sketch build process labels Jun 26, 2023
@per1234 per1234 linked a pull request Jul 4, 2023 that will close this issue
6 tasks
@per1234 per1234 added the conclusion: resolved Issue was resolved label Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: build-process Related to the sketch build process topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants