Skip to content

feat: Auto upgrade installed.json to newer versions if platform index is still available.#3161

Merged
cmaglie merged 6 commits into
arduino:masterfrom
cmaglie:installed-json-migrations
Apr 13, 2026
Merged

feat: Auto upgrade installed.json to newer versions if platform index is still available.#3161
cmaglie merged 6 commits into
arduino:masterfrom
cmaglie:installed-json-migrations

Conversation

@cmaglie

@cmaglie cmaglie commented Apr 9, 2026

Copy link
Copy Markdown
Member

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Auto-upgrade of installed.json as described in #3155

What is the current behavior?

Platforms installed with an older Arduino CLI may not benefit from new features in the latest Arduino CLI version unless the platform is uninstalled and reinstalled.

What is the new behavior?

New features of the Arduino CLI are immediately available, since the installed.json file is automatically updated to the latest version if possible.

Does this PR introduce a breaking change, and is titled accordingly?

No

Other information

Fix #3155

@cmaglie cmaglie self-assigned this Apr 9, 2026
@cmaglie cmaglie added topic: package-management Related to the packaging and managing of the platform/libraries type: enhancement Proposed improvement labels Apr 9, 2026
@cmaglie cmaglie changed the title feat: Auto upgrade installed.json to newer versions if index is available. Apr 9, 2026
Comment thread internal/arduino/cores/packagemanager/package_manager.go Outdated
@cmaglie cmaglie force-pushed the installed-json-migrations branch from 8eafc38 to 3c64337 Compare April 10, 2026 11:15
@cmaglie cmaglie force-pushed the installed-json-migrations branch from 3c64337 to 209c636 Compare April 10, 2026 11:17
@codecov

codecov Bot commented Apr 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 67.64706% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.40%. Comparing base (8dd36fd) to head (370f6e5).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
...al/arduino/cores/packagemanager/package_manager.go 61.90% 4 Missing and 4 partials ⚠️
...ernal/arduino/cores/packageindex/index_easyjson.go 80.00% 2 Missing ⚠️
internal/arduino/cores/packagemanager/loader.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3161      +/-   ##
==========================================
- Coverage   69.40%   69.40%   -0.01%     
==========================================
  Files         252      252              
  Lines       19506    19536      +30     
==========================================
+ Hits        13539    13559      +20     
- Misses       4710     4717       +7     
- Partials     1257     1260       +3     
Flag Coverage Δ
unit 69.40% <67.64%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@per1234 per1234 added the topic: code Related to content of the project itself label Apr 12, 2026
@cmaglie cmaglie marked this pull request as ready for review April 13, 2026 13:18
Comment thread internal/arduino/cores/packageindex/index.go
Comment thread internal/arduino/cores/packagemanager/package_manager.go
Comment thread internal/arduino/cores/packagemanager/package_manager.go Outdated
Comment thread internal/arduino/cores/packagemanager/package_manager.go Outdated
Comment thread internal/arduino/cores/packagemanager/package_manager.go Outdated
Co-authored-by: Luca Rinaldi <to@lucar.in>
@cmaglie cmaglie force-pushed the installed-json-migrations branch from bb05f65 to 370f6e5 Compare April 13, 2026 14:46
@cmaglie cmaglie merged commit 5af5768 into arduino:master Apr 13, 2026
326 of 330 checks passed
@cmaglie cmaglie deleted the installed-json-migrations branch April 13, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: code Related to content of the project itself topic: package-management Related to the packaging and managing of the platform/libraries type: enhancement Proposed improvement

3 participants