Skip to content
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

Package index is not downloaded after adding URL to preferences #637

Closed
per1234 opened this issue Nov 26, 2021 · 3 comments · Fixed by #1132
Closed

Package index is not downloaded after adding URL to preferences #637

per1234 opened this issue Nov 26, 2021 · 3 comments · Fixed by #1132
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Nov 26, 2021

Describe the bug

In order to install a 3rd party boards platform via Boards Manager, the user must first add its package index URL to the Arduino IDE's File > Preferences > Additional Boards Manager URLs field.

🐛 After doing that, they will open Boards Manager and expect to find the platforms from that package index listed in addition to the default platforms of the primary official package index, as it works in the classic IDE. However, those platforms will not be shown because the Arduino IDE never downloaded the new package index after the user added its URL to the preferences. The user must restart the IDE in order to trigger the package index download.

To Reproduce

  1. If present, delete the following:
    • <directories.data>/package_esp32_index.json
    • <directories.data>/packages/esp32/hardware/
  2. Start the Arduino IDE.
  3. Select File > Preferences from the Arduino IDE menus.
  4. Add the following URL:
    https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
    
    (The issue is not specific to this package index. I just picked an arbitrary one for the sake of the demo.)
  5. Click the OK button.
  6. Watch directories.data for some time.
    🐛 Note that the expected package_esp32_index.json file never appeared.
  7. Open Boards Manager
  8. Watch directories.data for some time.
    🐛 Note that the expected package_esp32_index.json file never appeared.
  9. Look for the expected "esp32 by Espressif Systems" platform in the Boards Manager offerings.
    🐛 Note that it is not present.
  10. Select File > Quit from the Arduino IDE menus.
  11. Start the Arduino IDE.
  12. Watch directories.data.
    🙂 Note that the package_esp32_index.json file now appears.
  13. Open Boards Manager
  14. Look for the expected "esp32 by Espressif Systems" platform in the Boards Manager offerings.
    🙂 Note that it is now present.

Expected behavior

Package index is downloaded after adding a new URL to File > Preferences > Additional Boards Manager URLs.

Desktop

  • OS: Windows 10, Ubuntu 20.04
  • Version: 2.0.0-beta.12-snapshot.a090dfe
    Date: 2021-11-25T17:24:00.480Z
    CLI Version: 0.20.0 [553c6375]
@Azzkikin

This comment was marked as off-topic.

@per1234

This comment was marked as off-topic.

@per1234 per1234 mentioned this issue Jun 10, 2022
3 tasks
@kittaakos kittaakos self-assigned this Jun 23, 2022
@kittaakos
Copy link
Contributor

kittaakos commented Jun 24, 2022

Breaking: 7f8b227#diff-f463d1c276a9080ec522ead62c6dd596e5bf330b093b7d51b71738c9795d0fdaR66-R98

The super class' init method listens to the CLI config change events, but the custom init implementation of the Core client-provider does not do it.

The rest of the logic looks good:

  • The frontend sends the new 3rd party URLs to the backend,
  • The CLI daemon gets updated,
  • The new values are correctly written to the CLI config file,
  • But, the config change event is ignored, and the index update does not run.

Update:

I fixed the notification and ran the index updates but could not find the new core. The problem is that IDE2 must create and init a new core gRPC client after the config merge. Strange. I do not remember doing it. I have to investigate. Maybe the old code did that, or there was a CLI behavior change in 0.19.1. The current state does not do it for sure after this change.

I also noticed that the old code was able to wait. It's not possible with the current one according to changes here and here. The readiness of the service must be checked from the call-site. Not good.

kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Jun 30, 2022
Closes arduino#637

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Jun 30, 2022
Closes arduino#637

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Jun 30, 2022
Closes arduino#637
Closes arduino#906

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jun 30, 2022
Closes #637
Closes #906

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jul 2, 2022
Closes #637
Closes #906

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jul 4, 2022
Closes #637
Closes #906

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jul 4, 2022
Closes #637
Closes #906

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jul 5, 2022
Closes #637
Closes #906

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jul 5, 2022
Closes #637
Closes #906

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jul 5, 2022
Closes #637
Closes #906

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jul 5, 2022
Closes #637
Closes #906

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jul 6, 2022
Closes #637
Closes #906

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jul 6, 2022
Closes #637
Closes #906

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jul 7, 2022
Closes #637
Closes #906

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Jul 8, 2022
Closes #637
Closes #906

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@per1234 per1234 added the conclusion: resolved Issue was resolved label Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants