IDE UI does not reflect changed "Sketchbook location" preference #796
Labels
conclusion: resolved
Issue was resolved
criticality: medium
Of moderate impact
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Uh oh!
There was an error while loading. Please reload this page.
Describe the problem
User sketches and global library installations are stored in the
libraries
subfolder of the Arduino sketchbook folder. Several UI elements of the Arduino IDE reflect the contents of this folder and the build system also does library discovery from it.The user may change the location of this sketchbook folder using the Sketchbook location preference of the Arduino IDE.
🐛 After the user changes the sketchbook location preference, the IDE's UI elements do not reflect the change to sketchbook sketches and available libraries.
To reproduce
ⓘ This is done to avoid variation in results that could be caused by platform bundled libraries of an arbitrary board selection.
ⓘ The bug occurs regardless of whether you set the new sketchbook path directly via the Sketchbook location field or using the dialog accessed by clicking the Browse button.
🐛 The view shows the contents of the previous sketchbook location.
🐛 The menu shows the sketches located in the previous sketchbook location.
🐛 The menu does not show the sketches located in the current sketchbook location.
🐛 The menu shows the examples of the libraries from the previous sketchbook location.
🐛 The menu does not show the examples of the libraries from the current sketchbook location.
🐛 The menu shows the libraries from the previous sketchbook location.
🐛 The menu does not show the libraries from the current sketchbook location.
#include
directive(s) for the library are added to the sketch.🐛 The compilation fails with a "
No such file or directory
" error, since the library is not in one of the libraries paths.🐛 Library Manager shows the library as installed.UPDATE: This specific part was resolved by #637, #906: Update package index on 3rd party URLs change. #1132. However, that resolution is unexpected since the index update (which triggers the reinitialization of Arduino CLI that updates the library installation status) should only be triggered on "Additional Boards Manager URLs" preference change. So the fact that the index update is currently (fc9107c at the time this is being written) being triggered on "Sketchbook location" preference change is a bug.
🐛 The library is installed to thelibraries
subfolder of the old sketchbook location.UPDATE: This specific part has been resolved since the time of the report (though perhaps as a side effect of a bug, as described in the note regarding the Library Manager installation status).
🐛 The library is installed to thelibraries
subfolder of the old sketchbook location.UPDATE: This specific part has been resolved since the time of the report (though perhaps as a side effect of a bug, as described in the note regarding the Library Manager installation status).
Expected behavior
All IDE data on sketchbook contents (sketches, libraries, manually installed boards platforms) is updated after changing the sketchbook location preference.
Arduino IDE version
Original report
2.0.0-rc3-snapshot.759b410
Last verified with
2.0.0-snapshot-42f6f43
Operating system
Windows
Operating system version
10
Additional context
In addition to the use case of the Sketchbook location preference for occasional long term change of the sketchbook location according to user whims, some advanced users dedicate a separate sketchbook to each project in order to provide it with a dedicated dependencies environment, which may include manually installed boards platforms in addition to libraries. These users frequently switch from one sketchbook to another and so are especially dependent on the IDE immediately recognizing that change.
The issue also applies to boards platforms manually installed to thehardware
subfolder of the sketchbook.UPDATE: This specific part has been resolved since the time of the report (though perhaps as a side effect of a bug, as described in the note regarding the Library Manager installation status).
Possibly related to arduino/arduino-cli#1802
Issue checklist
The text was updated successfully, but these errors were encountered: