-
-
Notifications
You must be signed in to change notification settings - Fork 403
Add --library
flag to compile
command
#1258
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
Conversation
command.Flags().StringSliceVar(&library, "library", []string{}, | ||
"List of paths to libraries root folders. Libraries set this way have top priority in case of conflicts. Can be used multiple times for different libraries.") | ||
command.Flags().StringSliceVar(&libraries, "libraries", []string{}, | ||
"List of custom libraries paths separated by commas. Or can be used multiple times for multiple libraries paths.") | ||
"List of custom libraries dir paths separated by commas. Or can be used multiple times for multiple libraries dir paths.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering about the mixture of "folder" and "dir" ("directory") terms in the descriptions of these two closely related flags. Is that intentional?
Even though I like the term "directory" better (probably due to it being the term used when I started with computers), I have made a decision to prefer "folder" in my own communications because all directories are folders, but not all folders are directories and it's too confusing to me to try to figure out whether "directory" will always be applicable for the specific situation. But "directory" is used more often in the Arduino CLI documentation, and is part of the configuration keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use them interchangeably, with this change I wanted to make it clear that --libraries
must point to a single directory containing multiple libraries folders but am not sure I made it clearer.
I'm open to suggestions.
ad14acf
to
78f4db0
Compare
78f4db0
to
3d1de92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and working
@per1234 if it's ok for you I'll merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I apologize for being so slow on the re-review.
@per1234 no worries. <3 |
* Add --library flag to compile command * Fix library prioritization * [skip changelog] Fix receiver name in LibraryManager functions * [skip changelog] Fix variables names and some docstrings * Fix libraries not being recompiled when path to source file changes
Please check if the PR fulfills these requirements
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)Adds a new flags to and existing command and related gRPC function.
There is currently no way of specifying a single custom library path when calling the
compile
command.The user can now set the
--library
flag to specify one or more libraries root folder when compiling a sketch.Libraries specified this way have top priority in case of conflict with identical libraries.
titled accordingly?
Nope.
The docstring for the
--libraries
flag has also been modified to make it clearer and to differentiate it from this new--library
flag.The
--libraries
flag expects a path to a folder containing multiple libraries, much like the<sketchbook>/libraries
folder does.Assume we have two libraries in these paths:
The
--libraries
flag must be used like so:Instead the
--library
flag expects a path to the root folder of a single library, so it must be used like so:See how to contribute