loic_d
October 3, 2023, 6:12am
1
Hi,
first, thanks a lot for your work.
IDE version : 2.2.1
OS : windows 11
problem :
in file>preferences>board manager, I write :
https://raw.githubusercontent.com/CircuitMess/Arduino-Packages/master/package_circuitmess.com_esp32_index.json
in board manager, "cuircuitmess" doesn't appear
work arround found :
in folder ...\AppData\Local\Arduino15, the downloaded file is named package_circuitmess.json
but the expected name is package_circuitmess.com_esp32_index.json .
So I rename the file as expected, restart IDE, and my board appears.
suggestion to team :
during upload of json files, could you update the parser to allow the dot character "." in json filename ?
Bye
Loic
Why is this "regression"? Was it different in the past?
The spec Package index specification - Arduino CLI dopes not seem to make it clear that a dot is not allowed Unless I missed it
Hi @loic_d . Thanks for your post. The formal report for this bug is here:
opened 08:21AM - 28 Sep 23 UTC
closed 07:21AM - 02 Oct 23 UTC
conclusion: resolved
topic: code
type: imperfection
### Describe the problem
If the filename of a package index contains the char… acter `.`, Arduino CLI truncates the downloaded filename
### To reproduce
```text
$ arduino-cli version
arduino-cli.exe Version: git-snapshot Commit: 6aa1be03 Date: 2023-09-28T08:02:22Z
$ export ARDUINO_DIRECTORIES_DATA="/tmp/arduino-cli-directories/data" # Use a throwaway directories.data for the demo
$ arduino-cli --additional-urls http://drazzy.com/package_drazzy.com_index.json core update-index
[...]
Downloading index: package_drazzy.com_index.json downloaded
Error initializing instance: Loading index file: loading json index file C:\Users\per\AppData\Local\Temp\arduino-cli-directories\data\package_drazzy.com_index.json: open C:\Users\per\AppData\Local\Temp\arduino-cli-directories\data\package_drazzy.com_index.json: The system cannot find the file specified.
[...]
$ ls "$ARDUINO_DIRECTORIES_DATA"/package_drazzy*.*
/tmp/arduino-cli-directories/data/package_drazzy.json
$ arduino-cli --additional-urls http://drazzy.com/package_drazzy.com_index.json core install ATTinyCore:avr
Error initializing instance: Loading index file: loading json index file C:\Users\per\AppData\Local\Temp\arduino-cli-directories\data\package_drazzy.com_index.json: open C:\Users\per\AppData\Local\Temp\arduino-cli-directories\data\package_drazzy.com_index.json: The system cannot find the file specified.
Error initializing instance: Loading index file: loading json index file C:\Users\per\AppData\Local\Temp\arduino-cli-directories\data\package_drazzy.com_index.json: open C:\Users\per\AppData\Local\Temp\arduino-cli-directories\data\package_drazzy.com_index.json: The system cannot find the file specified.
Invalid argument passed: Platform 'ATTinyCore:avr' not found
```
🐛 The downloaded package index was named `package_drazzy.json` instead of the correct name `package_drazzy.com_index.json`
🐛 The platforms from the package index can't be installed because the truncation caused the file to no longer have the [required filename format](https://arduino.github.io/arduino-cli/dev/package_index_json-specification/#naming-of-the-json-index-file) (`package_<differentiator>_index.json`).
### Expected behavior
The filenames of package index files are not changed on download.
### Arduino CLI version
6aa1be03
### Operating system
- Windows
- Linux
### Operating system version
- Windows 11
- Ubuntu 22.04
### Additional context
I bisected the regression to 82e6f5d7e77f21f5894802aaca5ee5aa24a60bd1 (doesn't occur when using the build from the previous commit 1877431762fe31519d8c51de0df9e4e018c475a3).
---
The use of a full domain name in the package index filename is explicitly recommended in the Arduino Package Index Specification:
https://arduino.github.io/arduino-cli/dev/package_index_json-specification/#naming-of-the-json-index-file
> We suggest using a domain name owned by the packager. For example:
>
> `package_arduino.cc_index.json`
---
Originally reported at https://github.com/SpenceKonde/ATTinyCore/issues/803#issuecomment-1738280090
#### Additional reports
- https://github.com/SpenceKonde/megaTinyCore/issues/1005
#### Related
- https://github.com/adafruit/ci-arduino/pull/163
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-cli/issues?q=)
- [X] I verified the problem still occurs when using the [nightly build](https://arduino.github.io/arduino-cli/dev/installation/#nightly-builds)
- [X] My report contains all necessary details
The bug has already been fixed, but the fix was made after the time of the latest Arduino CLI release so Arduino IDE users (whether on the 2.2.1 release version or the nightly build) are still affected.
Nice work on already having identified the workaround of renaming the local copy of the package index file!
loic_d
October 4, 2023, 5:04am
4
Hi @ptillisch , thanks for this quick and nice answer.
Glad to see that it is already taken into account !
Thanks again for all your work.
resolved
1 Like
system
Closed
April 1, 2024, 5:05am
5
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.