arduino / arduino-ide

Arduino IDE 2.x
https://www.arduino.cc/en/software
GNU Affero General Public License v3.0
2.21k stars 379 forks source link

IDE2 cannot recover 3rd party package index if the `package_${3RD_PARTY_PACKAGE_NAME}_index.json` is deleted between sessions #2021

Open kittaakos opened 1 year ago

kittaakos commented 1 year ago

Describe the problem

When the package index of a 3rd party platform is removed from the directories.data folder AND neither the primary package index nor the library index is "corrupted". IDE2 cannot recover the 3rd party package. Hence the 3rd party package is not visible from the Boards Manager widget.

To reproduce

⚠️ Be careful. You might corrupt your data folder if you do not know what you are doing.

IDE2 only recovers when there is a primary package index, library index, or platform tools problem, but not with a 3rd party index problem.

Expected behavior

IDE2 can recover missing 3rd party platforms on startup

Arduino IDE version

2.0.4

Operating system

macOS

Operating system version

12.6.3

Additional context

https://user-images.githubusercontent.com/1405703/233071157-65c369ae-f648-4288-87ae-19e10830ac2a.mp4

Issue checklist

kittaakos commented 1 year ago

I think this is a regress: https://github.com/arduino/arduino-ide/pull/1132#pullrequestreview-1028597264