-
-
Notifications
You must be signed in to change notification settings - Fork 398
[breaking] Add env variable to let tools know the cli version and the gRPC client version #1640
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
It looks like we have a regression on MacOS, I'm setting this PR as draft until I found the reason. |
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 know this is still WIP, but I want to add a "to do" that the final proposal should include documentation. Otherwise it will end up as one of those esoteric features nobody remembers a year from now.
It isn't clear to me which is the ideal place to document this. The available options are probably:
Any opinions on the location?
IMHO https://arduino.github.io/arduino-cli/dev/platform-specification/#tools is the best place, I'll write down some notes there. |
03577cc
to
eb7c456
Compare
@PaulStoffregen The rationale is that the previous
I guess you would like to check if the user agent contains the string |
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.
Please also document the breaking changes to the public Go package API according to the standard policy:
https://arduino.github.io/arduino-cli/dev/CONTRIBUTING/#breaking
Co-authored-by: per1234 <[email protected]>
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.
Thanks Cristian!
Thanks!! Today I'm still working on porting my pluggable serial monitor code to Windows. Hoping I can wrap that up tonight, and then tomorrow start using the next nightly build with this environment variable. |
Do not rush on this one, we need to fix also the Arduino IDE to fully support it arduino/arduino-ide#790 |
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)What kind of change does this PR introduce?
Adds an
ARDUINO_USER_AGENT
environment variable to all the tools launched for compile and upload.The variable is in HTTP user-agent format and contains the version of the CLI and possibly the version of the gRPC client of the user if this information is available.
Some examples:
ARDUINO_USER_AGENT=arduino-cli/0.21.0
ARDUINO_USER_AGENT=arduino-cli/0.21.0 ArduinoIDE/2.0.0-rc3
Does this PR introduce a breaking change, and is titled accordingly?
Yes, there are some breaking changes in the golang API.