Description
Describe the problem
Latest IDE nightly builds are not setting the ARDUINO_USER_AGENT environment variable when running tools.
To reproduce
Using Linux x86-64:
1: File - Preferences, add Teensy URL https://www.pjrc.com/teensy/package_teensy_index.json
2: Boards Manager, Install Teensy 0.59.4
3: Copy this modified teensy_size tool to ~/.arduino15/packages/teensy/tools/teensy-tools/0.59.4/
4: Click Verify and look for "ARDUINO_USER_AGENT = " in the output panel.
Alternately, edit the source code for any tool to print the ARDUINO_USER_AGENT environment variable. This copy of teensy_size merely has these lines added:
const char *ardua = getenv("ARDUINO_USER_AGENT");
fprintf(stderr, "ARDUINO_USER_AGENT = %s\n", ardua);
Expected behavior
The ARDUINO_USER_AGENT environment variable is supposed to be set, according to the Platform Specification, under "Environment variables":
https://arduino.github.io/arduino-cli/0.35/platform-specification/#environment-variables
Arduino IDE 2.2.1 does it correctly:
Arduino IDE version
arduino-ide_nightly-20231227_Linux_64bit
Operating system
Linux
Operating system version
Ubuntu 22.04
Additional context
No response
Issue checklist
- I searched for previous reports in the issue trackerI verified the problem still occurs when using the latest nightly buildMy report contains all necessary details
Activity
kittaakos commentedon Jan 15, 2024
Thank you for reporting it
IDE2 has never set any environment variables. I see this is an issue in the CLI: arduino/arduino-cli#2499. I keep this issue open for visibility.
PaulStoffregen commentedon Jan 16, 2024
I tested the new CLI 0.35.1 release just now. Can confirm it defines ARDUINO_USER_AGENT.
Will test IDE nightly builds to confirm here. Hopefully nightly builds have CLI 0.35.1 soon?
0.35.1
#2332chore: pinned Arduino CLI `0.35.1`
kittaakos commentedon Jan 17, 2024
@PaulStoffregen, can you provide a link to the modified tool for macOS (Intel)? I want to verify #2332.
/Users/a.kitta/Library/Arduino15/packages/teensy/tools/teensy-tools/0.59.4
),chmod +x
)I got this error when compiling in IDE2:
Thank you!
PaulStoffregen commentedon Jan 17, 2024
Will build a MacOS copy in several hours. Right now I have a Windows test machine set up on my workbench. Need to first wrap up this work with Windows before I can put it away and set up my Mac.
kittaakos commentedon Jan 17, 2024
You don't need to. Thank you! You've already helped a lot by checking the build from the PR (#2332 (comment)).
I've set up my Linux env and will go ahead with the already attached binary for Linux.
PaulStoffregen commentedon Jan 17, 2024
I built the modified teensy_size for MacOS.
chore: pinned Arduino CLI `0.35.1`
kittaakos commentedon Jan 17, 2024
Thank you! I have verified it on macOS:
Before:
After:
PaulStoffregen commentedon Jan 18, 2024
Final followup to confirm nightly build now has this issue fixed.